Difference between revisions of "C++11 support in compilers"

From KlayGE
Jump to: navigation, search
 
(27 intermediate revisions by one user not shown)
Line 2: Line 2:
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Language Feature !! Proposal !! [http://blogs.msdn.com/b/vcblog/archive/2011/09/12/10209291.aspx MSVC] !! [http://gcc.gnu.org/projects/cxx0x.html GCC] !! [http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/ ICC] !! [http://clang.llvm.org/cxx_status.html Clang] !! Alternative
+
! Language Feature !! Proposal !! MSVC !! GCC !! ICC !! Clang !! Alternative
 
|-
 
|-
| Rvalue references || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2118.html N2118] || '''10.0''' || '''4.3''' || '''12.0''' || '''2.9''' || Boost.Move
+
| Rvalue references || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2118.html N2118] || {{Yes}}10.0 || {{Yes}}4.3 || {{Yes}}12.0 || {{Yes}}2.9 || Boost.Move
 
|-
 
|-
| Rvalue references for *this || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2439.htm N2439] || No || No || No || '''2.9''' ||
+
| Rvalue references for *this || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2439.htm N2439] || {{Yes}}Nov 13 || {{Yes}}4.8.1 || {{Yes}}14.0 || {{Yes}}2.9 ||
 
|-
 
|-
| Initialization of class objects by rvalues || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1610.html N1610] || '''9.0''' || '''4.3''' || '''11.1''' || '''2.9''' ||
+
| Initialization of class objects by rvalues || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1610.html N1610] || {{Yes}}9.0 || {{Yes}}4.3 || {{Yes}}11.1 || {{Yes}}2.9 ||
 
|-
 
|-
| Non-static data member initializers || [http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2008/n2756.htm N2756] || No || '''4.7''' || No || '''3.0''' ||
+
| Non-static data member initializers || [http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2008/n2756.htm N2756] || {{Yes}}12.0 || {{Yes}}4.7 || {{Yes}}14.0 || {{Yes}}3.0 ||
 
|-
 
|-
| Variadic templates || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2242.pdf N2242] || '''Nov 12''' || '''4.3''' || '''12.1''' || '''2.9''' ||
+
| Variadic templates || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2242.pdf N2242] || {{Yes}}Nov 12 || {{Yes}}4.3 || {{Yes}}12.1 || {{Yes}}2.9 ||
 
|-
 
|-
| Extending variadic template template parameters || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2555.pdf N2555] || '''Nov 12''' || '''4.4''' || No || '''2.9''' ||
+
| Extending variadic template template parameters || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2555.pdf N2555] || {{Yes}}Nov 12 || {{Yes}}4.4 || {{Yes}}12.1 || {{Yes}}2.9 ||
 
|-
 
|-
| Initializer lists || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm N2672] || '''Nov 12''' || '''4.4''' || No || '''3.1''' ||
+
| Initializer lists || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm N2672] || {{Yes}}Nov 12 || {{Yes}}4.4 || {{Yes}}14.0 || {{Yes}}3.1 ||
 
|-
 
|-
| Static assertions || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.html N1720] || '''10.0''' || '''4.3''' || '''11.1''' || '''2.9''' || Boost.StaticAssert
+
| Static assertions || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.html N1720] || {{Yes}}10.0 || {{Yes}}4.3 || {{Yes}}11.1 || {{Yes}}2.9 || Boost.StaticAssert
 
|-
 
|-
| auto-typed variables || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1984.pdf N1984] || '''10.0''' || '''4.4''' || '''12.0''' || '''2.9''' || Boost.Typeof
+
| auto-typed variables || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1984.pdf N1984] || {{Yes}}10.0 || {{Yes}}4.4 || {{Yes}}12.0 || {{Yes}}2.9 || Boost.Typeof
 
|-
 
|-
| Multi-declarator auto || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1737.pdf N1737] || '''10.0''' || '''4.4''' || '''12.0''' || '''2.9''' || Boost.Typeof
+
| Multi-declarator auto || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1737.pdf N1737] || {{Yes}}10.0 || {{Yes}}4.4 || {{Yes}}12.0 || {{Yes}}2.9 || Boost.Typeof
 
