parameter of the superclass is specialized, while the Key template parameter remains generic. template <typename Key> class KeyStringPair : public KeyValuePair<Key, std::string> {}; It does not matter which template parameters are specialized and which remain generic. For instance, the following is also a valid example of a partial specialization of the original KeyValuePair class. template <typename Value> class IntegerValuePair : public KeyValuePair<int, Value> {}; Caveats C++ templates are not limited to classes - they can also be used to define function templates. Although function templates can be fully specialized, they cannot be partially specialized, irrespective of whether they are member function templates or non-member function templates. This can be beneficial to compiler writers, but affects the flexibility and granularity of what developers can do. But, function templates can be overloaded, which gives nearly the same effect as what partial function template specialization would have. The following examples are provided to illustrate these points. // legal: base function template template <typename ReturnType, typename ArgumentType> ReturnType Foo(ArgumentType arg); // legal: explicit/full function template specialization template <> std::string Foo<std::string, char>(char arg) { return "Full"; } // illegal: partial function template specialization of the return type // function template partial specialization is not allowed // template <typename ArgumentType> // void Foo<void, ArgumentType>(ArgumentType arg); // legal: overloads the base template for a pointer argument type template <typename ReturnType, typename ArgumentType> ReturnType Foo(ArgumentType *argPtr) { return "PtrOverload"; } // legal: base function name reused. Not considered an overload. ill-formed: non-overloadable declaration (see below) template <typename ArgumentType> std::string Foo(ArgumentType arg) { return "Return1"; } // legal: base function name reused. Not considered an overload. ill-formed: non-overloadable declaration (see below) template <typename ReturnType> ReturnType Foo(char arg) { return "Return2"; } In the example listed above, note that while the last two definitions of the function Foo are legal C++, they are considered ill-formed according to the standard because they are non-overloadable declarations. This is because the definition of function overloading only accounts for the function name, parameter type list and the enclosing namespace (if any). It does not account for the return type. However, these functions can still be called by explicitly indicating the signature to the compiler, as demonstrated by the following program. // note: to be compiled in conjunction with the definitions of Foo above int main(int argc, char *argv[]) { char c = 'c'; std::string r0, r1, r2, r3; // let the compiler resolve the