找出 Result 工厂里的 bug

来自 引用
C++23 (GCC 13.3.0) 进阶 4分钟 找出 1处问题

找出这段生成结果工厂中的生命周期错误。

C++
#include <string>
struct Result {
    const std::string& name;
};
Result make_result() {
    std::string local = "ready";
    return {local};
}
在试验场中打开
报告错误