|-
 
|-
| Removal of auto as a storage-class specifier || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2546.htm N2546] || '''10.0''' || '''4.4''' || '''12.0''' || '''2.9''' || Boost.Typeof
+
| Removal of auto as a storage-class specifier || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2546.htm N2546] || {{Yes}}10.0 || {{Yes}}4.4 || {{Yes}}12.0 || {{Yes}}2.9 || Boost.Typeof
 
|-
 
|-
| New function declarator syntax || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2541.htm N2541] || '''10.0''' || '''4.4''' || '''12.0''' || '''2.9''' || Boost.ReturnType
+
| New function declarator syntax || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2541.htm N2541] || {{Yes}}10.0 || {{Yes}}4.4 || {{Yes}}12.0 || {{Yes}}2.9 || Boost.ReturnType
 
|-
 
|-
| New wording for C++11 lambdas || [http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2927.pdf N2927] || '''10.0''' || '''4.5''' || '''12.0''' || '''3.1''' || Boost.Lambda
+
| New wording for C++11 lambdas || [http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2927.pdf N2927] || {{Yes}}10.0 || {{Yes}}4.5 || {{Yes}}12.0 || {{Yes}}3.1 || Boost.Lambda
 
|-
 
|-
| Declared type of an expression || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2343.pdf N2343] || '''10.0''' || '''4.3''' || '''12.0''' || '''2.9''' || Boost.Typeof
+
| Declared type of an expression || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2343.pdf N2343] || {{Yes}}10.0 || {{Yes}}4.3 || {{Yes}}12.0 || {{Yes}}2.9 || Boost.Typeof
 
|-
 
|-
| Incomplete return types || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3276.pdf N3276] || '''11.0''' || No || '''12.1''' || '''3.1''' ||
+
| Incomplete return types || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3276.pdf N3276] || {{Yes}}11.0 || {{Yes}}4.8.1 || {{Yes}}12.1 || {{Yes}}3.1 ||
 
|-
 
|-
| Right angle brackets || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1757.html N1757] || '''9.0''' || '''4.3''' || '''11.1''' || '''2.9''' || TR1
+
| Right angle brackets || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1757.html N1757] || {{Yes}}9.0 || {{Yes}}4.3 || {{Yes}}11.1 || {{Yes}}2.9 || TR1
 
|-
 
|-
| Default template arguments for function templates || [http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#226 DR226] || '''Nov 12''' || '''4.3''' || '''12.1''' || '''2.9''' ||
+
| Default template arguments for function templates || [http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#226 DR226] || {{Yes}}Nov 12 || {{Yes}}4.3 || {{Yes}}12.1 || {{Yes}}2.9 ||
 
|-
 
|-
| Solving the SFINAE problem for expressions || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2634.html DR339] || No || '''4.4''' || '''12.1''' || '''2.9''' ||
+
| Solving the SFINAE problem for expressions || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2634.html DR339] || {{No}}No || {{Yes}}4.4 || {{Yes}}12.1 || {{Yes}}2.9 ||
 
|-
 
|-
| Template aliases || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2258.pdf N2258] || No || '''4.7''' || '''12.1''' || '''3.0''' ||
+
| Template aliases || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2258.pdf N2258] || {{Yes}}12.0 || {{Yes}}4.7 || {{Yes}}12.1 || {{Yes}}3.0 ||
 
|-
 
|-
| Extern templates || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1987.htm N1987] || '''9.0''' || '''4.3''' || '''11.1''' || '''2.9''' ||
+
| Extern templates || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1987.htm N1987] || {{Yes}}9.0 || {{Yes}}4.3 || {{Yes}}11.1 || {{Yes}}2.9 ||
 
|-
 
|-
| Null pointer constant || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf N2431] || '''10.0''' || '''4.6''' || '''12.1''' || '''3.0''' || Self-implemented null_ptr
+
| Null pointer constant || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf N2431] || {{Yes}}10.0 || {{Yes}}4.6 || {{Yes}}12.1 || {{Yes}}3.0 || Self-implemented null_ptr
 
|-
 
