i started reading this book c++ templates - the complete guide about templates...
in 3rd chapter {Specializations of Class Templates} it says
You can specialize a class template for certain template arguments. Similar to the overloading of function templates (see page 15), specializing class templates allows you to optimize implementations for certain types or to fix a misbehavior of certain types for an instantiation of the class template. However, if you specialize a class template, you must also specialize all member functions. Although it is possible to specialize a single member function, once you have done so, you can no longer specialize the whole class.
template<>
class Stack<std::string> {
…
};
i don't understand why use someone would want to use this specialization techinque.... to me it looks the same with an ordinary class...Whats the meaning of making a template class if you specialize it from the beggining?