RAD Studio
ContentsIndex
PreviousUpNext
E2480: Cannot involve template parameters in complex partial specialization arguments (C++)

A partial specialization cannot reference other template parameters in a nonvalue argument expression, unless it is simply a direct reference to the template parameter. For example:

template<int A, int B, int C> class foo;

 

template<int A> class foo<A+5, A, A+10>;

The partial specialization has two illegal arguments. 'A+5' is a complex expression because it uses 'A' in a manner other than as merely a direct argument. The reference to plain 'A' in the second argument is fine, but the third argument is also illegal because it references 'A' in a complex manner as well.

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