I use function:
std::vector<int>&& f() {
std::vector<int> s;
for (auto i : names) {
s.push_back(this->f2(i));
}
return std::move(s);
}
the main function is:
int main() {
auto g = f();
}
I use debugger monitor and find that before executing return std::move(s), s is not empty, but why g is empty then?