<<< Default template arguments | Index | More on template specialization >>> |
Sometimes, you want certain template parameter types to be treated in a special way.
Usually, this is for efficiency.
As with function names, this is like overloading:
// General version comes first:
template < typename ValueT >
class Stack< ValueT > {
//...
};
// Specialization for char follows:
template < >
class Stack< char > {
//...
};
<<< Default template arguments | Index | More on template specialization >>> |