Find the lifetime bug in this generated result factory.
C++
#include <string>
struct Result {
const std::string& name;
};
Result make_result() {
std::string local = "ready";
return {local};
}
#include <string>
struct Result {
const std::string& name;
};
Result make_result() {
std::string local = "ready";
return {local};
}