[libcxx-commits] [libcxx] [libc++] Implement P4206R0 Revert string support in std::constant_wrapper (PR #203338)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jun 11 19:07:49 PDT 2026


================
@@ -288,11 +265,20 @@ concept __constexpr_indexable = (__constexpr_param<remove_cvref_t<_Args>> && ...
   typename constant_wrapper<_Obj[remove_cvref_t<_Args>::value...]>;
 };
 
-template <__cw_fixed_value _Xp, class>
+template <auto _Xp, class _Tp>
 struct constant_wrapper : __cw_operators {
-  static constexpr const auto& value = _Xp.__data;
-  using type                         = constant_wrapper;
-  using value_type                   = decltype(_Xp)::__type;
+#  ifdef _LIB_CPP_COMPILER_GCC
----------------
frederick-vs-ja wrote:

```suggestion
#  ifdef _LIBCPP_COMPILER_GCC
```

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


More information about the libcxx-commits mailing list