ILE C/C++ Programmer's Guide

Manually Structuring Code for Single Instantiations

If you do not want to use either of the ILE C++ automatic instantiation methods of generating template definitions, you can structure your program in such a way that you define templates directly in your compilation units. The advantage of this approach is that modules are smaller and compile times are shorter than they are when you include template definitions everywhere.

When you structure your code manually for template instantiation, you avoid the potential problems that are associated with automatic instantiation. See Table 30 for a list of potential problems.

Use either or both of the following methods to structure code for single instantiations:

Note:
When you use these methods, you must specify the TEMPLATE(*NONE) compiler option to suppress automatic creation of IFS tempinc directories (or Data Management TEMPINC files). For more information about ILE C/C++ compiler options, see WebSphere Development Studio: ILE C/C++ Compiler Reference.


[ Top of Page | Previous Page | Next Page | Table of Contents ]