This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/49225] [C++0x] Weird SFINAE behavior with variadic templates
- From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 30 May 2011 08:46:37 +0000
- Subject: [Bug c++/49225] [C++0x] Weird SFINAE behavior with variadic templates
- Auto-submitted: auto-generated
- References: <bug-49225-4@http.gcc.gnu.org/bugzilla/>
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.