(A)
std::string doNothing(const std::string&& s)
{
return std::move(s);
}
(B)
std::string doNothing(const std::string& s)
{
return std::move(s);
}
(Test)
const std::string str = "aaaaaa";
const auto str2 = doNothing(str);
two questions:
- are (A) and (B) differetnt?
- in (Test): will str be undefined? after it is moved to str2?