TITLE: template specialization PROBLEM: kbriggs@pd.uwa.edu.au Suppose I have something like... template class foo { T x; public: foo& operator=(const T& t){....} foo& operator=(const double& d){....} .... }; Now sometimes I want to use a foo, but then I get a compilation error due to the double definition of operator=. But if T is not double, I still want foo::operator=(double). How do I make this work? RESPONSE: pete@borland.com (Pete Becker), 22 Nov 95 You can specialize the template for foo. After the template definition, add in a special version for double: class foo { double x; public: foo& operator=(const double& d){....} .... }; The compiler will use this definition instead of the more general template whenever you create a foo.