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

Yihan Wang via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jun 12 07:46:01 PDT 2026


================
@@ -27,173 +28,155 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 #if _LIBCPP_STD_VER >= 26
 
-template <class _Tp>
-struct __cw_fixed_value {
-  using __type _LIBCPP_NODEBUG = _Tp;
-  _LIBCPP_HIDE_FROM_ABI constexpr __cw_fixed_value(__type __v) noexcept : __data(__v) {}
-  _Tp __data;
-};
-
-template <class _Tp, size_t _Extent>
-struct __cw_fixed_value<_Tp[_Extent]> {
-  using __type _LIBCPP_NODEBUG = _Tp[_Extent];
-  _Tp __data[_Extent];
-
-  _LIBCPP_HIDE_FROM_ABI constexpr __cw_fixed_value(_Tp (&__arr)[_Extent]) noexcept
-      : __cw_fixed_value(__arr, make_index_sequence<_Extent>{}) {}
-
-private:
-  template <size_t... _Idxs>
-  _LIBCPP_HIDE_FROM_ABI constexpr __cw_fixed_value(_Tp (&__arr)[_Extent], index_sequence<_Idxs...>) noexcept
-      : __data{__arr[_Idxs]...} {}
-};
-
-template <class _Tp, size_t _Extent>
-__cw_fixed_value(_Tp (&)[_Extent]) -> __cw_fixed_value<_Tp[_Extent]>;
-
-template <__cw_fixed_value _Xp,
+template <auto _Xp,
 #  ifdef _LIBCPP_COMPILER_GCC
----------------
yronglin wrote:

Yeah, I remove all the 2 special GCC patch. But need to change `decltype(auto) value = (_Xp)` to `decltype((_Xp)) value = (_Xp)`.

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


More information about the libcxx-commits mailing list