Suppose I want to write a generic function void f(), which does one thing if T is a POD type and another thing if T is non-PO
void f()
T
I know this is an old question with the answer already accepted, but this might be a viable alternative:
template std::enable_if_t::value> f(T pod) { } template std::enable_if_t::value> f(T non_pod) { }