RAD Studio
ContentsIndex
PreviousUpNext
E2408: Default values may be specified only in primary class template declarations

Template functions, and class partial specializations, may not use default expressions in their template parameter lists. Only primary template declarations may do this. For example:

template<class T = int>
class foo;// OK: primary class template
template<class T = int>
void bar();// error: template function
template<class T = int>
class foo<T *>;// error: partial specialization
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!