https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64519
Bug ID: 64519 Summary: variadic template as the first argument Product: gcc Version: 4.9.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: roman.kurc at wp dot pl Created attachment 34392 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34392&action=edit sample code It seems that passing an empty argument to a variadic template results in assigning void type to the argument. Such a behavior can be seen in the following cases: static_assert( std::is_same< decltype(B::test()), B::CharA<3> >::value == false, "test( ) should evaluate to fun( )" ); test( TA... args ) is called with no parameters then I<TA...>::template sfinae_2<B>(args...,0) and args... gets void type. The same happens in calls presented below and it does not matter if template is instantinated or only its type is deduced. static_assert( (sizeof(B::test()) == sizeof(B::CharA<1>)), "test( ) should evaluate to fun ()" ); static_assert( std::is_same< decltype(B::test()), B::CharA<1> >::value, "test() should evaluate to fun()" );