RAD Studio |  |

E2388: Argument list of specialization cannot be identical to the parameter list of primary template (C++)

When declaring a partial specialization, its specialization argument list must differ in some way from its basic parameter list. For example:

template<class T>

Copy Code

    class foo;

Copy Code

    template<class T>

Copy Code

    class foo<T *>;     // OK: is more specialized than primary template

Copy Code

    template<class T>

Copy Code

    class foo<T>;       // error: identical to primary template

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!