Why is there no specific type in the variation package?
template< typename T > class Foo { public: template< typename... Values > void bar( Values... values ) { } template< T... values > <-- syntax error void bar( T... values ) { } template< int... values > <-- syntax error void bar( int... values ) { } };
What justification does not allow this?
Are there any suggestions for this?
Note: alternatives would be
std::initializer_list< T > without constriction and syntax { } -brace- a (ugly) recursive trait that checks all types separately: see here
c ++ language-lawyer c ++ 11 templates variadic-templates
nonsensation
source share