« first day (1324 days earlier)      last day (3850 days later) » 

16:00
and in std::cout << f("Hello"); the whole statement includes operator<<, right?
yeah, ok, I see
so the only case in which is it extended is when you do: std::string&& x = std::string("Hello"); or std::string& x = std::string("Hello");?
second is ill-formed.
so only in the first case, where the initializing-expression is an ... er, it's xvalue or prvalue, I think.
@DeadMG prvalue
@DeadMG because std::string("Hello") is not an lvalue?
right.
I see
16:04
Oh my god
I must say I have never heard about these functions. Since I've only had class about C and not C++, I think I'll keep safe and use the macro (also since I'm sure this is at compile time). I'll keep this in mind though and look up exactly what they are, thanks. — arbitter 5 mins ago
People just declining to use constexpr-functions, i rage
And use macros instead :((
hmm
just conceived of my first optimization that has hilarious results like never executing code you wrote.
actually I guess that's not quite fair.
I can only not execute some of the code.
16:22
@DeadMG is it ill-formed also with const std::string& x = std::string("Hello");?
no.
it compiles
and you get lifetime extension there.
so we have two cases, const std::string& and std::string&&
@Arcoth again VC++ rage... constexpr is not available
16:34
@Jefffrey Also const std::string&&
isn't std::string&& const by definition?
no.
not even remotely
@Jefffrey It would be totally useless if it were.
What would you do with it inside a move constuctor?
-1
Q: Cannot open file 'kernel32.lib' - Integrate VC++ properly into Eclipse

user2991252There are a lot of links to forums about this but I does not help. Its about integrating VC++ to Eclipse. The headerfiles seems to be there but I am not sure about the libs-files? What happends is that I get this "famous" error when building a simple c++ program: LINK : fatal error LNK1104: ...

16:37
right
destroy please
@FredOverflow so const std::string&& is totally useless
@LightnessRacesinOrbit it's like... 2 years old
@Jefffrey so's your mum
@Jefffrey Pretty much the only use I've ever seen is T(const T&&) = delete;.
user3010322
16:42
I wish there was a make_range_if_not_range
user3010322
so I could just slap that on all my code and deal with ranges of size 0 or 1.
@DeadMG because it is declared by default?
no, because const rvalues are worthless and people should be slapped in the face for trying it.
oh, lol
26
Q: Do rvalue references to const have any use?

FredOverflowI guess not, but I would like to confirm. Is there any use for const Foo&&, where Foo is a class type?

user3010322
16:44
So it's just for deleting dumb things.
user3010322
Lol.
user3010322
I tried to use SFINAE again while I was porting and compiled with VC++.
user3010322
Why do I have hope that one day it will behave properly.
user3010322
std::is_integral doesn't cover pointers...
of course it doesn't.
they're not integral.
16:55
TIL you can use = delete on template functions to remove specializations.
user3010322
I need an is_ranged concept...
user1804599
lolwat
user3010322
I guess for my purposes not<std::is_class<T>> does the trick.
17:01
isn't not a keyword?
user3010322
It probably is. That was just an example.
user3010322
If anything, I'd name that not_t.
@DeadMG Please don't call it >>= if you add Monads to Wide. If you want to attract the Scala crowd, call it flatMap.
Did bartek just rage quit?
5 hours ago, by Bartek Banachewicz
I don't belong in this room anymore.
he'll be back
17:22
> Absolutely! At C++Now people were talking about monads without any shame or embarrassment.
libertinism ftw
Hai Andy.
halo Jeff
user3010322
@Xeo you busy? I need some help developing a type trait that checks for the existence of a function (That can return... anything).
@ThePhD std::is_convertable<T, std::function<void(P)>>?
@StackedCrooked Technically it's not a keyword, just an alternative token for !, but the end result is similar - you can't define a variable, class, function and call it not
17:29
@AndyProwl sure? I thought it counted as a keyword?
user3010322
I figured it out...
@MooingDuck See 2.6 Alternative tokens [lex.digraph]
@MooingDuck Well, eventually the effect is the same I guess (perhaps not always?), but technically it's not (see 2.12/1)
user3010322
I'm not sure if this is the best SFINAE method
user3010322
but it works.
user3010322
17:33
template <typename T>
using tmp_value = T::value;
user3010322
valid syntax for using ?
Have you tried it?
user3010322
It's not compiling, I wouldn't ask if it compiled
user3010322
Must resolve to a type...
user3010322
that sucks.
17:38
I think using only works for types.
Given that using is meant as a replacement for typedef, that's not really surprising :)
user1804599
@ThePhD You need a variable template.
user1804599
template <typename T>
auto tmp_value = T::value;
user3010322
Sounds like hell in a handbasket.
user3010322
Either way, std::conditional doesn't derive from std::true_type or std::false_type
user3010322
which kind've sucks.
17:44
@ThePhD The suffix 've does not stand for of.
I need to get off my ass and build my new linux box... so I can finally say goodbye to VC++
@Mgetz What are you gonna use instead? Eclipse? ;)
vim + YCM
works surprisingly well
not quite as nice as VS
@FredOverflow what do you use?
hmm
I somehow got higher than my apoapsis....
@Mgetz SublimeText and console ;)
user1804599
17:51
Use IntelliJ and Scala.
Xeo
Xeo
@ThePhD It would not make sense for std::conditional to do so.
79
A: Is it possible to write a C++ template to check for a function's existence?

XeoThis question is old, but with C++11 we got a new way to check for a functions existence (or existence of any non-type member, really), relying on SFINAE again: template<class T> auto serialize_imp(std::ostream& os, T const& obj, int) -> decltype(os << obj, void()) { os << obj; } template<...

?
@rightfold Everyone is getting sick of you trying to convince people to make everything into Scala ;)
8
C++ needs a way to get the signature of the function overload that would be called given a set of parameter types.
user1804599
@FredOverflow No, I tell them to switch to Scala. :P
@rightfold And there's no way to switch back, because Scala doesn't have switch ;)
user1804599
17:57
I want to write something in Clojure.
@rightfold which is as annoying.
user1804599
I am currently writing software for work.
@StackedCrooked how can you know
@BartekBanachewicz Well now he does =/
:P
17:58
yeah I know, I proved him right
lame, alas...
Also statistically, loungers who quit come back.
Pawnguy didn't :(
Unless you're Demigod panda
@Xeo Would expression SFINAE work the same with automatic return types?
T_T i've fallen into boost::spirit sigh
Xeo
Xeo
18:00
@MooingDuck There's a proposal for that
@NikosAthanasiou auto f() { ... }?
@Borgleader I dislike the fact that spirit, being 3 libraries, is labeled as one.
Xeo
Xeo
No, because deduced return type doesn't do SFINAE
Karma, Qi and that third one. Not Spirit :F
phoenix?
Xeo
Xeo
Spirit is Karma + Qi
And then there's Phoenix
user1804599
18:01
I’m going to propose marriage as an alternative for friendship. It will be the Marriage Proposal.
@Borgleader Lex //cc @Xeo
@Xeo another hit for automatic return types. If I ask a question on SO , would you be so kind to elaborate on this?
Xeo
Xeo
Sorry, I only got my info from Richard Smith on #llvm, and I really don't feel like answering SO questions atm. :P
@Xeo can I at least borrow the snippet from your answer (will reference you) to illustrate an example?
Xeo
Xeo
18:05
Sure
It's on SO, it's FFA
I keep trying to think of a way to make the indecies trick to log(n) "recursions" because it seems like it ought to be easy, but I haven't yet thought of a way.
@BartekBanachewicz watching a lecture, Douglas Crockford just called a .forEach in JS "monadic" and said not to use for loops or this haha.
@BenjaminGruenbaum ha!
user3010322
18:07
@Xeo ^ Anything look wrong with that?
Let me get some head start before I storm into the JS room
Xeo
Xeo
17
A: C++11: Compile-time Array with Logarithmic Evaluation Depth

