Lambda lifetime explanation for C++20 coroutines
问题 Folly has a useable library for C++20 style coroutines. In the Readme it claims: IMPORTANT: You need to be very careful about the lifetimes of temporary lambda objects. Invoking a lambda coroutine returns a folly::coro::Task that captures a reference to the lambda and so if the returned Task is not immediately co_awaited then the task will be left with a dangling reference when the temporary lambda goes out of scope. I tried to make a MCVE for the example they provided, and was confused about