If I understand your goals correctly, you can do it
template<typename T1,typename T2 > void foo(T1, T2) { static_assert(sizeof(T1) == 0,"Did not overload all foo's"); } template<> void foo<const char *a, const char *b>() { ... Handle this case } ... ect ect ect
This has the advantage that you process every instance that you want explicitly, generating a compilation error if you missed it.
source share