diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 895326f..4436b57 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -13399,7 +13399,8 @@ Application concepts are easier to reason about. void some_fun() { std::string msg, msg2; - std::thread publisher([&] { msg = "Hello"; }); // bad (less expressive and more error-prone) + std::thread publisher([&] { msg = "Hello"; }); // bad: less expressive + // and more error-prone auto pubtask = std::async([&] { msg2 = "Hello"; }); // OK // ... publisher.join();