.. | ||
variadic | ||
alias.cpp | ||
auto.cpp | ||
BUILD | ||
constexpr.cpp | ||
decltype.cpp | ||
default_delete.cpp | ||
explicit.cpp | ||
final.cpp | ||
hash.cpp | ||
initializer.cpp | ||
lambda.cpp | ||
move.cpp | ||
noexcept.cpp | ||
nullptr.cpp | ||
override.cpp | ||
README.md | ||
rvalue.cpp | ||
template_template.cpp | ||
tuple.cpp | ||
type_alias.cpp | ||
uniform_initialization.cpp |
C++新特性
1.C++11新特性
-
Spaces in Template Expressions
vector<list<int> > //ok in each C++ version vector<list<int>> // before c++ 11 error error: ‘>>’ should be ‘> >’ within a nested template argument list,c++11后可以正常通过
-
for(decl:col) { statement }
-
如果你自行定义了一个ctor,那么编译器就不会给你一个default ctor 如果强制加上=default,就可以重新获得并使用default ctor.
-
Alias(化名)Template(template typedef)
-
容器-结构与分类
- (1) 序列式容器包括:array(C++2.0新引入),vector,deque,list,forward_list(C++2.0新引入)
- (2) 关联式容器包括:set/multiset,map/multimap
- (3) 无序容器(C++2.0新引入,更换原先hash_xxx为unordered_xxx)包括:unordered_map/unordered_multimap,unordered_set/unordered_multiset
-
学习资料:https://www.bilibili.com/video/av51863195?from=search&seid=3610634846288253061