...
接受多个参数, 表示一组/包东西(pack)- 用于
template parameter
=>template parameter pack
- 用于
function parameter types
=>function parameter type pack
- 用于
function parameters
=>function parameter pack
- 用于
- Inside variadic templates ,
sizeof...(args)
yields the number of arguments - 作用
- 递归
- 继承
vector<list<int> > // Ok in each C++ version
vector<list<int>> //Ok since C++11
nullptr
空指针 = 0/NULL
void f(int);
void f(void*);
f(0); //call f(int)
f(NULL); //calls f(int) if NULL is 0
f(nullptr); //calls f(void*)
Using auto is especially useful where the type is pretty long and/or complicated expression.