RAD Studio
ContentsIndex
PreviousUpNext
E2411: Declaration of member function default parameters after a specialization has already been expanded (C++)

If a member function of a class template is declared, and then a specialization of that class implicitly instantiated, and later that member function defined with default parameters specified, the above error will result. For example:

template<int i>
class foo {
void method(int a, int b = i);
};
foo<10> x;
template<int i>
void foo<i>::method(int a = i, int b);  // error!
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!