Originally posted by: Michael_Wong
ATTENTION: this blog post is now old information, kept here only for older service compiler information purposes. A new blog will show the new XLC++ 13.1.2 and future compiler's C++ Standard Compliance Status.
C++11 (which was codenamed C++0x until ratification) is the new C++ programming language standard that has just been
ratified and
published. It supersedes the C++ 2003 (which was a bug fix on the C++ 1998) Standard and is called officially ISO/IEC 14882: 2011
IBM's xlC (C++) compiler has started supporting C++11 since 2008 in V10.1 with an extensive list of C++11 features. Our current release is now at V12.1 on AIX and Linux and V2R1 for z/OS. Most other compilers have similar plans phasing in the large number of features over multiple releases. The latest compiler support is
here.
Here is a list of C++11 features supported over several releases of XL C/C++.
pSeries AIX and Linux systems:
C++11 features supported in XL C/C++ for AIX V10.1 and XL Linux for Linux V10.1 released in mid 2008:
- -qlanglvl=extended0x option (umbrella option for all future C++0x features)
- Long long
- sync C99 preprocessor:
- Empty macro arguments
- Variadic macros
- Trailing comma in enum definition
- Concatenation of mixed-width string literal
The compiler documentation is available
online.
C++11 Features supported in XL C/C++ for AIX V11.1 and XL C/C++ for Linux V11.1 released in mid 2010 (including previous AIX and Linux released features):
- Variadic template
- Auto
- Decltype
- Namespace association
- Delegating constructor
- Static assert
- extern template
- extended friend
- -qwarn0x
In addition, it also has been tested with Boost Libraries V1.40.
The compiler documentation is available
online.
C++11 features supported in XL C/C++ for AIX/Linux for V12.1 released in mid 2012 (including previous AIX and Linux released features)
- Explicit conversion operator
- Generalized const expr
- Rvalue reference
- Right angle bracket
- Scoped enum
- Forward declaration of enums
- Trailing return
- C11 complex
- C11 _Noreturn
- C11 Anonymous structs
In addition, it also has been tested with
Boost Libraries V1.47.
The compiler documentation is available
online.
C++11 features supported in XL C/C++ for AIX/Linux for V13.1 released in mid 2014 (including previous AIX and Linux released features)
- Defaulted and deleted functions
- The nullptr keyword
In addition, it also has been tested with
Boost Libraries V1.55.
The compiler documentation is available
online.
zSeries Systems:
C++11 features supported in z/OS XL C/C++ V1R11:
- Extern template
- Extended friend
- -qwarn0x
The compiler documentation is available
online.
C++ 11 features supported in z/OS XL C/C++ V1R12 (including previous z/OS released features):
- Long long
- sync C99 preprocessor
- Empty macro arguments
- Variadic macros
- Trailing comma in enum definition
- Concatenation of mixed-width string literal
- Auto
- Decltype
- Variadic template
- Namespace association
- Delegating constructor
- Static assert
The compiler documentation is available
online.
C++ 11 features supported in z/OS XL C/C++ V1R13 (including previous z/OS released features):
- QOI Message
- Trailing return
The compiler documentation is available
online.
C++11 features supported in z/OS XL C/C++ V2R1 (including previous z/OS released features):
- Explicit Conversion Operators
- Generalized constant expressions
- Right Angle Brackets
- Scoped Enum
The compiler documentation is available online.
We plan to continue our drive and commitment to fully support C++11 in future compiler releases.
C++11 library support is also planned for the future. So stay tuned.
Here is what it looks like in table format comparable to what other Open Source compilers have shown:
C++11 Language Feature |
C++11 Proposal |
Available in XL AIX/Linux? |
Rvalue references |
N2118 |
12.1 (Superceded by N3290) |
Rvalue references for *this |
N2439 |
|
Initialization of class objects by rvalues |
N1610 |
Superceded by N3290 |
Non-static data member initializers |
N2756 |
|
Variadic templates |
N2242 |
11.1 |
Extending variadic template template parameters |
N2555 |
|
Initializer lists |
N2672 |
started in 13.1 |
Static assertions |
N1720 |
11.1 |
auto -typed variables |
N1984 |
11.1 |
Multi-declarator auto |
N1737 |
11.1 |
Removal of auto as a storage-class specifier |
N2546 |
11.1 |
New function declarator syntax |
N2541 |
11.1 |
Lambda expressions |
N2927 |
|
Declared type of an expression |
N2343 |
11.1 |
Incomplete return types |
N3276 |
|
Right angle brackets |
N1757 |
12.1 |
Default template arguments for function templates |
DR226 |
12.1 ptf |
Solving the SFINAE problem for expressions |
DR339 |
8.0 |
Alias templates |
N2258 |
|
Extern templates |
N1987 |
12.1 |
Null pointer constant |
N2431 |
13.1 |
Strongly-typed enums |
N2347 |
12.1 |
Forward declarations for enums |
N2764
DR1206 |
12.1 |
Standardized attribute syntax |
N2761 |
|
Generalized constant expressions |
N2235 |
12.1 (partial) |
Alignment support |
N2341 |
|
Conditionally-support behavior |
N1627 |
|
Changing undefined behavior into diagnosable errors |
N1727 |
|
Delegating constructors |
N1986 |
11.1 |
Inheriting constructors |
N2540 |
|
Explicit conversion operators |
N2437 |
12.1 |
New character types |
N2249 |
|
Unicode string literals |
N2442 |
10.1 (partial, only UTF16,32) |
Raw string literals |
N2442 |
|
Universal character names in literals |
N2170 |
7 |
User-defined literals |
N2765 |
|
Standard Layout Types |
N2342 |
|
Defaulted functions |
N2346 |
13.1 |
Deleted functions |
N2346 |
13.1 |
Extended friend declarations |
N1791 |
11.1 |
Extending sizeof |
N2253
DR850 |
11.1 |
Inline namespaces |
N2535 |
11.1 |
Unrestricted unions |
N2544 |
|
Local and unnamed types as template arguments |
N2657 |
|
Range-based for |
N2930 |
|
Explicit virtual overrides |
N2928
N3206
N3272 |
|
Minimal support for garbage collection and reachability-based leak detection |
N2670 |
N/A |
Allowing move constructors to throw [noexcept] |
N3050 |
|
Defining move special member functions |
N3053 |
|
Concurrency |
Sequence points |
N2239 |
|
Atomic operations |
N2427 |
|
Strong Compare and Exchange |
N2748 |
|
Bidirectional Fences |
N2752 |
|
Memory model |
N2429 |
|
Data-dependency ordering: atomics and memory model |
N2664 |
|
Propagating exceptions |
N2179 |
|
Allow atomics use in signal handlers |
N2547 |
|
Thread-local storage |
N2659 |
10.1 (partial, all except Std name and dynamic init) |
Dynamic initialization and destruction with concurrency |
N2660 |
|
C99 Features in C++11 |
__func__ predefined identifier |
N2340 |
8.0 |
C99 preprocessor |
N1653 |
10.1 |
long long |
N1811 |
10.1 |
Extended integral types |
N1988 |
N/A |
While we have started working on C++11 library, it will be delivered in future releases. On Linux, it will be similar to the GCC status when delivered since we use the GCC headers and library on the platform:
https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso