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

via libcxx-commits libcxx-commits at lists.llvm.org
Tue Dec 23 22:18:15 PST 2025


================
@@ -0,0 +1,21 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <future>
+
+// enum class launch;
+
+// Verify that std::launch::any is deprecated.
+// It was a draft C++11 feature that was removed, but libc++ kept it as an extension.
+
+#include <future>
+
+void test() {
+  auto l = std::launch::any; // expected-warning {{'any' is deprecated}}
+  (void)l;
----------------
sohail103 wrote:

Changed as suggested.

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


More information about the libcxx-commits mailing list