Loading...
Select Version
&pagelevel(4)&pagelevel
The extensions described below are accepted in the C++ 2017 and C++ 2020 language modes, except when the option -R strict_errors
or ANSI-VIOLATIONS=*ERROR has been set in strict mode. Note that all extensions to ANSI/ISO C (see section “Extensions to ANSI/ISO C”) are also supported in the C++ modes.
A qualified name may be used in the declaration of a class member:
struct A { int A::f(); // ANSI requires int f(); };
In extended C++ 2017 mode and in extended C++ 2020 mode an implicit conversion between functions with "C" und "C++" linkage exists:
extern "C" void f(); void (*pf)() = &f;
In extended C++ 2017 mode and in extended C++ 2020 mode an implicit conversion from string literals to the type
char*
exists (in C++ 2017 string literals are of typeconst char *
):char *p1 = "abc"; char *p2 = x ? "abc" : "def";
- The preprocessor macro
c_plusplus
is defined in addition to the standard-compliant macro__cplusplus
. No warning is issued.