热门
例子如下:
struct { int data; } stru; vector<stru> vec; stru s; s.data = 1; vec.push(std::move(s));
解析:std::move可以将右值变成左值,避免拷贝。