[libcxx-commits] [libcxx] [libc++] Add missing constant_wrapper in the std domule (PR #202038)

via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jun 6 05:58:14 PDT 2026


https://github.com/huixie90 created https://github.com/llvm/llvm-project/pull/202038

None

>From 86d37ff21be925476a3ac2d0c9792e61ba1a9a85 Mon Sep 17 00:00:00 2001
From: Hui Xie <hui.xie1990 at gmail.com>
Date: Sat, 6 Jun 2026 13:57:52 +0100
Subject: [PATCH] [libc++] Add missing constant_wrapper in the std domule

---
 libcxx/modules/std/utility.inc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libcxx/modules/std/utility.inc b/libcxx/modules/std/utility.inc
index 77c21b87640dd..adefda68ee5eb 100644
--- a/libcxx/modules/std/utility.inc
+++ b/libcxx/modules/std/utility.inc
@@ -89,6 +89,12 @@ export namespace std {
   using std::in_place_index;
   using std::in_place_index_t;
 
+#if _LIBCPP_STD_VER >= 26
+  // [const.wrap.class], constant_wrapper
+  using std::constant_wrapper;
+  using std::cw;
+#endif // _LIBCPP_STD_VER >= 26
+
   // [depr.relops]
   namespace rel_ops {
     using rel_ops::operator!=;



More information about the libcxx-commits mailing list