@@ -681,45 +681,54 @@ public:
681681
682682 // element access:
683683# ifdef _LIBCPP_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL
684- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool operator [](size_t __p) const {
684+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool operator [](size_t __p) const {
685685 _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS (__p < _Size, " bitset::operator[] index out of bounds" );
686686 return __base::__make_ref (__p);
687687 }
688688# else
689- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __const_reference operator [](size_t __p) const {
689+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __const_reference operator [](size_t __p) const {
690690 _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS (__p < _Size, " bitset::operator[] index out of bounds" );
691691 return __base::__make_ref (__p);
692692 }
693693# endif
694- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 reference operator [](size_t __p) {
694+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 reference operator [](size_t __p) {
695695 _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS (__p < _Size, " bitset::operator[] index out of bounds" );
696696 return __base::__make_ref (__p);
697697 }
698- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long to_ulong () const { return __base::to_ulong (); }
699- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long to_ullong () const {
698+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long to_ulong () const {
699+ return __base::to_ulong ();
700+ }
701+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long to_ullong () const {
700702 return __base::to_ullong ();
701703 }
702704 template <class _CharT , class _Traits , class _Allocator >
703- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 basic_string<_CharT, _Traits, _Allocator>
705+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 basic_string<_CharT, _Traits, _Allocator>
704706 to_string (_CharT __zero = _CharT(' 0' ), _CharT __one = _CharT(' 1' )) const ;
705707 template <class _CharT , class _Traits >
706- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 basic_string<_CharT, _Traits, allocator<_CharT> >
708+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI
709+ _LIBCPP_CONSTEXPR_SINCE_CXX23 basic_string<_CharT, _Traits, allocator<_CharT> >
707710 to_string (_CharT __zero = _CharT(' 0' ), _CharT __one = _CharT(' 1' )) const ;
708711 template <class _CharT >
709- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> >
712+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI
713+ _LIBCPP_CONSTEXPR_SINCE_CXX23 basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> >
710714 to_string (_CharT __zero = _CharT(' 0' ), _CharT __one = _CharT(' 1' )) const ;
711- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 basic_string<char , char_traits<char >, allocator<char > >
715+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI
716+ _LIBCPP_CONSTEXPR_SINCE_CXX23 basic_string<char , char_traits<char >, allocator<char > >
712717 to_string (char __zero = ' 0' , char __one = ' 1' ) const ;
713- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 size_t count () const _NOEXCEPT;
714- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR size_t size () const _NOEXCEPT { return _Size; }
718+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 size_t count () const _NOEXCEPT;
719+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR size_t size () const _NOEXCEPT { return _Size; }
715720 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool operator ==(const bitset& __rhs) const _NOEXCEPT;
716721# if _LIBCPP_STD_VER <= 17
717722 _LIBCPP_HIDE_FROM_ABI bool operator !=(const bitset& __rhs) const _NOEXCEPT;
718723# endif
719- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool test (size_t __pos) const ;
720- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool all () const _NOEXCEPT { return __base::all (); }
721- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool any () const _NOEXCEPT { return __base::any (); }
722- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool none () const _NOEXCEPT { return !any (); }
724+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool test (size_t __pos) const ;
725+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool all () const _NOEXCEPT {
726+ return __base::all ();
727+ }
728+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool any () const _NOEXCEPT {
729+ return __base::any ();
730+ }
731+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool none () const _NOEXCEPT { return !any (); }
723732 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset operator <<(size_t __pos) const _NOEXCEPT;
724733 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset operator >>(size_t __pos) const _NOEXCEPT;
725734
0 commit comments