| Syntax: | Default: |
| lang(compatFriendDeclarations[,
yes]) lang(compatFriendDeclarations, no) |
lang(compatFriendDeclarations[, yes]) |
This option controls whether friend declarations that name classes without elaborated class names are treated as C++ errors.
By default, VisualAge C++ lets you declare a friend class without elaborating the name of the class with the keyword class. This is an extension to the C++ standard and gives behavior that is compatible with the C++ compilers provided by earlier versions of VisualAge C++ and predecessor products, and Microsoft Visual C++.
For example, the statement below declares the class IFont to be a friend class and is valid when compatFriendDeclarations is set to yes.
friend IFont;
Set compatFriendDeclarations to no for compliance with standard C++. The example declaration above causes a warning unless you modify it to the statement below, or suppress the message with report(disable, "CPPC0070").
friend class IFont;
![]()
Incremental C++ Builds
Configuration Files
![]()
Language Options for C++
Build Options for Compliance With the C++
Standard
Build Options for Compatibility with Old
C++ Compilers
