This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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 <daniel.kruegler at googlemail dot com> 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<T, U>...

for different T, U to the specialization is_same<T, T> in this scenario - which
is obviously incorrect. This could be concluded after either removing the
is_same<T, T> definition or by changing its value to false. When removing the
definition, the occurring error message reveals, that the instantiation of
is_same<A, A> instead of is_same<int, A> is tried, thus pointing to an
incorrect expansion that does ignore the _Args1 expansion.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]