|-
| Strongly-typed enums || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf N2347] || '''11.0''' || '''4.4''' || No || '''2.9''' || #define
+
| Strongly-typed enums || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf N2347] || {{Yes}}11.0 || {{Yes}}4.4 || {{Yes}}14.0 || {{Yes}}2.9 || #define
 
|-
 
|-
| Forward declarations for enums || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2764.pdf N2764] || '''11.0''' || '''4.6''' || No || '''3.1''' ||
+
| Forward declarations for enums || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2764.pdf N2764] || {{Yes}}11.0 || {{Yes}}4.6 || {{Yes}}14.0 || {{Yes}}3.1 ||
 
|-
 
|-
| Generalized attributes || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf N2761] || No || '''4.8''' || '''12.1''' || '''3.3''' ||
+
| Generalized attributes || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf N2761] || {{Yes}}14.0 || {{Yes}}4.8 || {{Yes}}12.1 || {{Yes}}3.3 ||
 
|-
 
|-
| Generalized constant expressions || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf N2235] || No || '''4.6''' || No || '''3.1''' ||
+
| Generalized constant expressions || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf N2235] || {{Yes}}Nov 13 || {{Yes}}4.6 || {{Yes}}14.0 || {{Yes}}3.1 ||
 
|-
 
|-
| Alignment support || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2341.pdf N2341] || No || '''4.8''' || No || '''3.3''' ||
+
| Alignment support || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2341.pdf N2341] || {{Yes}}Nov 13 || {{Yes}}4.8 || {{No}}No || {{Yes}}3.3 ||
 
|-
 
|-
| Delegating constructors || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1986.pdf N1986] || '''Nov 12''' || '''4.7''' || No || '''3.0''' ||
+
| Delegating constructors || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1986.pdf N1986] || {{Yes}}Nov 12 || {{Yes}}4.7 || {{Yes}}14.0 || {{Yes}}3.0 ||
 
|-
 
|-
| Inheriting constructors || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2540.htm N2540] || No || '''4.8''' || No || '''3.3''' ||
+
| Inheriting constructors || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2540.htm N2540] || {{Yes}}Nov 13 || {{Yes}}4.8 || {{Yes}}15.0 || {{Yes}}3.3 ||
 
|-
 
|-
| Explicit conversion operators || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2437.pdf N2437] || '''Nov 12''' || '''4.5''' || No || '''3.0''' ||
+
| Explicit conversion operators || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2437.pdf N2437] || {{Yes}}Nov 12 || {{Yes}}4.5 || {{Yes}}14.0 || {{Yes}}3.0 ||
 
|-
 
|-
| New character types || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2249.html N2249] || No || '''4.4''' || No || '''2.9''' ||
+
| New character types || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2249.html N2249] || {{Yes}}14.0 || {{Yes}}4.4 || {{Yes}}14.0 || {{Yes}}2.9 ||
 
|-
 
|-
| Unicode string literals || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm N2442] || No || '''4.5''' || No || '''3.0''' ||
+
| Unicode string literals || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm N2442] || {{Yes}}14.0 || {{Yes}}4.5 || {{Yes}}14.0 || {{Yes}}3.0 ||
 
|-
 
|-
| Raw string literals || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm N2442] || '''Nov 12''' || '''4.5''' || No || '''3.0''' ||
+
| Raw string literals || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm N2442] || {{Yes}}Nov 12 || {{Yes}}4.5 || {{Yes}}14.0 || {{Yes}}3.0 ||
 
|-
 
|-
| Universal character name literals || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2170.html N2170] || No || '''4.5''' || No || '''3.1''' ||
+
| Universal character name literals || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2170.html N2170] || {{Yes}}14.0 || {{Yes}}4.5 || {{Yes}}12.1 || {{Yes}}3.1 ||
 
|-
 
|-
| User-defined literals || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2765.pdf N2765] || No || '''4.7''' || No || '''3.1''' ||
+
| User-defined literals || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2765.pdf N2765] || {{Yes}}VS14 CTP1 || {{Yes}}4.7 || {{Yes}}15.0 || {{Yes}}3.1 ||
 
|-
 
|-
| Standard Layout Types || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2342.htm N2342] || '''11.0''' || '''4.5''' || No || '''3.0''' ||
+
| Standard Layout Types || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2342.htm N2342] || {{Yes}}11.0 || {{Yes}}4.5 || {{No}}No || {{Yes}}3.0 ||
 
