I have an code example like below:
std::vector<std::string> func() {
std::vector result;
// insert value into the result.
return result;
}
void other_func() {
const auto& var = func();
....
}
It could compile. What will the var hold? Is it a temporary value of the func()?