C++11 Features Supported by Intel® C++ Compiler


Starting in 11.0 the Intel(R) C++ Compiler has supported some of the C++11 features (previously called C++0x). With the latest release of Intel C++ Composer XE for Windows*, Linux* and Mac OS* X 2013 SP1, more C++11 features are supported.

Standard# Core Language Features Version 11.1 Version 12.0 Version 12.0 Update 6 or 12.1 Version 13.0 Version 14.0
N1610 Initialization of class objects by rvalues Yes Yes Yes Yes Yes
N1720 static_assert Yes Yes Yes Yes Yes
N1737 Multi-declarator auto - Yes Yes Yes Yes
N1757 Right angle brackets Yes Yes Yes Yes Yes
N1791 Extended friend declarations Partial Yes Yes Yes Yes
N1984 auto: Deducing the type of variable from its initializer expression - Yes Yes Yes Yes
N1986 Delegating constructors - - - - Yes
N1987 Extern templates Yes Yes Yes Yes Yes
N2118 Rvalues references - Yes Yes Yes Yes
N2170 Universal character names in literals - - Yes Yes Yes
N2235 Generalized constant expressions - - - Partial Yes
N2242 variadic templates v0.9 - - Yes Yes Yes
N2249 char16_t/char32_t types - - Partial on Windows;
Yes on Linux & Mac OS X
Partial on Windows;
Yes on Linux & Mac OS X
Yes
N2253 Extended sizeof - - - - -
N2258 alias templates - - Yes Yes Yes
N2341 Alignment: Adding Alignment Support to the C++ Programming Language - - - - -
N2342 Standard-layout and trivial types - - - - -
N2343 decltype v1.0 - Yes Yes Yes Yes
N2346 deleted and defaulted functions - Yes Yes Yes Yes
N2347 Explicit enum bases and scoped enums - - - Yes Yes
N2347 Strongly typed enums Partial Partial Partial Partial Yes
N2431 nullptr - - Yes Yes Yes
N2437 Explicit conversion operators - - - Yes Yes
N2439 Rvalue references for *this - - - - Yes
N2442 Raw string literals - - - -

Yes

N2535 Inline namespaces - - - - Yes
N2540 Inheriting constructors - - - - -
N2541 auto: Trailing return types - Yes Yes Yes Yes
N2541 Late-specified return types - - Yes Yes Yes
N2544 Unrestricted unions - - - - Yes on Linux & OS X
N2546 auto v1.0: Removal of auto as a storage-class specifier - Yes Yes Yes Yes
N2550 Lambdas v0.9: Lambda Expressions and Closures - Yes Yes Yes Yes
N2555 variadic templates v1.0 - - Yes Yes Yes
N2634 New-style Expression SFINAE (N2634) - - Yes Yes Yes
N2657 Local and unnamed types as template arguments - Yes Yes Yes Yes
N2658 Lambdas v1.0: Constness of Lambda Functions - Yes Yes Yes Yes
N2670 Minimal support for garbage collection - - - - -
N2672 General initializer lists - - - Partial Yes
N2756 Non-static data member initializers - - - - Yes
N2761 Standard attributes (N2761) - - Yes Yes Yes
N2764 Forward declared enums Partial Partial Partial Partial Yes
N2765 User-defined literals - - - - -
N2844 Rvalue references v2 - Yes Yes Yes Yes
N2927 Lambdas v1.1: New wording for C++0x Lambdas - Yes Yes Yes Yes
N2928 Explicit Virtual Overrides - - - - Yes
N2930 Range-based for loops - - - Yes Yes
N2947 Additional type traits - - - Yes Yes
N3050 noexcept or Allowing move constructors to throw - - - - Yes
N3052 Conversions of lambdas to function pointers - - - Yes Yes
N3053 RValues: Defining Move Special Member Functions - - - - Yes
N3206 Explicit virtual overrides -> Override control: Eliminating Attributes - - - - -
N3272 override and final - - - - Yes
N3276 decltype v1.1: Decltype and Call Expressions - Yes Yes Yes Yes
Core issue 382 Allow typename outside of templates - Yes Yes Yes Yes
DR226 Default template arguments for function templates - - Yes Yes Yes
  Core Language Features: Concurrency          
N2179 exception_ptr - Yes Yes Yes Yes
N2239 Reworded sequence points - - - - -
N2440 quick_exit - - - - -
N2427 atomic types and operations - - - Yes Yes
N2429 Memory model - - - - -
N2547 Atomics in signal handlers - - - - -
N2659 Thread-local storage - - - - -
N2660 Magic statics Yes on Linux & OS X Yes on Linux & OS X Yes on Linux & OS X Yes on Linux & OS X Yes on Linux & OS X
N2664 Data-dependency ordering - - - - -
N2748 Strong compare and exchange - - - - -
N2752 Bidirectional fences - - - - -
N2782 Data-dependency ordering: function annotation - - - - -
  Core Language Features: C99          