|-
 
|-
| Defaulted and deleted functions || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2346.htm N2346] || No || '''4.4''' || '''12.0''' || '''3.0''' ||
+
| Defaulted and deleted functions || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2346.htm N2346] || {{Yes}}12.0 || {{Yes}}4.4 || {{Yes}}12.0 || {{Yes}}3.0 ||
 
|-
 
|-
| Extended friend declarations || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1791.pdf N1791] || '''10.0''' || '''4.7''' || '''12.0''' || '''2.9''' ||
+
| Extended friend declarations || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1791.pdf N1791] || {{Yes}}10.0 || {{Yes}}4.7 || {{Yes}}12.0 || {{Yes}}2.9 ||
 
|-
 
|-
| Extending sizeof || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2253.html N2253] || No || '''4.4''' || No || '''3.1''' ||
+
| Extending sizeof || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2253.html N2253] || {{Yes}}Nov 13 || {{Yes}}4.4 || {{Yes}}14.0 || {{Yes}}3.1 ||
 
|-
 
|-
| Inline namespaces || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2535.htm N2535] || No || '''4.4''' || No || '''2.9''' ||
+
| Inline namespaces || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2535.htm N2535] || {{Yes}}14.0 || {{Yes}}4.4 || {{Yes}}14.0 || {{Yes}}2.9 ||
 
|-
 
|-
| Unrestricted unions || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2544.pdf N2544] || No || '''4.6''' || No || '''3.1''' ||
+
| Unrestricted unions || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2544.pdf N2544] || {{Yes}}14.0 || {{Yes}}4.6 || {{Yes}}14.0 || {{Yes}}3.1 ||
 
|-
 
|-
| Local and unnamed types as template arguments || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm N2657] || '''9.0''' || '''4.5''' || '''12.0''' || '''2.9''' ||
+
| Local and unnamed types as template arguments || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm N2657] || {{Yes}}9.0 || {{Yes}}4.5 || {{Yes}}12.0 || {{Yes}}2.9 ||
 
|-
 
|-
| Range-based for || [http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2930.html N2930] || '''11.0''' || '''4.6''' || '''13.0''' || '''3.0''' || Boost.Foreach
+
| Range-based for || [http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2930.html N2930] || {{Yes}}11.0 || {{Yes}}4.6 || {{Yes}}13.0 || {{Yes}}3.0 || Boost.Foreach
 
|-
 
|-
| Explicit virtual overrides || [http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2928.htm N2928] || '''11.0''' || '''4.7''' || No || '''3.0''' || #define
+
| Explicit virtual overrides || [http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2928.htm N2928] || {{Yes}}11.0 || {{Yes}}4.7 || {{Yes}}14.0 || {{Yes}}3.0 || #define
 
|-
 
|-
| Minimal support for garbage collection and reachability-based leak detection || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2670.htm N2670] || '''10.0''' || No || No || No ||
+
| Minimal support for garbage collection and reachability-based leak detection || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2670.htm N2670] || {{Yes}}10.0 || {{No}}No || {{No}}No || {{No}}No ||
 
|-
 
|-
| Allowing move constructors to throw [noexcept] || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3050.html N3050] || No || '''4.6''' || No || '''3.0''' ||
+
| Allowing move constructors to throw [noexcept] || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3050.html N3050] || {{Yes}}Nov 13 || {{Yes}}4.6 || {{Yes}}14.0 || {{Yes}}3.0 ||
 
|-
 
|-
| Defining move special member functions || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3053.html N3053] || No || '''4.6''' || No || '''3.0''' ||
+
| Defining move special member functions || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3053.html N3053] || {{Yes}}14.0 || {{Yes}}4.6 || {{Yes}}14.0 || {{Yes}}3.0 ||
 
|}
 
|}
  
