@@ -260,7 +260,6 @@ protected:
260
260
return __to_ulong ();
261
261
}
262
262
263
- # ifndef _LIBCPP_CXX03_LANG
264
263
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long to_ullong () const {
265
264
// Check for overflow if _Size does not fit in unsigned long long
266
265
if _LIBCPP_CONSTEXPR (_Size > sizeof (unsigned long long ) * CHAR_BIT) {
@@ -284,7 +283,6 @@ protected:
284
283
return __r;
285
284
}
286
285
}
287
- # endif
288
286
289
287
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool all () const _NOEXCEPT { return !__scan_bits (__bit_not ()); }
290
288
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool any () const _NOEXCEPT {
@@ -335,15 +333,6 @@ private:
335
333
# ifdef _LIBCPP_CXX03_LANG
336
334
void __init (unsigned long long __v, false_type) _NOEXCEPT;
337
335
_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 ;
347
336
# else
348
337
template <size_t ... _Indices>
349
338
_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
391
380
# endif
392
381
{
393
382
# 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)>());
395
384
# endif
396
385
}
397
386
@@ -501,7 +490,6 @@ protected:
501
490
return static_cast <unsigned long >(__first_);
502
491
}
503
492
504
- # ifndef _LIBCPP_CXX03_LANG
505
493
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long to_ullong () const {
506
494
// If _Size exceeds the size of unsigned long long, check for overflow
507
495
if _LIBCPP_CONSTEXPR (_Size > sizeof (unsigned long long ) * CHAR_BIT) {
@@ -513,7 +501,6 @@ protected:
513
501
// If _Size fits or no overflow, directly cast to unsigned long long
514
502
return static_cast <unsigned long long >(__first_);
515
503
}
516
- # endif
517
504
518
505
template <bool _Sparse, class _CharT , class _Traits , class _Allocator >
519
506
_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)
540
527
541
528
template <size_t _Size>
542
529
inline _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.
545
533
// See: https://github.com/llvm/llvm-project/actions/runs/15071518915/job/42368867929?pr=121348#logs
546
534
: __first_(_Size == __bits_per_word ? static_cast <__storage_type>(__v) : static_cast <__storage_type>(__v)) {}
547
535
@@ -630,9 +618,7 @@ protected:
630
618
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void flip () _NOEXCEPT {}
631
619
632
620
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long to_ulong () const { return 0UL ; }
633
- # ifndef _LIBCPP_CXX03_LANG
634
621
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long to_ullong () const { return 0ULL ; }
635
- # endif
636
622
637
623
template <bool _Sparse, class _CharT , class _Traits , class _Allocator >
638
624
_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) *
660
646
public:
661
647
static const unsigned __n_words = _Size == 0 ? 0 : (_Size - 1 ) / (sizeof (size_t ) * CHAR_BIT) + 1 ;
662
648
typedef __bitset<__n_words, _Size> __base;
663
-
664
- public:
665
649
typedef typename __base::reference reference;
666
650
typedef typename __base::__const_reference __const_reference;
667
651
@@ -744,11 +728,9 @@ public:
744
728
return __base::__make_ref (__p);
745
729
}
746
730
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long to_ulong () const { return __base::to_ulong (); }
747
- # ifndef _LIBCPP_CXX03_LANG
748
731
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long to_ullong () const {
749
732
return __base::to_ullong ();
750
733
}
751
- # endif
752
734
template <class _CharT , class _Traits , class _Allocator >
753
735
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 basic_string<_CharT, _Traits, _Allocator>
754
736
to_string (_CharT __zero = _CharT(' 0' ), _CharT __one = _CharT(' 1' )) const ;
0 commit comments