您的位置:首页 > 编程语言 > C语言/C++

更多编译器对C++11的支持比较

2012-12-24 15:24 239 查看
转载请注明出处为KlayGE游戏引擎,本文的永久链接为http://www.klayge.org/?p=2162
上次对各编译器对C++11的支持比较之后,很多观众提议加入Intel C++ Compiler(ICC)和Clang。这次修订还加入了在VC11 Nov 12 CTP中对C++11的提升。上回表中的Yes/No标识也被我改成了写明支持一个feature的最低版本号,feature的顺序也调整了一下。为了方便查询,还加入了Proposal的链接。

C++11 Core Language Features

Language FeatureProposalMSVCGCCICCClang替代方案
Rvalue referencesN211810.04.312.02.9Boost.Move
Rvalue references for *thisN2439NoNoNo2.9
Initialization of class objects by rvaluesN16109.04.311.12.9
Non-static data member initializersN2756No4.7No3.0
Variadic templatesN2242Nov 124.312.12.9
Extending variadic template template parametersN2555Nov 124.4No2.9
Initializer listsN2672Nov 124.4No3.1
Static assertionsN172010.04.311.12.9Boost.StaticAssert
auto-typed variablesN198410.04.412.02.9Boost.Typeof
Multi-declarator autoN173710.04.412.02.9Boost.Typeof
Removal of auto as a storage-class specifierN254610.04.412.02.9Boost.Typeof
New function declarator syntaxN254110.04.412.02.9Boost.ReturnType
New wording for C++11 lambdasN292710.04.512.03.1Boost.Lambda
Declared type of an expressionN234310.04.312.02.9Boost.Typeof
Incomplete return typesN327611.0No12.13.1
Right angle bracketsN17579.04.311.12.9TR1
Default template arguments for function templatesDR226Nov 124.312.12.9
Solving the SFINAE problem for expressionsDR339No4.412.12.9
Template aliasesN2258No4.712.13.0
Extern templatesN19879.04.311.12.9
Null pointer constantN243110.04.612.13.0自己实现的null_ptr
Strongly-typed enumsN234711.04.4No2.9#define
Forward declarations for enumsN276411.04.6No3.1
Generalized attributesN2761No4.812.1No
Generalized constant expressionsN2235No4.6No3.1
Alignment supportN2341No4.8No3.0
Delegating constructorsN1986Nov 124.7No3.0
Inheriting constructorsN2540No4.8NoNo
Explicit conversion operatorsN2437Nov 124.5No3.0
New character typesN2249No4.4No2.9
Unicode string literalsN2442No4.5No3.0
Raw string literalsN2442Nov 124.5No3.0
Universal character name literalsN2170No4.5No3.1
User-defined literalsN2765No4.7No3.1
Standard Layout TypesN234211.04.5No3.0
Defaulted and deleted functionsN2346No4.412.03.0
Extended friend declarationsN179110.04.712.02.9
Extending sizeofN2253No4.4No3.1
Inline namespacesN2535No4.4No2.9
Unrestricted unionsN2544No4.6No3.1
Local and unnamed types as template argumentsN26579.04.512.02.9
Range-based forN293011.04.613.03.0Boost.Foreach
Explicit virtual overridesN292811.04.7No3.0#define
Minimal support for garbage collection and reachability-based leak detectionN267010.0NoNoNo
Allowing move constructors to throw [noexcept]N3050No4.6No3.0
Defining move special member functionsN3053No4.6No3.0

C++11 Core Language Features: Concurrency

Language FeatureProposalMSVCGCCICCClang替代方案
Sequence pointsN2239NoNoNoNo
Atomic operationsN242711.04.413.03.1Boost.Atomic
Strong Compare and ExchangeN274811.0NoNo3.1
Bidirectional FencesN275211.0NoNo3.1
Memory modelN2429NoNoNoNo
Data-dependency ordering: atomics and memory modelN266411.0NoNoNo
Propagating exceptionsN217910.04.412.02.9Boost.Exception
Abandoning a process and at_quick_exitN2440NoNoNoNo
Allow atomics use in signal handlersN2547NoNoNo3.1
Thread-local storageN2659No4.8NoNoBoost.Thread
Dynamic initialization and destruction with concurrencyN2660NoNoNoNo

C++11 Core Language Features: C99

Language FeatureProposalMSVCGCCICCClang替代方案
__func__ predefined identifierN2340No4.311.12.9__FUNCTION__
C99 preprocessorN1653No4.311.12.9
long longN18119.04.311.12.9__int64
Extended integral typesN1988NoNoNoNo
分享到:
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: