[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
================
@@ -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;
----------------
frederick-vs-ja wrote:
These lines can be simplified, IIUC.
```suggestion
(void)std::launch::any; // expected-warning {{'any' is deprecated}}
```
https://github.com/llvm/llvm-project/pull/173397
More information about the libcxx-commits
mailing list