TITLE: Partial template specialization PROBLEM: mossner@kotw0002.mch.sni.de (Werner Mossner) I've questions regarding the specialization of templates with more than one parameter: Is it possible to specialize such a template in only one of its parameter? RESPONSE: clamage@Eng.Sun.COM (Steve Clamage), 10 Aug 95 It is allowed by the draft standard, but few if any C++ implementations support it yet. It is a new language addition. If yes, what is the correct syntax for doing it? Example: template< class T, class U, int I > class A { // the primary template ... }; template< class T, class U > class A< T, U, 10 > { // partial specialization ... }; template< class T, int I > class A< class T, double, I > { // another partial }; That is, you omit the specialized items from the parameter list that follows "template", and use a template-id in place of a template-name in the header. When instantiating a template, partial specializations are checked before the primary (unspecialized) template is used. The full set of rules is pretty complicated. A a1; // uses first partial specialization A a2; // uses second partial specialization A a3; // uses primary template