Line 100: Line 100:
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Language Feature !! Proposal !! [http://blogs.msdn.com/b/vcblog/archive/2011/09/12/10209291.aspx MSVC] !! [http://gcc.gnu.org/projects/cxx0x.html GCC] !! [http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/ ICC] !! [http://clang.llvm.org/cxx_status.html Clang] !! Alternative
+
! Language Feature !! Proposal !! MSVC !! GCC !! ICC !! Clang !! Alternative
 
|-
 
|-
| Sequence points || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2239.html N2239] || No || No || No || '''3.3''' ||
+
| Sequence points || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2239.html N2239] || {{Yes}}12.0 || {{Yes}}4.8 || {{Yes}}15.0 || {{Yes}}3.3 ||
 
|-
 
|-
| Atomic operations || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2427.html N2427] || '''11.0''' || '''4.4''' || '''13.0''' || '''3.1''' || Boost.Atomic
+
| Atomic operations || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2427.html N2427] || {{Yes}}11.0 || {{Yes}}4.4 || {{Yes}}13.0 || {{Yes}}3.1 || Boost.Atomic
 
|-
 
|-
| Strong Compare and Exchange || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2748.html N2748] || '''11.0''' || No || No || '''3.1''' ||
+
| Strong Compare and Exchange || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2748.html N2748] || {{Yes}}11.0 || {{Yes}}4.8 || {{Yes}}13.0 || {{Yes}}3.1 || Boost.Atomic
 
|-
 
|-
| Bidirectional Fences || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2752.htm N2752] || '''11.0''' || No || No || '''3.1''' ||
+
| Bidirectional Fences || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2752.htm N2752] || {{Yes}}11.0 || {{Yes}}4.8 || {{Yes}}13.0 || {{Yes}}3.1 || Boost.Atomic
 
|-
 
|-
| Memory model || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2429.htm N2429] || No || No || No || '''3.2''' ||
+
| Memory model || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2429.htm N2429] || {{Yes}}12.0 || {{Yes}}4.8 || {{No}}No || {{Yes}}3.2 || Boost.Atomic
 
|-
 
|-
| Data-dependency ordering: atomics and memory model || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2664.htm N2664] || '''11.0''' || No || No || No ||
+
| Data-dependency ordering: atomics and memory model || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2664.htm N2664] || {{Yes}}11.0 || {{Yes}}4.8 || {{No}}No || {{Yes}}3.2 || Boost.Atomic
 
|-
 
|-
| Propagating exceptions || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html N2179] || '''10.0''' || '''4.4''' || '''12.0''' || '''2.9''' || Boost.Exception
+
| Propagating exceptions || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html N2179] || {{Yes}}10.0 || {{Yes}}4.4 || {{Yes}}12.0 || {{Yes}}2.9 || Boost.Exception
 
|-
 
|-
| Abandoning a process and at_quick_exit || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2440.htm N2440] || No || No || No || No ||
+
| Abandoning a process and at_quick_exit || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2440.htm N2440] || {{Yes}}14.0 || {{Yes}}4.8 || {{No}}No || {{No}}No ||
 
|-
 
|-
| Allow atomics use in signal handlers || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2547.htm N2547] || No || No || No || '''3.1''' ||
+
| Allow atomics use in signal handlers || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2547.htm N2547] || {{Yes}}12.0 || {{Yes}}4.8 || {{No}}No || {{Yes}}3.1 ||
 
|-
 
|-
| Thread-local storage || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2659.htm N2659] || No || '''4.8''' || No || '''3.3''' || Boost.Thread
+
| Thread-local storage || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2659.htm N2659] || {{Yes}}14.0 || {{Yes}}4.8 || {{No}}No || {{Yes}}3.3 || Boost.Thread
 
|-
 
|-
| Dynamic initialization and destruction with concurrency || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2660.htm N2660] || No || No || No || No ||
+
| Dynamic initialization and destruction with concurrency || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2660.htm N2660] || {{Yes}}Nov 13 || {{Yes}}4.8 || {{No}}No || {{Yes}}2.9 ||
 
|}
 
|}
  
