29 #ifndef _GLIBCXX_PROFILE_BITSET 30 #define _GLIBCXX_PROFILE_BITSET 34 namespace std _GLIBCXX_VISIBILITY(default)
42 :
public _GLIBCXX_STD_C::bitset<_Nb>
44 typedef _GLIBCXX_STD_C::bitset<_Nb>
_Base;
48 #if __cplusplus < 201103L 52 constexpr
bitset() =
default;
55 #if __cplusplus >= 201103L 56 constexpr
bitset(
unsigned long long __val) noexcept
58 bitset(
unsigned long __val)
62 template<
typename _CharT,
typename _Traits,
typename _Alloc>
65 typename std::basic_string<_CharT, _Traits, _Alloc>::size_type
67 typename std::basic_string<_CharT, _Traits, _Alloc>::size_type
69 : _Base(__str, __pos, __n) { }
73 template<
class _CharT,
class _Traits,
class _Alloc>
75 typename std::basic_string<_CharT, _Traits, _Alloc>::size_type
77 typename std::basic_string<_CharT, _Traits, _Alloc>::size_type
79 _CharT __zero, _CharT __one = _CharT(
'1'))
80 : _Base(__str, __pos, __n, __zero, __one) { }
82 bitset(
const _Base& __x) : _Base(__x) { }
84 #if __cplusplus >= 201103L 85 template<
typename _CharT>
87 bitset(
const _CharT* __str,
88 typename std::basic_string<_CharT>::size_type __n
90 _CharT __zero = _CharT(
'0'), _CharT __one = _CharT(
'1'))
91 : _Base(__str, __n, __zero, __one) { }
96 operator&=(
const bitset<_Nb>& __rhs) _GLIBCXX_NOEXCEPT
103 operator|=(
const bitset<_Nb>& __rhs) _GLIBCXX_NOEXCEPT
110 operator^=(
const bitset<_Nb>& __rhs) _GLIBCXX_NOEXCEPT
117 operator<<=(
size_t __pos) _GLIBCXX_NOEXCEPT
124 operator>>=(
size_t __pos) _GLIBCXX_NOEXCEPT
131 set() _GLIBCXX_NOEXCEPT
140 set(
size_t __pos,
bool __val =
true)
142 _Base::set(__pos, __val);
147 reset() _GLIBCXX_NOEXCEPT
161 operator~()
const _GLIBCXX_NOEXCEPT
162 {
return bitset(~_M_base()); }
165 flip() _GLIBCXX_NOEXCEPT
179 operator==(
const bitset<_Nb>& __rhs)
const _GLIBCXX_NOEXCEPT
180 {
return _M_base() == __rhs; }
183 operator!=(
const bitset<_Nb>& __rhs)
const _GLIBCXX_NOEXCEPT
184 {
return _M_base() != __rhs; }
187 operator<<(
size_t __pos)
const _GLIBCXX_NOEXCEPT
191 operator>>(
size_t __pos)
const _GLIBCXX_NOEXCEPT
195 _M_base() _GLIBCXX_NOEXCEPT
199 _M_base()
const _GLIBCXX_NOEXCEPT
218 template<
typename _CharT,
typename _Traits,
size_t _Nb>
221 {
return __is >> __x._M_base(); }
223 template<
typename _CharT,
typename _Traits,
size_t _Nb>
225 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
227 {
return __os << __x._M_base(); }
230 #if __cplusplus >= 201103L 235 :
public __hash_base<size_t, __profile::bitset<_Nb>>
The bitset class represents a fixed-size sequence of bits.(Note that bitset does not meet the formal ...
Primary class template hash.
Managing sequences of characters and character-like objects.
ISO C++ entities toplevel namespace is std.
Template class basic_ostream.
bitset< _Nb > operator|(const bitset< _Nb > &__x, const bitset< _Nb > &__y) noexcept
Global bitwise operations on bitsets.
bitset< _Nb > operator^(const bitset< _Nb > &__x, const bitset< _Nb > &__y) noexcept
Global bitwise operations on bitsets.
bitset< _Nb > operator &(const bitset< _Nb > &__x, const bitset< _Nb > &__y) noexcept
Global bitwise operations on bitsets.
Template class basic_istream.
Class std::bitset wrapper with performance instrumentation, none at the moment.