RAD Studio
ContentsIndex
PreviousUpNext
E2389: Mismatch in kind of substitution argument and template parameter 'parameter' (C++)

When referencing a template specialization, all type parameters must be satisfied using type arguments, all non-type parameters require non-type arguments, and all template template parameters require either a template name, or another template template argument. Mismatching these requirements in any way will trigger the above error. For example:

template<class T, int U, template<class V> class W>
class foo;
foo<char, 10, foo> x;    // OK: all parameter kinds match
foo<10, char, int> y;    // error: no parameter kinds match at all!
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!