Team LiB   Previous Section   Next Section
export specifier Exported template specifier

template-decl ::= [export] template < template-parm-list > declaration

The export specifier declares a template to be exported. An exported template lets you compile the definitions of a function template, or the member definitions of a class template, separately from the template's declaration.

figs/acorn.gif

Most compilers do not support export.

Example

export template<typename T>
class point {
public:
  point(T x, T y);
};
export template<typename T>
point::point(T x, T y) {
  ...
}

See Also

template, Chapter 7

    Team LiB   Previous Section   Next Section