Is it possible to specialize a templatized method for enums?
Something like (the invalid code below):
template
void f(T value);
t
I'm not sure if I understand your question correctly, but you can instantiate the template on specific enums:
template
void f(T value);
enum cars { ford, volvo, saab, subaru, toyota };
enum colors { red, black, green, blue };
template <>
void f(cars) { }
template <>
void f(colors) { }
int main() {
f(ford);
f(red);
}