| Syntax: | Default: |
| lang(compatTemplateSpecialization[,
yes]) lang(compatTemplateSpecialization, no) |
lang(compatTemplateSpecialization[, yes]) |
This option controls whether template specializations that do not conform to the C++ standard are allowed.
By default, VisualAge C++ allows these specializations. This is an extension to standard C++ and gives behavior that is compatible with the C++ compilers provided by VisualAge C++ for OS/2 3.0, VisualAge for C++ for Windows version 3.5, and Microsoft Visual C++.
When this option is set to yes, you receive a warning if your code uses the extension, unless you suppress the message with report(disable, "CPPC0080").
For example, you can explicitly specialize the template class ribbon for type char with the following lines:
template<class T> class ribbon { /*...*/};
class ribbon<char> { /*...*/};
Set compatTemplateSpecialization to no for compliance with standard C++. In the example above, the template specialization must be modified to:
template<class T> class ribbon { /*...*/};
template<> class ribbon<char> { /*...*/};
![]()
Incremental C++ Build
Configuration Files
![]()
Language Options for C++
Build Options
Build Options for Compliance With the C++
Standard
Build Options for Compatibility with Old
C++ Compilers
