📜 ⬆️ ⬇️

C ++ 11/14/17 support summary table

Like any C ++ developer following the industry news and standards in particular, I wondered how well the C ++ 11 standard (as well as 1y and 1z) was generally supported by different compilers? Yes, there are different pivot tables, but most often this is a comparison of two compilers or two versions of one compiler, or a pivot table, but already outdated, or an incomplete list in general. In general, I sat down and made a complete table (based on the list of Clang-a and GCC) for four compilers: Clang, GNU C ++, MSVC and Intel C ++.
Attention! This table is primarily intended for those who write their product. If you are developing a library, then, naturally, it is better to get acquainted with the peculiarities of support in the original source (and even better to write all the tests). For me, it is primarily a need for solutions like “Oh! Range-fors can already be used without problems. ”
Part of standardC ++ 11 ProposalClangGccVCIntel C ++
C ++ 11
Rvalue referencesN21182.94.310.0 - 13.012.0
Rvalue references for * thisN24392.94.8.113.014.0
Initialization of class objects by rvaluesN16102.94.011.1
Non-static data member initializersN27563.04.712.0 -?14.0
Variadic templatesN22422.94.311.112.0
Extending variadic template template parametersN25552.94.412.012.0
Initializer listsN26723.14.411.1 -?13.0
Static assertionsN17202.94.310.011.0
auto-typed variablesN19842.94.410.011.0
Multi-declarator autoN17372.94.410.012.0
Storage a class specifierN25462.94.410.011.0
New function declarator syntaxN25412.94.410.012.1
Lambda expressionsN29273.14.510.0 - 11.012.0
Declared type of an expressionN23432.94.310.0 - 11.011.0
Incomplete return typesN32763.14.8.112.012.0
Right angle bracketsN17572.94.310.011.0
Default template arguments for function templatesDR2262.94.312.012.6
Solving the SFINAE problem for expressionsDR3392.94.412.6
Alias ​​templatesN22583.04.712.012.6
Extern templatesN19872.94.010.09.0
Null pointer constantN24313.04.610.012.1 *
Strong-typed enumsN23472.94.410.0 - 11.012.0
Forward declarations for enumsN2764 DR12063.14.611.014.0
Standardized attribute syntaxN27613.3 *4.812.1
Generalized constant expressionsN22353.14.613.0 -?13.0
Alignment supportN23413.34.810.0 - 13.015.0
Conditionally-support behaviorN16272.9
Changing undefined behavior into diagnosable errorsN17272.9
Delegating constructorsN19863.04.712.014.0
Inheriting constructorsN25403.34.813.015.0
Explicit conversion operatorsN24373.04.511.113.0
New character typesN22492.94.413.014.0
Unicode string literalsN24423.04.513.011.0 *
Raw string literalsN24423.04.511.114.0
Universal character names in literalsN21703.14.512.6
User-defined literalsN27653.14.713.015.0
Standard Layout TypesN23423.04.411.014.0
Defaulted functionsN23463.04.412.012.0
Deleted functionsN23462.94.412.012.0
Extended friend declarationsN17912.94.710.011.0
Extending sizeofN2253 DR8503.14.413.014.0
Inline namespacesN25352.94.413.014.0
Unrestricted unionsN25443.14.613.014.0 *
Local and unnamed types as template argumentsN26572.94.510.012.0
Range-based forN29303.04.611.013.0
Explicit virtual overridesN2928 N3206 N32723.04.710.0 - 11.012.0 *
Minimal support for garbage collection
and reachability-based leak detection
N2670N / AN / A10.015.0 *
Allowing move constructors to throw [noexcept]N30503.04.613.014.0
Defining move special member functionsN30533.04.614.0
C ++ 11 - Concurrency
Sequence pointsN22393.34.0N / A15.0
Atomic operationsN24273.14.411.013.0
Strong Compare and ExchangeN27483.1 *4.511.013.0
Bidirectional fencesN27523.14.811.013.0
Memory modelN24293.24.8N / A15.0 *
Data dependency ordering: atomics and memory modelN26643.2 *4.411.0 -?15.0
Propagating exceptionsN21792.94.410.012.0
Abandoning a process and at_quick_exitN24404.813.015.0 *
Allow atomics use in signal handlersN25473.14.015.0 *
Thread-local storageN26593.34.810.0 - 13.015.0 *
Dynamic initialization and destruction with concurrencyN26602.94.313.011.0 *
C99 Features in C ++ 11
__func__ predefined identifierN23402.94.310.0 - 13.011.0
C99 preprocessorN16532.94.310.0 -?11.1
long longN18112.94.310.09.0
Extended integral typesN1988N / A4.0N / A15.0 *
C ++ 14
Tweak to certain C ++ contextual conversionsN33233.44.912.0
Binary literalsN34722.94.913.011.0
decltype (auto)N36383.34.813.015.0
Return type deduction for normal functions3.44.913.0
Initialized lambda capturesN36483.44.913.015.0
Generic lambdasN36493.44.913.0
Variable templatesN36513.45.0
Relaxing requirements on constexpr functionsN36523.45.0
Member initializers and aggregatesN36533.35.0
Clarifying memory allocationN36643.4N / A
[[deprecated]] attributeN37603.44.915.0 *
Single quotation mark as digit separatorN37813.44.913.0
C ++ Sized DelocationN37783.4No13.0
C ++ 1z
static_assert with no messageN39283.5
Disabling trigraph expansion by defaultN40863.513.0
typename in a template template parameterN40513.55.0
New auto rules for direct-list-initializationN3922No
Fold expressionsN4295Svn
u8 character literalsN4267Svn
Nested namespace definitionN4230Svn
Attributes for namespaces and enumeratorsN4266Svn
Allow constant evaluation for all non-type template argumentsN4268Svn
Drafts
SD-6: SG10 feature test recommendationsSD-63.45.0
Svn
[DRAFT TS] Array extensions (arrays of runtime bound)N3820No4.9
[DRAFT TS] Library fundamentals (invocation type traits)N3908No
[DRAFT TS] ConceptsN3929NoYes **
Notes.
References
  1. CLang C ++ 11/14/17
  2. GCC: table C ++ 11 , table C ++ 14 , list of improvements to be added to GCC 5
  3. Actual 2012 list of links from Scott Meyers
  4. MSVS 2013 C ++ 11 , C ++ 14
  5. Intel C ++ 11
  6. Late found - Table (identical to the English version ) with support for many different compilers, only a list of incomplete (40 of 80 presented here).

Additional literature:
  1. Effective Modern C ++: 42 Critical Ways for C ++ 11 and C ++ 14 (link to publisher). Scott Meyers - Effective Modern C ++ (C ++ 11/14)
  2. A tour of C ++ - Bjarne Stroustrup


PS And yes, naturally, you should not draw any conclusions about the superiority of one compiler over another. Each of the presented in the table has its killer features and applications. However, it is unlikely that a serious project will be considered by the compiler only by the number of “syntactic buns” (exaggerating). Be sensible!

UPD : Judging by the results of the survey (predictably), the majority believes that the STL information is needed. Having slightly studied this question, I understood that it would take more than an hour or two to make a similar comparison. So I’ll do this if they get their hands on it, and in that case I’ll just change the title to ("... and STL"). Who the topic will be bookmarked, will know that the information is updated.

')

Source: https://habr.com/ru/post/245175/


All Articles