This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/56774] [4.7/4.8/4.9 Regression] G++ 4.8 reverses variadic template types during unpacking
- From: "d.frey at gmx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 29 Mar 2013 00:09:10 +0000
- Subject: [Bug c++/56774] [4.7/4.8/4.9 Regression] G++ 4.8 reverses variadic template types during unpacking
- Auto-submitted: auto-generated
- References: <bug-56774-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56774
Daniel Frey <d.frey at gmx dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |d.frey at gmx dot de
--- Comment #2 from Daniel Frey <d.frey at gmx dot de> 2013-03-29 00:09:10 UTC ---
Here's a reduced testcase without any includes:
template< typename... > struct tuple {};
template< typename T, typename... Ts >
void f( tuple< T, Ts... >& ) {}
int main()
{
tuple< int, bool, char > t;
f< int, char, bool >(t);
}
This compiles with GCC 4.7.2 and GCC 4.8.0, but it shouldn't.
GCC 4.6.3 and Clang 3.2 reject the code as expected.
Output from GCC 4.6.3:
Compilation finished with errors:
source.cpp: In function 'int main()':
source.cpp:9:26: error: no matching function for call to 'f(tuple<int, bool,
char>&)'
source.cpp:9:26: note: candidate is:
source.cpp:4:6: note: template<class T, class ... Ts> void f(tuple<T, Ts ...>&)