Possible duplicate:
Can brackets accept arbitrary identifiers as arguments? C ++
My question is using the batch decompress operator .... The following code fragment gives a compiler error (expected package of parameters up to "...", in the last line), in g ++ 4.7.1, and I wonder why.
template<class T> struct type_wrapper
{ typedef T type; };
template<class...Ts> struct variadic_wrapper { };
template<class...Ts> struct variadic_type_wrapper
{ typedef variadic_wrapper<typename type_wrapper<Ts>::type...> type; };
template<class...Ts> struct variadic_type_wrapper
{ typedef variadic_wrapper<(typename type_wrapper<Ts>::type)...> type; };
Is the expression (...)hiding the arch of the base type? Thanks for making this clear!
source
share