Content deleted Content added
No edit summary |
→C++: fixed a lifetime related bug which causes using a dangling reference to a stack variable (can be confirmed with address sanitizer or static analyzers) |
||
Line 66:
auto twice = [](const std::function<int(int)>& f)
{
return [
return f(f(x));
};
Line 91:
auto twice = [](const auto& f)
{
return [
return f(f(x));
};
|