@@ -260,7 +260,6 @@ protected:
260260 return __to_ulong ();
261261 }
262262
263- # ifndef _LIBCPP_CXX03_LANG
264263 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long to_ullong () const {
265264 // Check for overflow if _Size does not fit in unsigned long long
266265 if _LIBCPP_CONSTEXPR (_Size > sizeof (unsigned long long ) * CHAR_BIT) {
@@ -284,7 +283,6 @@ protected:
284283 return __r;
285284 }
286285 }
287- # endif
288286
289287 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool all () const _NOEXCEPT { return !__scan_bits (__bit_not ()); }
290288 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool any () const _NOEXCEPT {
@@ -335,15 +333,6 @@ private:
335333# ifdef _LIBCPP_CXX03_LANG
336334 void __init (unsigned long long __v, false_type) _NOEXCEPT;
337335 _LIBCPP_HIDE_FROM_ABI void __init (unsigned long long __v, true_type) _NOEXCEPT;
338-
339- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long __to_ulong (false_type) const ;
340- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long __to_ulong (true_type) const ;
341- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long __to_ulong (true_type, false_type) const ;
342- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long __to_ulong (true_type, true_type) const ;
343- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long __to_ullong (false_type) const ;
344- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long __to_ullong (true_type) const ;
345- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long __to_ullong (true_type, false_type) const ;
346- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long __to_ullong (true_type, true_type) const ;
347336# else
348337 template <size_t ... _Indices>
349338 _LIBCPP_HIDE_FROM_ABI constexpr __bitset (unsigned long long __v, std::__tuple_indices<_Indices...>) _NOEXCEPT
@@ -391,7 +380,7 @@ inline _LIBCPP_CONSTEXPR __bitset<_N_words, _Size>::__bitset(unsigned long long
391380# endif
392381{
393382# ifdef _LIBCPP_CXX03_LANG
394- __init (__v, _BoolConstant<sizeof (unsigned long long ) = = sizeof (__storage_type)>());
383+ __init (__v, _BoolConstant<sizeof (unsigned long long ) < = sizeof (__storage_type)>());
395384# endif
396385}
397386
@@ -501,7 +490,6 @@ protected:
501490 return static_cast <unsigned long >(__first_);
502491 }
503492
504- # ifndef _LIBCPP_CXX03_LANG
505493 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long to_ullong () const {
506494 // If _Size exceeds the size of unsigned long long, check for overflow
507495 if _LIBCPP_CONSTEXPR (_Size > sizeof (unsigned long long ) * CHAR_BIT) {
@@ -513,7 +501,6 @@ protected:
513501 // If _Size fits or no overflow, directly cast to unsigned long long
514502 return static_cast <unsigned long long >(__first_);
515503 }
516- # endif
517504
518505 template <bool _Sparse, class _CharT , class _Traits , class _Allocator >
519506 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 basic_string<_CharT, _Traits, _Allocator>
@@ -540,8 +527,9 @@ inline _LIBCPP_CONSTEXPR __bitset<1, _Size>::__bitset() _NOEXCEPT : __first_(0)
540527
541528template <size_t _Size>
542529inline _LIBCPP_CONSTEXPR __bitset<1 , _Size>::__bitset(unsigned long long __v) _NOEXCEPT
543- // TODO: This is a workaround for a GCC bug causing stage1 CI (generic-gcc, gcc-14, g++-14)
544- // failure due to __bits_per_word lookup failure if not referenced here.
530+ // TODO: This is a workaround for a gdb test failure (gdb_pretty_printer_test.sh.cpp) in
531+ // stage1 CI (generic-gcc, gcc-14, g++-14), due to the __bits_per_word name lookup failure
532+ // if not referenced in the constructor initializer list.
545533 // See: https://github.com/llvm/llvm-project/actions/runs/15071518915/job/42368867929?pr=121348#logs
546534 : __first_(_Size == __bits_per_word ? static_cast <__storage_type>(__v) : static_cast <__storage_type>(__v)) {}
547535
@@ -630,9 +618,7 @@ protected:
630618 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void flip () _NOEXCEPT {}
631619
632620 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long to_ulong () const { return 0UL ; }
633- # ifndef _LIBCPP_CXX03_LANG
634621 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long to_ullong () const { return 0ULL ; }
635- # endif
636622
637623 template <bool _Sparse, class _CharT , class _Traits , class _Allocator >
638624 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 basic_string<_CharT, _Traits, _Allocator>
@@ -660,8 +646,6 @@ class bitset : private __bitset<_Size == 0 ? 0 : (_Size - 1) / (sizeof(size_t) *
660646public:
661647 static const unsigned __n_words = _Size == 0 ? 0 : (_Size - 1 ) / (sizeof (size_t ) * CHAR_BIT) + 1 ;
662648 typedef __bitset<__n_words, _Size> __base;
663-
664- public:
665649 typedef typename __base::reference reference;
666650 typedef typename __base::__const_reference __const_reference;
667651
@@ -741,11 +725,9 @@ public:
741725 return __base::__make_ref (__p);
742726 }
743727 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long to_ulong () const { return __base::to_ulong (); }
744- # ifndef _LIBCPP_CXX03_LANG
745728 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long to_ullong () const {
746729 return __base::to_ullong ();
747730 }
748- # endif
749731 template <class _CharT , class _Traits , class _Allocator >
750732 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 basic_string<_CharT, _Traits, _Allocator>
751733 to_string (_CharT __zero = _CharT(' 0' ), _CharT __one = _CharT(' 1' )) const ;
0 commit comments