I want to have a template class that looks something like what I have down below. Then, I want a function in it with a template specialization depending on a CLASS template para
struct Otherwise { };
template struct C : Otherwise { };
// don't use _Uppercase - those names are reserved for the implementation
// (i removed the '_' char)
template
class Foo
{
public:
void Func() { Func(C()); }
private:
// If num == 1, I want to call this function...
void Func(C<1>)
{
printf("Hi 1!");
}
// If num == 2, I want to call this function...
void Func(C<2>)
{
printf("Hi 2!");
}
// Otherwise, I want to call this version.
void Func(Otherwise)
{
printf("Hello world!");
}
//// alternative otherwise solution:
// template
// void Func(C) { .. }
};