<<< Template specialization | Index | Template specialization trick >>> |
It's also possible to treat entire groups of types separately.
For example, you can treat all pointer-types differently compared to non-pointer types:
// Most general version goes first:
template < typename ValueT >
class Stack< ValueT > {
//...
};
// Specialization for pointer-types follows:
template < typename ValueT >
class Stack< ValueT* > {
//...
};
<<< Template specialization | Index | Template specialization trick >>> |