XeoIf what you're using in the code is a weird form of the indices trick, here's an implementation that has O(log N) instantiations: // using aliases for cleaner syntax template<class T> using Invoke = typename T::type; template<unsigned...> struct seq{ using type = seq; }; template<class S1, cla...

?
Absolutely horrible, almost as horrible as his monads lecture.
@Xeo wow, ok
18:08
@BenjaminGruenbaum lol
@ThePhD Can't help reading those aliases as sfinae_big_tits and sfinae_small_tits
Its not up yet D:
Anticipation is the greatest kind of joy!
user3010322
This is retarded.
user3010322
18:12
THe trait reports correctly the value
user3010322
but when I use it with std::conditional it shits out the wrong type.
user3010322
??????????????????????????????????
user3010322
But it won't compile in my code, for what fucking reasons?!
@AndyProwl talking of sfinae, i just posted an answer based on one of your old sfinae answers.
18:19
@TemplateRex Ah, thanks for the reference
user3010322
Welp.
user3010322
I give up.
Xeo
Xeo
@ThePhD Who doesn't compile?
user3010322
@Xeo It doesn't matter anymore. c:
@AndyProwl It just happened I was wrestling with that very topic today, must be some cognitive bias that let me see this Q today
Xeo
Xeo
18:21
Also, did you even read my answer? Your SFINAE code sucks!
// Generated from Hello.g4 by ANTLR 4.2.2
import org.antlr.v4.runtime.Lexer;
import org.antlr.v4.runtime.CharStream;
import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.TokenStream;
import org.antlr.v4.runtime.*;   // LOL?
user3010322
@Xeo That's good to know...
hi
I am new to c++
4285
Q: The Definitive C++ Book Guide and List

