【发布时间】:2020-10-19 21:25:08
【问题描述】:
如果我只使用std::move 而没有任何赋值会发生什么?
std::string s = "Moving";
std::move(s); //What happens on this line to s?
//is s still valid here?
【问题讨论】:
-
谢谢。我通读了那个。根据我的理解,s 什么都不会发生?这就是答案吗?
-
@guarav 是的,没错。
标签: c++ c++11 move-semantics stdmove