[Bug c++/56774] [4.7/4.8/4.9 Regression] G++ 4.8 reverses variadic template types during unpacking
w.shane.grant at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Mar 29 00:21:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56774
--- Comment #4 from Shane <w.shane.grant at gmail dot com> 2013-03-29 00:21:32 UTC ---
(In reply to comment #1)
> We badly need a reduced testcase not using the whole <tuple> (not to mention
> <iostream> of course)
Here's a more reduced test case.
template <class ... Args>
struct mytype {};
template <class T, class ... Args>
void something( mytype<T, Args...> )
{ }
int main()
{
// Compiles OK in GCC 4.6.3 but NOT 4.8
something<int, char, bool>( mytype<int, char, bool>() );
// Compiles OK in GCC 4.8 but NOT 4.6.3
something<int, bool, char>( mytype<int, char, bool>() );
return 0;
}
I tried to make simpler cases using purely variadic templates (e.g. no class
T), but the issue only shows up when there is an individually named template
parameter as well as a variadic pack. To get the error to show up it also
requires types that cannot be implicitly converted to each other.
More information about the Gcc-bugs
mailing list