I have a template class method
template
T pop();
Now I want to do a template specialization as follows,
Off the top of my head, I usually get around it by using a one-member struct:
template
struct pop_impl {
static T pop(classname& x); // normal function
};
template
struct pop_impl> {
static std::vector pop(classname& x); // specialized for std::vector
};
template
T classname::pop() { return pop_impl::pop(*this); }