This option controls whether parsing and semantic checking are applied to template definitions (class template definitions, function bodies, member function bodies, and static data member initializers) or only to template instantiations. The compiler can check function bodies and variable initializers in template definitions and produce error or warning messages.
.-no----. >>- -q--tmplparse--=--+-warn--+-------------------------------->< '-error-'
where suboptions are:
no Do not parse the template definitions. This reduces the number of errors issued in code written for previous versions of VisualAge C++ and predecessor products. This is the default. warn Parses template definitions and issues warning messages for semantic errors. error Treats problems in template definitions as errors, even if the template is not instantiated.
This option applies to template definitions, not their instantiations. Regardless of the setting of this option, error messages are produced for problems that appear outside definitions. For example, errors found during the parsing or semantic checking of constructs such as the following, always cause error messages:
See also Using C++ templates.