WG21 的多伦多 meeting 刚刚结束,新增的语言特性有如下四个:
- Concepts TS
- Lambda capture of [=, this], Lambda 捕获列表的[=, this]现在等价于[=].
- Designated initializers, 也就是 C99 中的 struct A { int x; int y; int z; }; A b{.x = 1, .z = 2};这种写法.
- Template parameter lists on lambdas, 例如: auto f = []<typename T>(std::vector<t> vector) { };
详情请看草药·萨特刚发布的博客: https://herbsutter.com/2017/07/15/trip-report-summer-iso-c-standards-meeting-toronto/
Update:
Reddit 上有一篇更详细的改动清单: https://www.reddit.com/r/cpp/comments/6ngkgc/2017_toronto_iso_c_committee_discussion_thread/