Line 128: Line 128:
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Language Feature !! Proposal !! [http://blogs.msdn.com/b/vcblog/archive/2011/09/12/10209291.aspx MSVC] !! [http://gcc.gnu.org/projects/cxx0x.html GCC] !! [http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/ ICC] !! [http://clang.llvm.org/cxx_status.html Clang] !! Alternative
+
! Language Feature !! Proposal !! MSVC !! GCC !! ICC !! Clang !! Alternative
 
|-
 
|-
| __func__ predefined identifier || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2340.htm N2340] || No || '''4.3''' || '''11.1''' || '''2.9''' || __FUNCTION__
+
| __func__ predefined identifier || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2340.htm N2340] || {{Yes}}Nov 13 || {{Yes}}4.3 || {{Yes}}11.1 || {{Yes}}2.9 || __FUNCTION__
 
|-
 
|-
| C99 preprocessor || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1653.htm N1653] || No || '''4.3''' || '''11.1''' || '''2.9''' ||
+
| C99 preprocessor || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1653.htm N1653] || {{No}}No || {{Yes}}4.3 || {{Yes}}11.1 || {{Yes}}2.9 ||
 
|-
 
|-
| long long || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1811.pdf N1811] || '''9.0''' || '''4.3''' || '''11.1''' || '''2.9''' || __int64
+
| long long || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1811.pdf N1811] || {{Yes}}9.0 || {{Yes}}4.3 || {{Yes}}11.1 || {{Yes}}2.9 || __int64
 
|-
 
|-
| Extended integral types || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1988.pdf N1988] || No || No || No || No ||
+
| Extended integral types || [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1988.pdf N1988] || {{No}}No || {{No}}No || {{No}}No || {{No}}No ||
 
|}
 
|}
  
Line 142: Line 142:
 
[[Used C++11 features]]
 
[[Used C++11 features]]
  
[[zh:不同的编译器对C++11的支持]]
+
[[C++14 support in compilers]]
 +
 
 +
[[C++17 support in compilers]]
 +
 
 +
== References ==
 +
