C++ - C++0x/C++11 Support in GCC
来源:互联网 发布:杭州最帅交警网络走红 编辑:程序博客网 时间:2024/06/15 00:06
C++0x was the working name of the ISO C++ 2011 standard, which introduced a host of new features into the standard C++ language and library. This project sought to implement new C++11 features in GCC, and made it the first compiler to bring feature-complete C++11 to C++ programmers.
C++11 features are available as part of the "mainline" GCC compiler in the trunk ofGCC's Subversion repository and in GCC 4.3 and later. To enable C++0x support, add the command-line parameter-std=c++0x
to your g++
command line. Or, to enable GNU extensions in addition to C++0x extensions, add-std=gnu++0x
to your g++
command line. GCC 4.7 and later support-std=c++11
and -std=gnu++11
as well.
Important: GCC's support for C++11 is still experimental. Some features were implemented based on early proposals, and no attempt will be made to maintain backward compatibility when they are updated to match the final C++11 standard.
C++11 Language Features
The following table lists new language features that have been accepted into the C++11 standard. The "Proposal" column provides a link to the ISO C++ committee proposal that describes the feature, while the "Available in GCC?" column indicates the first version of GCC that contains an implementation of this feature (if it has been implemented).
For information about C++11 support in a specific version of GCC, please see:
- GCC 4.3 C++0x Status
- GCC 4.4 C++0x Status
- GCC 4.5 C++0x Status
- GCC 4.6 C++0x Status
- GCC 4.7 C++11 Status
- GCC 4.8 C++11 Status
*this
N2439GCC 4.8.1__cpp_ref_qualifiers >= 200710Initialization of class objects by rvaluesN1610Yes Non-static data member initializersN2756GCC 4.7__cpp_nsdmi >= 200809Variadic templatesN2242GCC 4.3__cpp_variadic_templates >= 200704 Extending variadic template template parametersN2555GCC 4.4 Initializer listsN2672GCC 4.4__cpp_initializer_lists >= 200806Static assertionsN1720GCC 4.3__cpp_static_assert >= 200410auto
-typed variablesN1984GCC 4.4 Multi-declarator auto
N1737GCC 4.4 Removal of auto as a storage-class specifierN2546GCC 4.4 New function declarator syntaxN2541GCC 4.4 New wording for C++0x lambdasN2927GCC 4.5__cpp_lambdas >= 200907Declared type of an expressionN2343GCC 4.3__cpp_decltype >= 200707 decltype and call expressionsN3276GCC 4.8.1 Right angle bracketsN1757GCC 4.3 Default template arguments for function templatesDR226GCC 4.3 Solving the SFINAE problem for expressionsDR339GCC 4.4 Template aliasesN2258GCC 4.7__cpp_alias_templates >= 200704Extern templatesN1987Yes Null pointer constantN2431GCC 4.6 Strongly-typed enumsN2347GCC 4.4 Forward declarations for enumsN2764GCC 4.6 Generalized attributesN2761GCC 4.8__cpp_attributes >= 200809; __has_cpp_attribute(noreturn) >= 200809; __has_cpp_attribute(carries_dependency) == 0 (not implemented)Generalized constant expressionsN2235GCC 4.6__cpp_constexpr >= 200704Alignment supportN2341GCC 4.8 Delegating constructorsN1986GCC 4.7__cpp_delegating_constructors >= 200604Inheriting constructorsN2540GCC 4.8__cpp_inheriting_constructors >= 200802Explicit conversion operatorsN2437GCC 4.5 New character typesN2249GCC 4.4__cpp_unicode_characters >= 200704Unicode string literalsN2442GCC 4.5__cpp_unicode_literals >= 200710Raw string literalsN2442GCC 4.5__cpp_raw_strings >= 200710Universal character name literalsN2170GCC 4.5 User-defined literalsN2765GCC 4.7__cpp_user_defined_literals >= 200809Standard Layout TypesN2342GCC 4.5 Defaulted and deleted functionsN2346GCC 4.4 Extended friend declarationsN1791GCC 4.7 Extending sizeof
N2253GCC 4.4 Inline namespacesN2535GCC 4.4 Unrestricted unionsN2544GCC 4.6 Local and unnamed types as template argumentsN2657GCC 4.5 Range-based forN2930GCC 4.6__cpp_range_based_for >= 200907Explicit virtual overridesN2928N3206
N3272GCC 4.7 Minimal support for garbage collection and reachability-based leak detectionN2670No Allowing move constructors to throw [noexcept]N3050GCC 4.6 Defining move special member functionsN3053GCC 4.6
(memory_order_consume) Propagating exceptionsN2179GCC 4.4 Abandoning a process and at_quick_exitN2440GCC 4.8 Allow atomics use in signal handlersN2547Yes Thread-local storageN2659GCC 4.8 Dynamic initialization and destruction with concurrencyN2660GCC 4.3
__func__
predefined identifierN2340GCC 4.3 C99 preprocessorN1653GCC 4.3 long long
N1811GCC 4.3 Extended integral typesN1988Yes C++11 Library Features
The status of the library implementation can be tracked in this table
- C++ - C++0x/C++11 Support in GCC
- C and C++ support in Emacs
- [C++]make_pair test in c++0x
- gcc-4.6.0/gcc/gcc.c#main
- 入口 gcc-4.6.0/gcc/gcc.c
- gcc -c
- c/c++/gcc
- How to inline ASM in C (gcc)
- C + +0 x中:C + +的未来
- VIM插件:c-support使用
- GCC-C语言编辑器
- gcc -S a.c
- Gcc - c 内存分析
- 了解GCC C++ C
- gcc -c -o
- Gcc - c 内存分析
- linux gcc 编译 c
- gcc -c -o
- 文本替换sed+字段处理cut,join+awk重新编排字段
- 范式
- 排列组合 包含求集合笛卡尔积
- linux设备模型 底层
- 微软100题(87)最大连续递增数字串
- C++ - C++0x/C++11 Support in GCC
- 获得Properties文件的内容
- iOS开发工具——网络封包分析工具Charles
- 游戏感:虚拟感觉的游戏设计师指南——第九章 润色的测量方法
- 滑动返回上一层级
- ubuntu14.04下配置使用openCV3.0
- 蓝牙BLE以太网网关在智能家居中的应用(基于W5500)
- 浙江大学PAT_甲级_1031. Hello World for U (20)
- struts2中的constant配置详解