C++0xwas the working name of the ISO C++ 2011 standard, which introduced a host ofnew features into the standard C++ language and library. This project sought toimplement new C++11 features in GCC, and made it the first compiler to bringfeature-complete C++11 to C++ programmers.
C++11 features are available as part of the"mainline" GCC compiler in the trunk of GCC's Subversion repository and in GCC 4.3 and later. To enable C++0x support, add thecommand-line parameter -std=c++0x to your g++ command line. Or, to enable GNUextensions in addition to C++0x extensions, add -std=gnu++0x to your g++command line. GCC 4.7 and later support -std=c++11 and -std=gnu++11 as well.
Important: GCC's support for C++11 is still experimental. Some features were implementedbased on early proposals, and no attempt will be made to maintain backwardcompatibility when they are updated to match the final C++11 standard.
C++11 Language Features
Thefollowing table lists new language features that have been accepted into theC++11 standard. The "Proposal" column provides a link to the ISO C++committee proposal that describes the feature, while the "Available inGCC?" column indicates the first version of GCC that contains animplementation of this feature (if it has been implemented).
Forinformation about C++11 support in a specific version of GCC, please see:
- GCC 4.3 C++0x Status
- GCC 4.4 C++0x Status
- GCC 4.5 C++0x Status
- GCC 4.6 C++0x Status
- GCC 4.7 C++11 Status
- GCC 4.8 C++11 Status
Language Feature |
Proposal |
Available in GCC? |
Rvalue references |
Rvalue references for *this |
Initialization of class objects by rvalues |
Yes |
Non-static data member initializers |
Variadic templates |
Extending variadic template template parameters |
Initializer lists |
Static assertions |
auto-typed variables |
Multi-declarator auto |
Removal of auto as a storage-class specifier |
New function declarator syntax |
New wording for C++0x lambdas |
Declared type of an expression |
decltype and call expressions |
Right angle brackets |
Default template arguments for function templates |
Solving the SFINAE problem for expressions |
Template aliases |
Extern templates |
Yes |
Null pointer constant |
Strongly-typed enums |
Forward declarations for enums |
Generalized attributes |
Generalized constant expressions |
Alignment support |
Delegating constructors |
Inheriting constructors |
Explicit conversion operators |
New character types |
Unicode string literals |
Raw string literals |
Universal character name literals |
User-defined literals |
Standard Layout Types |
Defaulted and deleted functions |
Extended friend declarations |
Extending sizeof |
Inline namespaces |
Unrestricted unions |
Local and unnamed types as template arguments |
Range-based for |
Explicit virtual overrides |
Minimal support for garbage collection and reachability-based leak detection |
No |
Allowing move constructors to throw [noexcept] |
Defining move special member functions |
Concurrency |
|
|
Sequence points |
Yes |
Atomic operations |
Strong Compare and Exchange |
Bidirectional Fences |
Memory model |
Data-dependency ordering: atomics and memory model |
(memory_order_consume) |
Propagating exceptions |
Abandoning a process and at_quick_exit |
Allow atomics use in signal handlers |
Yes |
Thread-local storage |
Dynamic initialization and destruction with concurrency |
C99 Features in C++11 |
|
|
__func__ predefined identifier |
C99 preprocessor |
long long |
Extended integral types |
Yes |
C++11 Library Features
The status of the library implementation can be tracked inthis table
Historical Branches
C++0x Concepts Branch
Support for the Concepts feature, which is not part of C++11, is not under activedevelopment at this time. The prototype implementation, ConceptGCC, can be found on the branches/conceptgcc-branch.Previously there was a plan to develop a superior implementation on a separatedevelopment branch, branches/cxx0x-concepts-branch, but not much work was doneon that branch.
For questions related to the use of GCC, please consultthese web pages and the GCCmanuals. If that fails, the gcc-help@gcc.gnu.org mailing list might help. Comments on these web pages andthe development of GCC are welcome on our developer list at gcc@gcc.gnu.org.All of our lists have public archives.
Copyright (C) FreeSoftware Foundation, Inc. Verbatim copying anddistribution of this entire article is permitted in any medium, provided thisnotice is preserved.
These pages are maintained by the GCC team. Last modified 2013-04-24.
Pastedfrom <http://gcc.gnu.org/projects/cxx0x.html>