#endif
// 23.3.5.2 bitset operations:
- //@{
+ ///@{
/**
* Operations on bitsets.
* @param __rhs A same-sized bitset.
this->_M_do_xor(__rhs);
return *this;
}
- //@}
+ ///@}
- //@{
+ ///@{
/**
* Operations on bitsets.
* @param __position The number of places to shift.
this->_M_do_reset();
return *this;
}
- //@}
+ ///@}
- //@{
+ ///@{
/**
* These versions of single-bit set, reset, flip, and test are
* extensions from the SGI version. They do no range checking.
_Unchecked_test(size_t __pos) const _GLIBCXX_NOEXCEPT
{ return ((this->_M_getword(__pos) & _Base::_S_maskbit(__pos))
!= static_cast<_WordT>(0)); }
- //@}
+ ///@}
// Set, reset, and flip.
/**
operator~() const _GLIBCXX_NOEXCEPT
{ return bitset<_Nb>(*this).flip(); }
- //@{
+ ///@{
/**
* @brief Array-indexing support.
* @param __position Index into the %bitset.
_GLIBCXX_CONSTEXPR bool
operator[](size_t __position) const
{ return _Unchecked_test(__position); }
- //@}
+ ///@}
/**
* @brief Returns a numerical interpretation of the %bitset.
size() const _GLIBCXX_NOEXCEPT
{ return _Nb; }
- //@{
+ ///@{
/// These comparisons for equality/inequality are, well, @e bitwise.
bool
operator==(const bitset<_Nb>& __rhs) const _GLIBCXX_NOEXCEPT
operator!=(const bitset<_Nb>& __rhs) const _GLIBCXX_NOEXCEPT
{ return !this->_M_is_equal(__rhs); }
#endif
- //@}
+ ///@}
/**
* @brief Tests the value of a bit.
none() const _GLIBCXX_NOEXCEPT
{ return !this->_M_is_any(); }
- //@{
+ ///@{
/// Self-explanatory.
bitset<_Nb>
operator<<(size_t __position) const _GLIBCXX_NOEXCEPT
bitset<_Nb>
operator>>(size_t __position) const _GLIBCXX_NOEXCEPT
{ return bitset<_Nb>(*this) >>= __position; }
- //@}
+ ///@}
/**
* @brief Finds the index of the first "on" bit.
}
// 23.3.5.3 bitset operations:
- //@{
+ ///@{
/**
* @brief Global bitwise operations on bitsets.
* @param __x A bitset.
__result ^= __y;
return __result;
}
- //@}
+ ///@}
- //@{
+ ///@{
/**
* @brief Global I/O operators for bitsets.
*
__x._M_copy_to_string(__tmp, __ct.widen('0'), __ct.widen('1'));
return __os << __tmp;
}
- //@}
+ ///@}
_GLIBCXX_END_NAMESPACE_CONTAINER
} // namespace std