This question is similar to: c++ template specialization for all subclasses Instead of a templated function, now I have a member function of a templated class which needs to do different things based on base-class of the class-template
template<typename T>
class xyz
{
void foo()
{
if (T is a subclass of class bar)
do this
else
do something else
}
}
I couldn't find an easy to understand tutorial for boost::enable_if. so i cannot get the syntax right for this minor modification