C++11 的新特性 对C++技术布局的影响

C++11 的新特性 对C++技术格局的影响

C++ reference

From Cppreference

Jump to: navigation, search

FAQ

Language

Preprocessor
Keywords
Headers
Operator precedence
Escape sequences
ASCII chart
Fundamental types

Utilities library

Type support (basic types, RTTI, type traits)
Dynamic memory management
Error handling
Program utilities
Date and time
bitset
Function objects
pair
tuple (since C++11)

Strings library

basic_string
NULL-terminated byte strings
NULL-terminated multibyte strings
NULL-terminated wide strings

Containers library

array (since C++11)
vector
deque
list
forward_list (since C++11)
set
multiset
map
multimap
unordered_set (since C++11)
unordered_multiset(since C++11)
unordered_map (since C++11)
unordered_multimap(since C++11)
stack
queue
priority_queue

Algorithms library

Iterators library

Numerics library

Common mathematical functions
Complex numbers
Pseudo-random number generation

Input/output library

basic_streambuf
basic_filebuf
basic_stringbuf
ios_base
basic_ios
basic_istream
basic_ostream
basic_iostream
basic_ifstream
basic_ofstream
basic_fstream
basic_istringstream
basic_ostringstream
basic_stringstream
I/O manipulators
C-style I/O

Localizations library

Regular expression library (since C++11)

Atomic operations library (since C++11)

Thread support library (since C++11)

Retrieved from "http://en.cppreference.com/w/cpp"
 
以上标有“since C++11”字样的是已经到来的新特性。
目前支持较好的是:
windows平台:              VS2010SP1以上版本
linux平台:                       GCC4.7以上版本
android以及arm平台:  交叉编译的gcc4.7以上版本
mac os x平台:               GCC4.7
 ios平台:                         或可用交叉编译的GCC4.7 
 
我比较关心的主要有:
1、容器里的unordered系列容器,里边有hash map等实现,不必再使用boost、stlport等库实现。
2、正则表达式regular express,不必使用boost等库。
3、原子操作库atomic operations,不必再使用其他的各种CAS CAS2 DCAS代码,最小代价拥有最高的并发效率。
4、线程支持库thread support,不必再纠结windows平台,到底使用_beginthread_还是CreateThread,linux平台的pthread。而且语言级支持跨平台。
 
就像html5一样,解决flash和native app的封闭,最终迎来在语言级跨平台代码的统一。
然而,具体情况要具体分析,盲目的套用新技术可能会带来新的问题。
其中最需依赖就是编译器的支持。