The C++ compiler has additional extensions that you can activate. There is no item in the C/C++ Language Panel to activate these extensions. You must turn on the pragma cpp_extensions.
If this pragma is on, the compiler lets you use these extensions to the ANSI/ISO C++ standard:
#pragma cpp_extensions on
void foo()
{
union {
long hilo;
struct { short hi, lo; };
// anonymous struct
};
hi=0x1234;
lo=0x5678;
// hilo==0x12345678
}#pragma cpp_extensions on
struct Foo { void f(); }
void Foo::f()
{
void (Foo::*ptmf1)() = &Foo::f;
// ALWAYS OK
void (Foo::*ptmf2)() = f;
// OK, if cpp_extensions is on.
}See also "cpp_extensions" and "Checking Options."