Chapter Contents

Previous

Next
Templates

Template Parameters

The SAS/C C++ Development System supports nontype template parameters as described in the ANSI draft C++ standard. Nontype template parameters types must be

Nontype template parameters can use previously declared template parameters in their declaration type. However, template parameters cannot be used in subexpressions within the type. For example:

template <class T, T* someObject>
class C { . . . };
int p;
C <int, &p> c;
template <int I, int a[I]* pArray> class C2; // ok
template <int I,
          int a[I*100]* pBigArray>  // error because
                           // of subexpression I*100
class C2;


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.