GNU Info

Info Node: (gcc-300.info)C++ Extensions

(gcc-300.info)C++ Extensions


Next: Objective C Prev: C Extensions Up: Top
Enter node , (file) or (file)node

Extensions to the C++ Language
******************************

   The GNU compiler provides these extensions to the C++ language (and
you can also use most of the C language extensions in your C++
programs).  If you want to write code that checks whether these
features are available, you can test for the GNU compiler the same way
as for C programs: check for a predefined macro `__GNUC__'.  You can
also use `__GNUG__' to test specifically for GNU C++ (Note: Standard
Predefined Macros.).

Min and Max
C++ Minimum and maximum operators.
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
declarations and definitions.
Template Instantiation
Methods for ensuring that exactly one copy of
each needed template instantiation is emitted.
Bound member functions
You can extract a function pointer to the
method denoted by a `->*' or `.*' expression.
C++ Attributes
Variable, function, and type attributes for C++ only.
Java Exceptions
Tweaking exception handling to work with Java.
Deprecated Features
Things might disappear from g++.
Backwards Compatibility
Compatibilities with earlier definitions of C++.

automatically generated by info2www version 1.2.2.9