Is there any way of detecting whether a class is a normal type or is an instantiation of a template type (meta type) which may include non-type parameters?
I guess it is not possible.
Anyway, you can use the other way around and let N
be deduced:
template<class, class> struct MixedFoo;
template<class C, int N> struct MixedFoo<C, std::integral_constant<int, N>>{};
Now, this returns true
as expected:
std::cout << is_template<MixedFoo>() << std::endl; // fails here
Of course, you won't be able anymore to use MixedFoo
as MixedFoo<int, 2>
, so I'm not sure it's worth it.
No, there is not.
Note that template classes are not classes themselves. They are templates for classes.