Technical data
Cray Standard C/C++ Reference Manual
when checking for compatibility, therefore, the following statements declare
the overloading of two functions named f:
int f(int);
int f(x) char x; { return x; }
Note: In C, this code is legal, but has a different meaning. A tentative
declaration of f is followed by its definition.
B.3 Extensions Accepted in Normal C++ Mode
The following C++ extensions are accepted (except when strict standard
conformance mode is enabled, in which case a warning or caution message
may be issued):
• A friend declaration for a class can omit the class keyword, as shown
in the following example:
class B;
class A {
friend B; // Should be "friend class B"
};
• Constants of scalar type can be defined within classes, as shown in the
following example:
class A {
const int size=10;
int a[size];
};
• In the declaration of a class member, a qualified name can be used, as shown
in the following example:
struct A {
int A::f(); // Should be int f();
}
• An assignment operator declared in a derived class with a parameter type
matching one of its base classes is treated as a “default” assignment operator;
that is, such a declaration blocks the implicit generation of a copy assignment
operator. This is cfront behavior that is known to be relied upon in at least one
widely used library. The following is an example:
162 S–2179–36










