Daily C/C++ 新版本C++中的易用性改进 参考文章 首先就是auto,自动类型推导 auto可以帮助我们推导表达式的类型,同时这是编译期发生的事,所以和我们自己写类型是一样的,不过可以帮助我们写出更加通用简洁的代码 比如这段代码 template <typename T> void foo(const T& c) { using std::begin; using std::end; for (auto it = begin(c), ite = end(c); it != ite; +…