[Bug c++/49225] [C++0x] Weird SFINAE behavior with variadic templates
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49225 --- Comment #4 from Paolo Carlini 2011-06-15 19:20:34 UTC --- I see. Thus for the time being I'm probably going to use something like the workaround suggested by Daniel in private email.
[Bug c++/49225] [C++0x] Weird SFINAE behavior with variadic templates
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49225 Jason Merrill changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC||jason at gcc dot gnu.org Resolution||DUPLICATE --- Comment #3 from Jason Merrill 2011-06-15 18:01:56 UTC --- Yeah, this is a tricky one. *** This bug has been marked as a duplicate of bug 48322 ***
[Bug c++/49225] [C++0x] Weird SFINAE behavior with variadic templates
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49225 --- Comment #2 from Paolo Carlini 2011-05-30 09:20:30 UTC --- Thanks Daniel. Depending on how this issue is resolved - at this point I'm pretty sure it's an actual issue - given also the inconsistency vs the static_assert, I will actually use something similar in the library.
[Bug c++/49225] [C++0x] Weird SFINAE behavior with variadic templates
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49225 --- Comment #1 from Daniel Krügler 2011-05-30 08:46:33 UTC --- I did some further investigation of this. The problem seems *not* to be located in __my_and_, but it seems that the compiler expands is_same... for different T, U to the specialization is_same in this scenario - which is obviously incorrect. This could be concluded after either removing the is_same definition or by changing its value to false. When removing the definition, the occurring error message reveals, that the instantiation of is_same instead of is_same is tried, thus pointing to an incorrect expansion that does ignore the _Args1 expansion.