N1653 C99 preprocessor Yes Yes Yes Yes Yes
N1811 long long Yes Yes Yes Yes Yes
N2340 __func__ Yes Yes Yes Yes Yes
N1988 Extended integer types - - - - -


On Windows environment when using Intel C++ compiler with Visual Studio 2010* or 2012*, the C++11 features supported by Visual C++ 2010/2012 are enabled by default. Use "/Qstd=c++11" to turn on the support for all other cases.
On Linux or Mac OS X environment use "-std=c++11".

Note: /Qstd=c++0x (-std=c++0x on Linux or Mac OS X) is still supported. it is the same as /Qstd=c++11(-std=c++11 on Linux or Mac OS X).
Please read the documentation for detail information under /Qstd (-std on Linux* or Mac OS* X) option.

Other related articles

  1. C++14 Features Supported by Intel® C++ Compiler
  2. C++11 FAQ by Bjarne Stroustrup
  3. C99 Support in Intel C++ Compiler article for supported C99 features.

 

For more complete information about compiler optimizations, see our Optimization Notice.

Comments

's picture

what about support for variadic templates?

er2020's picture

#include <boost/config.hpp>
{
std::string cpp0x = "RVALUE_REFERENCES : ";
#ifdef BOOST_NO_RVALUE_REFERENCES
cpp0x += "NO";
#else
cpp0x += "YES";
#endif
cpp0x += ", VARIADIC_TEMPLATES : ";
#ifdef BOOST_NO_VARIADIC_TEMPLATES
cpp0x += "NO";
#else
cpp0x += "YES";
#endif
std::cout << cpp0x << std::endl;
}

outputs NO for each whether -std=c++0x is specified or not, for Intel® C++ Composer XE 12.0 for Linux.

Am doing this right?

Note : GCC-4.4 outputs YES if -std=c++0x, NO otherwise on my platform, as is expected.

Jennifer J. (Intel)'s picture

Could you please post this issue to the Intel C++ Forum - http://software.intel.com/en-us/forums/intel-c-compiler/?
Which version of boost is used here?

Try this: create .i from g++; then build the .i with icpc.
I'm wondering if the boost lib has "#ifdef __INTEL_C".

's picture

icpc version 13.0 does not seem to support c++11 unions; the spec says "A union can have member functions (including constructors and destructors), but not virtual (10.3) functions. A union shall not have base classes. A union shall not be used as a base class. If a union contains a non-static data member of reference type the program is ill-formed. At most one non-static data member of a union may have a brace-or-equal-initializer. [ Note: If any non-static data member of a union has a non-trivial default constructor (12.1), copy constructor (12.8), move constructor (12.8), copy assignment operator (12.8), move assignment operator (12.8), or destructor (12.4), the corresponding member function of the union must be user-provided or it will be implicitly deleted (8.4.3) for the union. — end note ]" (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf) However, icpc tells me that default trivial constructors are diallowed member functions in, e.g.,

struct Foo {
int a;
Foo() = default;
};

union Bar {
Foo f;
double d;
};

int main() {
Bar b;
return b.f.a;
}

Is there some place that I should report this?

Matt Clarkson's picture

Are these for icpc or the icl.exe as I have found that icl.exe seems to be missing certain C++11 features.

Sergey Kostrov's picture

Is it up to date?

Petros Mamales's picture

There does not seem to exist a flag /Qstd=c++11, on 12.1 ( at least in the visual configuration inputs ) for vs2010 (windows, obviously) . Only /Qstd=c++0x, which by the way is not on by default.
Is this equivalent ?

Sergey Kostrov's picture

>>...what about support for variadic templates?

That was done some time ago. I remember that some developers reported issues / problems some time ago.

Jennifer J. (Intel)'s picture

The "variadic template" is supported since 12.0. it is listed above.

With icl 12.x, use "/Qstd=c++0x". The default is compatible mode with the VS2010 if used with VS2010. If you want the full C++11 from icl, add "/Qstd=c++0x" option.

In icl13.0, both "/Qstd=c++0x" and "/Qstd=c++11" works. The default is still compatible mode with VS2010 if used with VS2010, and compatible mode with VS2012 if used with VS2012.

Sergey Kostrov's picture

>>...The "variadic template" is supported since 12.0...

Thanks for the update, Jennifer.

Pages