Lines Matching refs:bitset
1 // <bitset> -*- C++ -*-
40 /** @file include/bitset
70 * See documentation for bitset.
371 * See documentation for bitset.
516 * Base class, specialization for no storage (zero-length %bitset).
518 * See documentation for bitset.
552 // in the bitset class will prevent the user from getting this far,
607 // the sound of one zero-length bitset clapping?
686 * The %bitset class represents a @e fixed-size sequence of bits.
690 * (Note that %bitset does @e not meet the formal requirements of a
702 * If you think of %bitset as <em>a simple array of bits</em>, be
703 * aware that your mental picture is reversed: a %bitset behaves
707 * Thus, unlike other containers, a %bitset's index <em>counts from
715 * #include <bitset>
724 * bitset<10> b(a);
732 * << "index 3 in the bitset is " << b[3] << endl;
740 * Most of the actual code isn't contained in %bitset<> itself, but in the
743 * important special case where the %bitset is only a single word.
750 class bitset
783 friend class bitset;
792 reference(bitset& __b, size_t __pos) _GLIBCXX_NOEXCEPT
844 _GLIBCXX_CONSTEXPR bitset() _GLIBCXX_NOEXCEPT
849 constexpr bitset(unsigned long long __val) noexcept
852 bitset(unsigned long __val)
868 bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s,
873 __throw_out_of_range(__N("bitset::bitset initial position "
891 bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s,
896 __throw_out_of_range(__N("bitset::bitset initial position "
904 bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s,
910 __throw_out_of_range(__N("bitset::bitset initial position "
927 bitset(const _CharT* __str,
934 __throw_logic_error(__N("bitset::bitset(const _CharT*, ...)"));
944 // 23.3.5.2 bitset operations:
948 * @param __rhs A same-sized bitset.
952 bitset<_Nb>&
953 operator&=(const bitset<_Nb>& __rhs) _GLIBCXX_NOEXCEPT
959 bitset<_Nb>&
960 operator|=(const bitset<_Nb>& __rhs) _GLIBCXX_NOEXCEPT
966 bitset<_Nb>&
967 operator^=(const bitset<_Nb>& __rhs) _GLIBCXX_NOEXCEPT
981 bitset<_Nb>&
994 bitset<_Nb>&
1014 bitset<_Nb>&
1021 bitset<_Nb>&
1031 bitset<_Nb>&
1038 bitset<_Nb>&
1055 bitset<_Nb>&
1069 bitset<_Nb>&
1073 __throw_out_of_range(__N("bitset::set"));
1080 bitset<_Nb>&
1094 bitset<_Nb>&
1098 __throw_out_of_range(__N("bitset::reset"));
1105 bitset<_Nb>&
1118 bitset<_Nb>&
1122 __throw_out_of_range(__N("bitset::flip"));
1127 bitset<_Nb>
1129 { return bitset<_Nb>(*this).flip(); }
1134 * @param __position Index into the %bitset.
1135 * @return A bool for a <em>const %bitset</em>. For non-const
1156 * @brief Returns a numerical interpretation of the %bitset.
1172 * @brief Returns a character interpretation of the %bitset.
1200 // 434. bitset::to_string() hard to use.
1290 operator==(const bitset<_Nb>& __rhs) const _GLIBCXX_NOEXCEPT
1294 operator!=(const bitset<_Nb>& __rhs) const _GLIBCXX_NOEXCEPT
1308 __throw_out_of_range(__N("bitset::test"));
1313 // DR 693. std::bitset::all() missing.
1340 bitset<_Nb>
1342 { return bitset<_Nb>(*this) <<= __position; }
1344 bitset<_Nb>
1346 { return bitset<_Nb>(*this) >>= __position; }
1375 bitset<_Nb>::
1389 __throw_invalid_argument(__N("bitset::_M_copy_from_ptr"));
1396 bitset<_Nb>::
1406 // 23.3.5.3 bitset operations:
1410 * @param __x A bitset.
1411 * @param __y A bitset of the same size as @a __x.
1412 * @return A new bitset.
1417 inline bitset<_Nb>
1418 operator&(const bitset<_Nb>& __x, const bitset<_Nb>& __y) _GLIBCXX_NOEXCEPT
1420 bitset<_Nb> __result(__x);
1426 inline bitset<_Nb>
1427 operator|(const bitset<_Nb>& __x, const bitset<_Nb>& __y) _GLIBCXX_NOEXCEPT
1429 bitset<_Nb> __result(__x);
1435 inline bitset<_Nb>
1436 operator^(const bitset<_Nb>& __x, const bitset<_Nb>& __y) _GLIBCXX_NOEXCEPT
1438 bitset<_Nb> __result(__x);
1450 * characters, and will only extract as many digits as the %bitset will
1455 operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
1524 const bitset<_Nb>& __x)
1552 /// std::hash specialization for bitset.
1554 struct hash<_GLIBCXX_STD_C::bitset<_Nb>>
1555 : public __hash_base<size_t, _GLIBCXX_STD_C::bitset<_Nb>>
1558 operator()(const _GLIBCXX_STD_C::bitset<_Nb>& __b) const noexcept
1566 struct hash<_GLIBCXX_STD_C::bitset<0>>
1567 : public __hash_base<size_t, _GLIBCXX_STD_C::bitset<0>>
1570 operator()(const _GLIBCXX_STD_C::bitset<0>&) const noexcept
1580 # include <debug/bitset>
1584 # include <profile/bitset>