I have a template class method
template
T pop();
Now I want to do a template specialization as follows,
A possible solution is a non-member function implemented like this
template
struct classname_pop
{
static T pop(classname &obj) { return obj.pop() ;}
}
template
struct classname_pop>
{
static std::vector pop(classname &obj) {obj.specialized_pop() ;}
}
template
T classname_pop(classname &obj)
{
return classname_pop_t::pop() ;
}