[libcxx-commits] [libcxx] [libc++] Fix bitset conversion functions and refactor constructor (PR #121348)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jun 18 09:36:10 PDT 2025


================
@@ -479,8 +466,30 @@ protected:
 
   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void flip() _NOEXCEPT;
 
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long to_ulong() const;
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long to_ullong() const;
+  template <size_t _Bit_size = _Size, __enable_if_t<(_Bit_size > sizeof(unsigned long) * CHAR_BIT), int> = 0>
----------------
ldionne wrote:

The same transformation can be done here with `if _LIBCPP_CONSTEXPR`.

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


More information about the libcxx-commits mailing list