*[http://blogs.msdn.com/b/vcblog/archive/2011/09/12/10209291.aspx C++11 Features in Visual C++ 11]
 +
*[http://blogs.msdn.com/b/vcblog/archive/2013/06/28/c-11-14-stl-features-fixes-and-breaking-changes-in-vs-2013.aspx C++11/14 STL Features, Fixes, And Breaking Changes In VS 2013]
 +
*[http://blogs.msdn.com/b/vcblog/archive/2013/11/18/announcing-the-visual-c-compiler-november-2013-ctp.aspx Announcing the Visual C++ Compiler November 2013 CTP]
 +
*[http://blogs.msdn.com/b/vcblog/archive/2014/06/11/c-11-14-feature-tables-for-visual-studio-14-ctp1.aspx C++11/14 Feature Tables For Visual Studio 14 CTP1]
 +
*[https://msdn.microsoft.com/en-us/library/hh567368%28v=vs.110%29.aspx C++11 Features (Modern C++)]
 +
*[http://gcc.gnu.org/projects/cxx0x.html C++0x/C++11 Support in GCC]
 +
*[http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/ C++11 Features Supported by Intel® C++ Compiler]
 +
*[http://clang.llvm.org/cxx_status.html C++98, C++11, and C++14 Support in Clang]
 +
 
 +
[[Category:Knowledge base]]
 +
 
 +
[[zh:多种编译器对C++11的支持]]

Latest revision as of 14:50, 12 July 2015

C++11 Core Language Features

Language Feature Proposal MSVC GCC ICC Clang Alternative
Rvalue references N2118 10.0 4.3 12.0 2.9 Boost.Move
Rvalue references for *this N2439 Nov 13 4.8.1 14.0 2.9
Initialization of class objects by rvalues N1610 9.0 4.3 11.1 2.9
Non-static data member initializers N2756 12.0 4.7 14.0 3.0
Variadic templates N2242 Nov 12 4.3 12.1 2.9
Extending variadic template template parameters N2555 Nov 12 4.4 12.1 2.9
Initializer lists N2672 Nov 12 4.4 14.0 3.1
Static assertions N1720 10.0 4.3 11.1 2.9 Boost.StaticAssert
auto-typed variables N1984 10.0 4.4 12.0 2.9 Boost.Typeof
Multi-declarator auto N1737 10.0 4.4 12.0 2.9 Boost.Typeof
Removal of auto as a storage-class specifier N2546 10.0 4.4 12.0 2.9 Boost.Typeof
New function declarator syntax N2541 10.0 4.4 12.0 2.9 Boost.ReturnType
New wording for C++11 lambdas N2927 10.0 4.5 12.0 3.1 Boost.Lambda
Declared type of an expression N2343 10.0 4.3 12.0 2.9 Boost.Typeof
Incomplete return types N3276 11.0 4.8.1 12.1 3.1
Right angle brackets N1757 9.0 4.3 11.1 2.9 TR1
Default template arguments for function templates DR226 Nov 12 4.3 12.1 2.9
Solving the SFINAE problem for expressions DR339 No 4.4 12.1 2.9
Template aliases N2258 12.0 4.7 12.1 3.0
Extern templates N1987 9.0 4.3 11.1 2.9
Null pointer constant N2431 10.0 4.6 12.1 3.0 Self-implemented null_ptr
Strongly-typed enums N2347 11.0 4.4 14.0 2.9 #define
Forward declarations for enums N2764 11.0 4.6 14.0 3.1
Generalized attributes N2761 14.0 4.8 12.1 3.3
Generalized constant expressions N2235 Nov 13 4.6 14.0 3.1
Alignment support N2341 Nov 13 4.8 No 3.3
Delegating constructors N1986 Nov 12 4.7 14.0 3.0
Inheriting constructors N2540 Nov 13 4.8 15.0 3.3
Explicit conversion operators N2437 Nov 12 4.5 14.0 3.0
New character types N2249 14.0 4.4 14.0 2.9
Unicode string literals N2442 14.0 4.5 14.0 3.0
Raw string literals N2442 Nov 12 4.5 14.0 3.0
Universal character name literals N2170 14.0 4.5 12.1 3.1
User-defined literals N2765 VS14 CTP1 4.7 15.0 3.1
Standard Layout Types N2342 11.0 4.5 No 3.0
Defaulted and deleted functions N2346 12.0 4.4 12.0 3.0
Extended friend declarations N1791 10.0 4.7 12.0 2.9
Extending sizeof N2253 Nov 13 4.4 14.0 3.1
Inline namespaces N2535 14.0 4.4 14.0 2.9
Unrestricted unions N2544 14.0 4.6 14.0 3.1
Local and unnamed types as template arguments N2657 9.0 4.5 12.0 2.9
Range-based for N2930 11.0 4.6 13.0 3.0 Boost.Foreach
Explicit virtual overrides N2928 11.0 4.7 14.0 3.0 #define
Minimal support for garbage collection and reachability-based leak detection N2670 10.0 No No No
Allowing move constructors to throw [noexcept] N3050 Nov 13 4.6 14.0 3.0
Defining move special member functions N3053 14.0 4.6 14.0 3.0

C++11 Core Language Features: Concurrency

Language Feature Proposal MSVC GCC ICC Clang Alternative
Sequence points N2239 12.0 4.8 15.0 3.3
Atomic operations N2427 11.0 4.4 13.0 3.1 Boost.Atomic
Strong Compare and Exchange N2748 11.0 4.8 13.0 3.1 Boost.Atomic
Bidirectional Fences N2752 11.0 4.8 13.0 3.1 Boost.Atomic
Memory model N2429 12.0 4.8 No 3.2 Boost.Atomic
Data-dependency ordering: atomics and memory model N2664 11.0 4.8 No 3.2 Boost.Atomic
Propagating exceptions N2179 10.0 4.4 12.0 2.9 Boost.Exception
Abandoning a process and at_quick_exit N2440 14.0 4.8 No No
Allow atomics use in signal handlers N2547 12.0 4.8 No 3.1
Thread-local storage N2659 14.0 4.8 No 3.3 Boost.Thread
Dynamic initialization and destruction with concurrency N2660 Nov 13 4.8 No 2.9

C++11 Core Language Features: C99

Language Feature Proposal MSVC GCC ICC Clang Alternative
__func__ predefined identifier N2340 Nov 13 4.3 11.1 2.9 __FUNCTION__
C99 preprocessor N1653 No 4.3 11.1 2.9
long long N1811 9.0 4.3 11.1 2.9 __int64
Extended integral types N1988 No No No No

See Also

Used C++11 features

C++14 support in compilers

C++17 support in compilers

References