This answer provides a C++11
solution for the problem of overloading a template class based on the number of template parameters.
However, this approach seems to work only if the new template parameters are types, meaning this
template <typename ... Ts> struct awesome;
template <typename T, typename U> struct awesome<T, U> {};
template <typename T, unsigned int I, typename U> struct awesome<T, I, U> {};
int main() {
awesome<int,float> aw;
awesome<int,42,float> aw2;
}
does not compile. Can the desired behaviour achieved using a different approach?