Sun Studio 12: C++ User's Guide

6.3.2.2 Explicit Instantiation of Template Classes

To instantiate a template class explicitly, follow the template keyword by a declaration (not definition) for the class, with the class identifier followed by the template arguments.


template class Array<char>;

template class String<19>;

When you explicitly instantiate a class, all of its members are also instantiated.