哪个是对的?
std::string get_string()
{
std::string result;
// ... more operations.
return std::move(result);
}
或者
std::string&& get_string()
{
std::string result;
// ... more operations
return std::move(result);
}
?
如果我使用 std::move,函数类型应该是什么?