ILE C/C++ Compiler Reference
Specifies options to customize C++ template generation.
|--+-----------------------------------------------------+------|
| (1) (2) (3) .-*NONE----------------. |
'-TEMPLATE(---------------+-| TEMPLATE Details |-+--)-'
TEMPLATE Details:
.-*TEMPINC-----------. .-1-------. .-*NO----.
|--+-directory-pathname-+--+---------+--+--------+--------------|
'-1 65535-' +-*WARN--+
'-*ERROR-'
Notes:
- C++ compiler only
- Create Module command only
- Applicable only when using the Integrated File System (IFS)
The possible options are:
- *NONE
- No automatic template instantiation file is created. The compiler
instantiates all templates whose full implementation is known if an object of
that template class is defined, or if a call is made to that template function
within the module. If the full implementation is not known (for
example, you have a template class definition, but not the definition of the
methods of that template class), that template is not instantiated within the
module.
- Note:
- This can cause code duplication in program executables where template
specifications are used in more than one module.
- *TEMPINC
- Templates are generated into a directory named tempinc which is
created in the directory where the root source file was found. If the
source file is not a stream file, a file named TEMPINC will be created in the
library where the source file resides. The TEMPLATE(*TEMPINC) and
TMPLREG options are mutually exclusive.
- directory-pathname
- Same as *TEMPLATE(*TEMPINC), except that template instantiation
files are generated to a specified directory location. The directory
path can be relative to the current directory, or it can be an absolute
directory path.
If the specified directory does not exist, it is created.
- Note:
-
An error condition results if the specified directory path contains a
directory that does not exist, for example, TEMPLATE(/source/subdir1/tempinc)
when subdir1 does not exist.
- 1 65535
- Specifies the maximum number of template include files to be generated by
the *TEMPLATE(*TEMPINC) option for each header file. If not
specified, this setting defaults to 1. The maximum value for
this setting is 65535.
- *NO
- Default setting if TEMPLATE(*NONE) is not in effect. If
specified, the compiler does not parse to reduce the number of errors issued
in code written for previous versions of the compiler.
- Note:
- Regardless of the setting of this and the next two options, error messages
are produced for problems that appear outside implementations. For
example, errors found during the parsing or semantic checking of constructs
such as the following, always cause error messages:
- return type of a function template
- parameter list of a function template
- member list of a class template
- base specifier of a class template
- *WARN
- Parses template implementations and issues warning messages for semantic
errors. Error messages are also issued for errors found while
parsing.
- *ERROR
- Treats problems in template implementations as errors, even if the
template is not instantiated.
[ Top of Page | Previous Page | Next Page | Table of Contents ]
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.