1 1 7 Extensions to the C++ Language 1 ******************************** 1 1 The GNU compiler provides these extensions to the C++ language (and you 1 can also use most of the C language extensions in your C++ programs). 1 If you want to write code that checks whether these features are 1 available, you can test for the GNU compiler the same way as for C 1 programs: check for a predefined macro '__GNUC__'. You can also use 11 '__GNUG__' to test specifically for GNU C++ (⇒Predefined Macros (cpp)Common Predefined Macros.). 1
1 · C++ Volatiles What constitutes an access to a volatile object. · Restricted Pointers C99 restricted pointers and references. · Vague Linkage Where G++ puts inlines, vtables and such. · C++ Interface You can use a single C++ header file for both 1 declarations and definitions. · Template Instantiation Methods for ensuring that exactly one copy of 1 each needed template instantiation is emitted. · Bound member functions You can extract a function pointer to the 1 method denoted by a '->*' or '.*' expression. · C++ Attributes Variable, function, and type attributes for C++ only. · Function Multiversioning Declaring multiple function versions. · Type Traits Compiler support for type traits. · C++ Concepts Improved support for generic programming. · Deprecated Features Things will disappear from G++. · Backwards Compatibility Compatibilities with earlier definitions of C++. 1