Lines Matching refs:bitset
2 //===---------------------------- bitset ----------------------------------===//
15 bitset synopsis
23 class bitset
29 friend class bitset;
41 constexpr bitset() noexcept;
42 constexpr bitset(unsigned long long val) noexcept;
44 explicit bitset(const charT* str,
48 explicit bitset(const basic_string<charT,traits,Allocator>& str,
54 // 23.3.5.2 bitset operations:
55 bitset& operator&=(const bitset& rhs) noexcept;
56 bitset& operator|=(const bitset& rhs) noexcept;
57 bitset& operator^=(const bitset& rhs) noexcept;
58 bitset& operator<<=(size_t pos) noexcept;
59 bitset& operator>>=(size_t pos) noexcept;
60 bitset& set() noexcept;
61 bitset& set(size_t pos, bool val = true);
62 bitset& reset() noexcept;
63 bitset& reset(size_t pos);
64 bitset operator~() const noexcept;
65 bitset& flip() noexcept;
66 bitset& flip(size_t pos);
82 bool operator==(const bitset& rhs) const noexcept;
83 bool operator!=(const bitset& rhs) const noexcept;
88 bitset operator<<(size_t pos) const noexcept;
89 bitset operator>>(size_t pos) const noexcept;
92 // 23.3.5.3 bitset operators:
94 bitset<N> operator&(const bitset<N>&, const bitset<N>&) noexcept;
97 bitset<N> operator|(const bitset<N>&, const bitset<N>&) noexcept;
100 bitset<N> operator^(const bitset<N>&, const bitset<N>&) noexcept;
104 operator>>(basic_istream<charT, traits>& is, bitset<N>& x);
108 operator<<(basic_ostream<charT, traits>& os, const bitset<N>& x);
110 template <size_t N> struct hash<std::bitset<N>>;
320 throw overflow_error("bitset to_ulong overflow error");
322 assert(!"bitset to_ulong overflow error");
343 throw overflow_error("bitset to_ullong overflow error");
345 assert(!"bitset to_ullong overflow error");
635 template <size_t _Size> class _LIBCPP_TYPE_VIS_ONLY bitset;
636 template <size_t _Size> struct _LIBCPP_TYPE_VIS_ONLY hash<bitset<_Size> >;
639 class _LIBCPP_TYPE_VIS_ONLY bitset
651 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bitset() _NOEXCEPT {}
653 bitset(unsigned long long __v) _NOEXCEPT : base(__v) {}
655 explicit bitset(const _CharT* __str,
659 explicit bitset(const basic_string<_CharT,_Traits,_Allocator>& __str,
665 // 23.3.5.2 bitset operations:
666 bitset& operator&=(const bitset& __rhs) _NOEXCEPT;
667 bitset& operator|=(const bitset& __rhs) _NOEXCEPT;
668 bitset& operator^=(const bitset& __rhs) _NOEXCEPT;
669 bitset& operator<<=(size_t __pos) _NOEXCEPT;
670 bitset& operator>>=(size_t __pos) _NOEXCEPT;
671 bitset& set() _NOEXCEPT;
672 bitset& set(size_t __pos, bool __val = true);
673 bitset& reset() _NOEXCEPT;
674 bitset& reset(size_t __pos);
675 bitset operator~() const _NOEXCEPT;
676 bitset& flip() _NOEXCEPT;
677 bitset& flip(size_t __pos);
698 bool operator==(const bitset& __rhs) const _NOEXCEPT;
699 bool operator!=(const bitset& __rhs) const _NOEXCEPT;
704 bitset operator<<(size_t __pos) const _NOEXCEPT;
705 bitset operator>>(size_t __pos) const _NOEXCEPT;
712 friend struct hash<bitset>;
717 bitset<_Size>::bitset(const _CharT* __str,
725 throw invalid_argument("bitset string ctor has invalid argument");
727 assert(!"bitset string ctor has invalid argument");
744 bitset<_Size>::bitset(const basic_string<_CharT,_Traits,_Allocator>& __str,
751 throw out_of_range("bitset string pos out of range");
753 assert(!"bitset string pos out of range");
759 throw invalid_argument("bitset string ctor has invalid argument");
761 assert(!"bitset string ctor has invalid argument");
778 bitset<_Size>&
779 bitset<_Size>::operator&=(const bitset& __rhs) _NOEXCEPT
787 bitset<_Size>&
788 bitset<_Size>::operator|=(const bitset& __rhs) _NOEXCEPT
796 bitset<_Size>&
797 bitset<_Size>::operator^=(const bitset& __rhs) _NOEXCEPT
804 bitset<_Size>&
805 bitset<_Size>::operator<<=(size_t __pos) _NOEXCEPT
814 bitset<_Size>&
815 bitset<_Size>::operator>>=(size_t __pos) _NOEXCEPT
825 bitset<_Size>&
826 bitset<_Size>::set() _NOEXCEPT
833 bitset<_Size>&
834 bitset<_Size>::set(size_t __pos, bool __val)
838 throw out_of_range("bitset set argument out of range");
840 assert(!"bitset set argument out of range");
848 bitset<_Size>&
849 bitset<_Size>::reset() _NOEXCEPT
856 bitset<_Size>&
857 bitset<_Size>::reset(size_t __pos)
861 throw out_of_range("bitset reset argument out of range");
863 assert(!"bitset reset argument out of range");
871 bitset<_Size>
872 bitset<_Size>::operator~() const _NOEXCEPT
874 bitset __x(*this);
881 bitset<_Size>&
882 bitset<_Size>::flip() _NOEXCEPT
889 bitset<_Size>&
890 bitset<_Size>::flip(size_t __pos)
894 throw out_of_range("bitset flip argument out of range");
896 assert(!"bitset flip argument out of range");
906 bitset<_Size>::to_ulong() const
914 bitset<_Size>::to_ullong() const
922 bitset<_Size>::to_string(_CharT __zero, _CharT __one) const
937 bitset<_Size>::to_string(_CharT __zero, _CharT __one) const
946 bitset<_Size>::to_string(_CharT __zero, _CharT __one) const
954 bitset<_Size>::to_string(char __zero, char __one) const
962 bitset<_Size>::count() const _NOEXCEPT
970 bitset<_Size>::operator==(const bitset& __rhs) const _NOEXCEPT
978 bitset<_Size>::operator!=(const bitset& __rhs) const _NOEXCEPT
985 bitset<_Size>::test(size_t __pos) const
989 throw out_of_range("bitset test argument out of range");
991 assert(!"bitset test argument out of range");
999 bitset<_Size>::all() const _NOEXCEPT
1007 bitset<_Size>::any() const _NOEXCEPT
1014 bitset<_Size>
1015 bitset<_Size>::operator<<(size_t __pos) const _NOEXCEPT
1017 bitset __r = *this;
1024 bitset<_Size>
1025 bitset<_Size>::operator>>(size_t __pos) const _NOEXCEPT
1027 bitset __r = *this;
1034 bitset<_Size>
1035 operator&(const bitset<_Size>& __x, const bitset<_Size>& __y) _NOEXCEPT
1037 bitset<_Size> __r = __x;
1044 bitset<_Size>
1045 operator|(const bitset<_Size>& __x, const bitset<_Size>& __y) _NOEXCEPT
1047 bitset<_Size> __r = __x;
1054 bitset<_Size>
1055 operator^(const bitset<_Size>& __x, const bitset<_Size>& __y) _NOEXCEPT
1057 bitset<_Size> __r = __x;
1063 struct _LIBCPP_TYPE_VIS_ONLY hash<bitset<_Size> >
1064 : public unary_function<bitset<_Size>, size_t>
1067 size_t operator()(const bitset<_Size>& __bs) const _NOEXCEPT
1073 operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Size>& __x);
1077 operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Size>& __x);