2021年5月19日

lambda

摘要: Lambda lambda 表达式 仅仅是一个表达式,例如 std::find_if(container.begin(),container.end(), [](int val) {return 0 < val && val < 10;} ); 中的 [](int val) {return 0 < 阅读全文

posted @ 2021-05-19 17:03 Ultraman_X 阅读(58) 评论(0) 推荐(0) 编辑

universal references

摘要: 避免overloading on universal references std::multiset<std::string> names; void logAndAdd(const std::string&name) { auto now = std::chrono::system_clock: 阅读全文

posted @ 2021-05-19 11:54 Ultraman_X 阅读(50) 评论(0) 推荐(0) 编辑

Copy Elision

摘要: Copy Elision Mandatory(强制性) elision of copy/move operations Under the following circumstances, the compilers are required to omit the copy and move co 阅读全文

posted @ 2021-05-19 10:30 Ultraman_X 阅读(56) 评论(0) 推荐(0) 编辑

导航