I was experimenting with C++0x variadic templates when I stumbled upon this issue:
template < typename ...Args >
struct identities
{
typedef Args t
I think the reason it's not allowed is that it would be messy, and you can work around it. You need to use dependency inversion and make the struct storing the parameter pack into a factory template able to apply that parameter pack to another template.
Something along the lines of:
template < typename ...Args >
struct identities
{
template < template class T >
struct apply
{
typedef T type;
};
};
template < template class> class T >
struct convert_in_tuple
{
typedef typename T::type type;
};
typedef convert_in_tuple< identities< int, float >::apply >::type int_float_tuple;