grepsedawkThis question attempts to collect the few pearls among the dozens of bad C++ books that are published every year. Unlike many other programming languages, which are often picked up on the go from tutorials found on the Internet, few are able to quickly pick up C++ without studying a well-written...

@Bobthezealot Then this is probably not a channel for you. :D
18:26
Ok, but why?
bye!
Oh, I remember you.
Xeo
Xeo
@ThePhD Here's roughly how it should properly look, with proper expression SFINAE: coliru.stacked-crooked.com/a/67343b6778f55080
user3010322
How pretty.
goddamnit
every time I check, the game gives me a different answer as to when I'll get a Gilly encounter.
user3010322
AhahahAHAHAHAHAHA
user3010322
18:34
COMPILER RAN OUT OF HEAP SPACE
user3010322
AND YOU'RE USING 20 MB
user3010322
GOOD JOB VC++
user3010322
God why does even porting this over have to be a nightmare
@ThePhD How do you end up with a translation unit that requires 20mb?
include two Standard library headers
user3010322
18:36
How does VC++ run out of heap space at 20 megabytes?
user3010322
Haaaaaaaaaaaaaaaaaaahahahaaaaaaaaaaaaaaaaaaaaa
user3010322
FATAL ERROR C1001: COMPILER IS STUPID PLEASE DON'T PUT IT THROUGH ANYMORE CODE PLZ WE BEG U.
error_reporting(0);
???
Profit.
lo.
18:45
please this is UB :
int main()
{
int i=5;
printf("%d%d",i++,i--);
}
?
please stackoverflow.com
!
[so] newb
@fahdijbeli ...
YOU ARE BACK :)
@fahdijbeli Why don't you go to Stack Overflow?
@BartekBanachewicz printf("%d%d",i++,i--); just is UB or no please
@Jefffrey I don't found a similar problem
18:47
@fahdijbeli Then ask this question there.
@fahdijbeli why do you fucking care? Just don't write such code.
@fahdijbeli Then search harder as it's been asked a thousand times, at least.
ok I will ask my question
thanks
426
Q: Undefined Behavior and Sequence Points

Prasoon SauravWhat are "Sequence Points"? What is the relation between Undefined Behaviour and Sequence Points? I often use funny and convoluted expressions like a[++i] = i;, to make myself feel better. Why should I stop using them? If you've read this, be sure to visit the follow-up question Undefined Beha...

@fahdijbeli Don't, I'll close it as duplicate of this one ^
@ThePhD hey
18:50
ok thaks for your response and please down to question number 56 placement.freshersworld.com/power-preparation/…
2
ahahahahaha
user3010322
@melak47 ?
tell me this question is correct or no , why if is UB ,why is indicate as true ?
@fahdijbeli It depends. How much are you going to pay me?
@Jefffrey so the question is incorrect ?
user3010322
18:53
Does anyone know if Ninja supports recursive inputs and outputs?
btw here is LoungeChat replacement that actually works
@Jefffrey sorry ?
@ThePhD recursive?
I hate the idea of "preparing" for interviews. Because as soon as you prepare, it becomes harder to properly gauge what the person actually knows or artificially crammed into their brain.
user3010322
18:54
@melak47 *.cpp and the like
@fahdijbeli You are asking for a service. How much are you going to pay me?
@ThePhD not that I could see :E
look tomorrow I have an interview in C language for intership and I m beginner so help me just today
9
user3010322
... Ahahaha.
so I had a makefile find me all *.cpp's and build a ninja file :D
18:54
:lol:
user3010322
Oh, porting this over to a new build system is gonna suck....
@Jefffrey you joking or sure ?
@fahdijbeli can you set up a live stream?
user3010322
@fahdijbeli Fail the interview and stay out of the fucking industry.
@fahdijbeli I'm sure I'm laughing out loud.
user3010322
18:56
@Xeo My SFINAE code sucks, but it's the only code that will compile halfway sort of maybe-properly with VC++. Now I'm stuck in QtCreator, trying to mangle together what build system I should use to make ninja files for me and run the ninja builds.
user3010322
I've thrown CMake out the window, and there's no reason to use QMake or its pre-processing baking steps because I am not using the QtLibrary at all or its QML nonsense.
@ThePhD I have to pass my intership
user3010322
@fahdijbeli Pick a different internship that actually fits your skills.
@BartekBanachewicz It's the ugliest chat I've ever seen in my life.
user3010322
18:58
@Jefffrey But it's ~~extensible~~, so don't you worry!
@Jefffrey which is like the least important thing
Are you saying that my eyes are the least important thing?
the author is working on visuals as we speak
Because I'm pretty sure I won't be able to read much when they will start bleeding.
user3010322
@melak47 I don't have find... isn't there a natural recursive search built into makefiles?
18:59
@ThePhD yeah, maybe
but idk makefiles :v
user3010322
Mm.
user3010322
makefiles as my meta build system

« first day (1324 days earlier)      last day (3850 days later) »