We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
写的是:
move的作用: 进行语义转移,将一个对象的所有权或者说管理权转移到另一个对象上
我不知道这个 move 是否指代 std::move,但我觉得这个语境大概率是。 std::move 本身并不转移所有权,这个解释是错误的。 std::move 只是一个模板函数,无条件的将传入对象转换到右值引用,这个函数调用表达式,是亡值表达式(右值表达式的一种),通过 std::move 去匹配其他类型的移动构造,然后根据移动构造的实现,去转移所有权。
move
std::move
The text was updated successfully, but these errors were encountered:
No branches or pull requests
写的是:
我不知道这个
move
是否指代std::move
,但我觉得这个语境大概率是。std::move
本身并不转移所有权,这个解释是错误的。std::move
只是一个模板函数,无条件的将传入对象转换到右值引用,这个函数调用表达式,是亡值表达式(右值表达式的一种),通过std::move
去匹配其他类型的移动构造,然后根据移动构造的实现,去转移所有权。The text was updated successfully, but these errors were encountered: