« first day (211 days earlier)      last day (4730 days later) » 

4:00 PM
I doubt it
static_assert, rvalue references, decltype, lambdas, nullptr, auto is the list
along with a few libraries like function and shared_ptr
 
@DeadMG How does this behave? pastebin.com/Qy1NGj8U
 
1>blank.cpp(49): error C4519: default template arguments are only allowed on a class template
 
Too bad
 
yeah
I agree :P
aha
I made it work!
strange solution, but hey
at least, it does somewhat
 
That makes sense at least
 
Xeo
4:10 PM
does it select the right overload now?
 
doesn't check the return types, though
yes, it works, if you intended selection based on the argument types
it will still fail to select correctly on return type
 
Xeo
how exactly does that work? oo
 
well
there's no check that the return type of decltype and Ret are the same type
merely that an operator() exists which takes those arguments
 
Xeo
i meant the whole thingy, without enable_if
 
well, if you decltype something that doesn't exist, then it's obviously not a success
 
Xeo
4:16 PM
ah, ok
wondering why this isn't implemented in boost / msvc and gcc that way already. would make all error messages regarding the wrong signature way clearer
 
good question
 
@Xeo for std::function you mean?
 
well, msvc clearly doesn't do it because it doesn't quite work
but I don't see why GCC doesn't do that
 
aaahaha hello all
 
Xeo
@LucDanton yes
 
4:22 PM
not sure exactly how I'm going to cause a substitution failure without
I wonder something
hahaha
you want to know what's hilarious?
template<typename T> void test(typename std::enable_if<false, int>::type param) {
}
compilation error
template<typename T> void test(decltype(std::enable_if<false, int>::type) param) {
}
compilation succeeded!
 
Xeo
oh well, afk!
 
@DeadMG I guess that's proof that MSVC's decltype is unfinished
 
more like, why the hell doesn't the first one just cause a substitution failure?
 
Because it's not a deduced context (not sure about the terminology)
also the typename is superfluous
 
there is that
it didn't work when I tried to use that logic in the function constructor, though
 
4:28 PM
Where it was deduced/dependent on Func
or did you put a false too
 
no, I used the real logic there
 
Well that's leaving on the bleeding edge
My snapshot of gcc chokes on arrays of pointer to members in a template situation
ack, *living
 
lol
 
@DeadMG both should cause compile errors.
 
MSVC will die on pointers to arrays, but not references to them
or possibly the other way around, I can't quite recall
@Johannes: Well, I'd be rather grateful if you could answer this question
0
Q: MSVC10 SFINAE causing fatal error rather than substitution failure

DeadMGI've got a (relatively) brief code sample here. #include <type_traits> template<typename T> class function; template<typename Ret> class function<Ret()> { public: template<typename Func> function(Func f, typename std::enable_if<std::is_same<Ret, decltype(...

I've been playing with it for a while now, and managed to make some relatively crazy things happen, but can't make it work as it should
 
4:32 PM
MSVC bug?
 
lol
fair play
 
hello all
 
guys, what does this mean:
"@HowardHinnant: I knew better than to be clever, but I tried to piggyback on another op+ anyway."
i don't understand
 
Als
4:50 PM
Hey Guys
oh well Guys might be deemed sexist
let me just say, Hello All
:)
DEAD ROOM
 
lol
ohh hello girls too
 
Als
@JohannesSchaublitb: Hello starry guy ;)
 
@JohannesSchaublitb (From a non native speaker) "I knew that I shouldn't try to be clever but I tried to get my proposition bundled with another one." Would that make sense in context?
 
@AProgrammer ohh i see
tho why didn't that guy want to be clever?
seems dumb to try to not be clever...
 
4:58 PM
There is such a thing as too clever. And that's usually not clever at all.
 
i thought bundling propositions is always a clever thing -.-
 
@JohannesSchaublitb did you see the revision history and comment about preventing RVO?
 
@JohannesSchaublitb, probably related to fear of outsmarting oneself.
 
ohh!
@FredNurk you refer to my most recent SO question?
 
no, I refer to what that message links to:
14 mins ago, by Johannes Schaub - litb
i don't understand
 
5:01 PM
@FredNurk it was your comment I copied
and searched for enlightenment in this channel -.-
 
yes, does reading the RVO comment just above it and seeing the revision history for that answer help you understand?
 
@FredNurk nope -.-
 
I didn't understand that phrase "I knew better than to be clever" in this context
could have been a rhyme or something
 
@JohannesSchaublitb I overlooked an overload resolution ambiguity which howard found when compiling; my initial fix was "clever" and prevented RVO
as in: "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." -- Brian Kernighan
 
5:06 PM
ohh!
 
rlc
5:31 PM
@FredOverflow you really like that video, don't you? You've posted it twice in <24 hours already :-)
 
Xeo
5:48 PM
@FredOverflow Ahha, that guy :'D
oh, yeah, back etc
 
6:22 PM
@rlc The first time I posted it, there were ony two other people in this room, and Miss was unable to see it.
I guess the video also gives us an idea of how C++ programmers behave when their standards-compliant template code fails to compile.
 
 
3 hours later…
9:11 PM
Nv acquired Icera wondering if I get the whole phone on one chip
@FredOverflow lol what's that about?
 
9:46 PM
Anyone have experience installing mysql connector c++
 
Xeo
10:08 PM
@Johannes is on a trolling tour again
0
Q: Can I rely on my compiler to diagnose type mismatches within a TU?

Johannes Schaub - litbOn a search through the spec, it appears that my compiler isn't required to diagnose such mistakes as extern int a; extern float a; I previously thought that my compiler needs to diagnose that, but the spec says (emphasize added by me) After all adjustments of types (during which typedefs...

 
10:36 PM
This program terminates with "pointer being freed was not allocated":
#include <boost/program_options.hpp>

int main(int argc, char* argv[])
{
    boost::program_options::positional_options_description positional;
    return 0;
}
Ideas?
Boost v1.46.1
 
obviously your favourite implementation has a glitch
 
mm?
Do you get the same behaviour?
 
how would I know?
 
You'd try. Then you'd know.
 
Xeo
@wilhelmtell geh, would test, but I don't have the lib build
 
10:41 PM
kinda busy
 
11:00 PM
I think it might be because of mixed library versions. I don't know how it happened but it's the only way I see I can get such an error.
Ah. /lib/libboost*. Where did these come from? kill!
Nope, that's not it. I still get the same error.
Ok, need a break, that might be my problem.
 
Xeo
11:19 PM
*throws a break; @wilhelmtell
 

« first day (211 days earlier)      last day (4730 days later) »