Access a function's return value in C++ scope guard

It is best to avoid accessing a function's return value in a scope guard or we need to be really careful about the return value's lifetime. Happy case Scope guard is a simple RAII concept in C++ that, in most cases, just works. struct ScopeGuard { ScopeGuard(std::vector& v): v_

C++ coroutine and lambda's lifetime

We rarely need to worry about lambda's lifetime more than any other objects in C++ until we are dealing with coroutine at the same time. folly's wiki has a good example of why we need to be careful about lambda's lifetime – https://github.com/facebook/folly/blob/main/folly/experimental/…

Build `folly::coro` with GCC

You have heard about Coroutine in C++, and you want to use it. There're two coroutine implementations that are considered most mature - cppcoro and folly::coro. They are written by the same guy - Lewis Baker. He's brilliant, and you shoud watch his cppcon talk on structured concurrency [https:…