#include <iostream>
template < int ... Ints >
struct IntList;
template < int H, int ... T >
struct IntList< H, T...>
{
static const int Head = H;
using Tail = IntList< T...> ;
} ;
template <>
struct IntList<> { } ;
template < typename IL>
struct ILength
{
static const int value = 1 + ILength< typename IL:: Tail > :: value ;
} ;
template <>
struct ILength< IntList<>>
{
static const int value = 0 ;
} ;
template < int Head, int ... Tail >
struct ICons;
template < int Head, int ... Tail >
struct ICons< Head, IntList< Tail...>>
{
using type = IntList< Head, Tail...> ;
} ;
/*
template <int Head, typename... Tail>
struct ICons;
template <int Head, typename... Tail>
struct ICons<Head, IntList<Tail...>>
{
using type = IntList<Head, Tail...>;
};
*/
int main( )
{
return 0 ;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKCnRlbXBsYXRlIDxpbnQuLi4gSW50cz4Kc3RydWN0IEludExpc3Q7Cgp0ZW1wbGF0ZSA8aW50IEgsIGludC4uLiBUPgpzdHJ1Y3QgSW50TGlzdDxILCBULi4uPgp7CglzdGF0aWMgY29uc3QgaW50IEhlYWQgPSBIOwoJdXNpbmcgVGFpbCA9IEludExpc3Q8VC4uLj47Cn07Cgp0ZW1wbGF0ZTw+CnN0cnVjdCBJbnRMaXN0PD4ge307Cgp0ZW1wbGF0ZSA8dHlwZW5hbWUgSUw+CnN0cnVjdCBJTGVuZ3RoCnsKCXN0YXRpYyBjb25zdCBpbnQgdmFsdWUgPSAxICsgSUxlbmd0aDx0eXBlbmFtZSBJTDo6VGFpbD46OnZhbHVlOwp9OwoKdGVtcGxhdGUgPD4Kc3RydWN0IElMZW5ndGg8SW50TGlzdDw+Pgp7CglzdGF0aWMgY29uc3QgaW50IHZhbHVlID0gMDsKfTsKCnRlbXBsYXRlIDxpbnQgSGVhZCwgaW50Li4uIFRhaWw+CnN0cnVjdCBJQ29uczsKCnRlbXBsYXRlIDxpbnQgSGVhZCwgaW50Li4uIFRhaWw+CnN0cnVjdCBJQ29uczxIZWFkLCBJbnRMaXN0PFRhaWwuLi4+Pgp7Cgl1c2luZyB0eXBlID0gSW50TGlzdDxIZWFkLCBUYWlsLi4uPjsKfTsKCi8qCnRlbXBsYXRlIDxpbnQgSGVhZCwgdHlwZW5hbWUuLi4gVGFpbD4Kc3RydWN0IElDb25zOwoKdGVtcGxhdGUgPGludCBIZWFkLCB0eXBlbmFtZS4uLiBUYWlsPgpzdHJ1Y3QgSUNvbnM8SGVhZCwgSW50TGlzdDxUYWlsLi4uPj4KewoJdXNpbmcgdHlwZSA9IEludExpc3Q8SGVhZCwgVGFpbC4uLj47Cn07CiovCgoKaW50IG1haW4oKQp7CglyZXR1cm4gMDsKfQ==
compilation info
prog.cpp:33:35: error: type/value mismatch at argument 2 in template parameter list for ‘template<int Head, int ...Tail> struct ICons’
struct ICons<Head, IntList<Tail...>>
^~
prog.cpp:33:35: note: expected a constant of type ‘int’, got ‘IntList<T ...>’
stdout