In my template-ized function, I\'m trying to check the type T is of a specific type. How would I do that?
p/s I knew the template specification way but I don\'t want
Instead of checking for the type use specializations. Otherwise, don't use templates.
template int foo(T a) {
// generic implementation
}
template<> int foo(SpecialType a) {
// will be selected by compiler
}
SpecialType x;
OtherType y;
foo(x); // calls second, specialized version
foo(y); // calls generic version