[libcxx-commits] [libcxx] [libc++] Deprecate non-standard std::launch::any extension (PR #173397)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Tue Dec 23 17:21:15 PST 2025


================
@@ -19,4 +19,5 @@
 void test() {
   std::async([]() {});                   // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
   std::async(std::launch::any, []() {}); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
----------------
frederick-vs-ja wrote:

I think we shouldn't use `launch::any` here, and should use standard enumerators instead.

https://github.com/llvm/llvm-project/pull/173397


More information about the libcxx-commits mailing list