Template Instantiation

The Intel® C++ Compiler supports extern template, which lets you specify that a template in a specific translation unit will not be instantiated because it will be instantiated in a different translation unit or different library. The compiler now includes additional support for:

You can now use the following options to gain more control over the point of template instantiation:

Option

Description

-fno-implicit-templates

Never emit code for non-inline templates which are instantiated implicitly (i.e. by use). only emit code for explicit instantiations.

-fno-implicit-inline-templates

Do not emit code for implicit instantiations of inline templates either. The default is to handle inlines differently so that compilations, with and without optimization, will need the same set of explicit instantiations.

See Also


Submit feedback on this help topic

Copyright © 1996-2010, Intel Corporation. All rights reserved.