.TH "std::bitset< _Nb >" 3 "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::bitset< _Nb > \- The bitset class represents a \fIfixed-size\fP sequence of bits\&. .SH SYNOPSIS .br .PP .PP \fR#include \fP .PP Inherits \fBstd::_Base_bitset<((_Nb)/(__CHAR_BIT__ *__SIZEOF_LONG__)+((_Nb) %(__CHAR_BIT__ *__SIZEOF_LONG__)==0 ? 0 :1))>\fP\&. .SS "Classes" .in +1c .ti -1c .RI "class \fBreference\fP" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "constexpr \fBbitset\fP () noexcept" .br .RI "All bits set to zero\&. " .ti -1c .RI "template, is_standard_layout<_CharT>, is_trivially_default_constructible<_CharT>, __not_>>> constexpr \fBbitset\fP (const _CharT *__str, typename __bitset::__string< _CharT >\fB::size_type\fP __n=__bitset::__string< _CharT >::npos, _CharT __zero=_CharT('0'), _CharT __one=_CharT('1'))" .br .ti -1c .RI "template constexpr \fBbitset\fP (const \fBstd::basic_string\fP< _CharT, _Traits, _Alloc > &__s, size_t __position, size_t __n)" .br .ti -1c .RI "template constexpr \fBbitset\fP (const \fBstd::basic_string\fP< _CharT, _Traits, _Alloc > &__s, size_t __position, size_t __n, _CharT __zero, _CharT __one=_CharT('1'))" .br .ti -1c .RI "template constexpr \fBbitset\fP (const \fBstd::basic_string\fP< _CharT, _Traits, _Alloc > &__s, size_t __position=0)" .br .ti -1c .RI "constexpr \fBbitset\fP (unsigned long long __val) noexcept" .br .RI "Initial bits bitwise-copied from a single word (others set to zero)\&. " .ti -1c .RI "constexpr size_t \fB_Find_first\fP () const noexcept" .br .RI "Finds the index of the first "on" bit\&. " .ti -1c .RI "constexpr size_t \fB_Find_next\fP (size_t __prev) const noexcept" .br .RI "Finds the index of the next "on" bit after prev\&. " .ti -1c .RI "constexpr bool \fBall\fP () const noexcept" .br .RI "Tests whether all the bits are on\&. " .ti -1c .RI "constexpr bool \fBany\fP () const noexcept" .br .RI "Tests whether any of the bits are on\&. " .ti -1c .RI "constexpr size_t \fBcount\fP () const noexcept" .br .RI "Returns the number of bits which are set\&. " .ti -1c .RI "constexpr \fBbitset\fP< _Nb > & \fBflip\fP () noexcept" .br .RI "Toggles every bit to its opposite value\&. " .ti -1c .RI "constexpr \fBbitset\fP< _Nb > & \fBflip\fP (size_t __position)" .br .RI "Toggles a given bit to its opposite value\&. " .ti -1c .RI "constexpr bool \fBnone\fP () const noexcept" .br .RI "Tests whether any of the bits are on\&. " .ti -1c .RI "constexpr \fBbitset\fP< _Nb > \fBoperator~\fP () const noexcept" .br .RI "See the no-argument flip()\&. " .ti -1c .RI "constexpr \fBbitset\fP< _Nb > & \fBreset\fP () noexcept" .br .RI "Sets every bit to false\&. " .ti -1c .RI "constexpr \fBbitset\fP< _Nb > & \fBreset\fP (size_t __position)" .br .RI "Sets a given bit to false\&. " .ti -1c .RI "constexpr \fBbitset\fP< _Nb > & \fBset\fP () noexcept" .br .RI "Sets every bit to true\&. " .ti -1c .RI "constexpr \fBbitset\fP< _Nb > & \fBset\fP (size_t __position, bool __val=true)" .br .RI "Sets a given bit to a particular value\&. " .ti -1c .RI "constexpr size_t \fBsize\fP () const noexcept" .br .RI "Returns the total number of bits\&. " .ti -1c .RI "constexpr bool \fBtest\fP (size_t __position) const" .br .RI "Tests the value of a bit\&. " .ti -1c .RI "constexpr \fBstd::basic_string\fP< char, \fBstd::char_traits\fP< char >, \fBstd::allocator\fP< char > > \fBto_string\fP () const" .br .ti -1c .RI "template constexpr \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT >, \fBstd::allocator\fP< _CharT > > \fBto_string\fP () const" .br .ti -1c .RI "template constexpr \fBstd::basic_string\fP< _CharT, _Traits, \fBstd::allocator\fP< _CharT > > \fBto_string\fP () const" .br .ti -1c .RI "template constexpr \fBstd::basic_string\fP< _CharT, _Traits, _Alloc > \fBto_string\fP () const" .br .RI "Returns a character interpretation of the bitset\&. " .ti -1c .RI "template constexpr \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT >, \fBstd::allocator\fP< _CharT > > \fBto_string\fP (_CharT __zero, _CharT __one=_CharT('1')) const" .br .ti -1c .RI "template constexpr \fBstd::basic_string\fP< _CharT, _Traits, \fBstd::allocator\fP< _CharT > > \fBto_string\fP (_CharT __zero, _CharT __one=_CharT('1')) const" .br .ti -1c .RI "template constexpr \fBstd::basic_string\fP< _CharT, _Traits, _Alloc > \fBto_string\fP (_CharT __zero, _CharT __one=_CharT('1')) const" .br .ti -1c .RI "constexpr \fBstd::basic_string\fP< char, \fBstd::char_traits\fP< char >, \fBstd::allocator\fP< char > > \fBto_string\fP (char __zero, char __one='1') const" .br .ti -1c .RI "constexpr unsigned long long \fBto_ullong\fP () const" .br .ti -1c .RI "constexpr unsigned long \fBto_ulong\fP () const" .br .RI "Returns a numerical interpretation of the bitset\&. " .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "constexpr \fBbitset\fP< _Nb > & \fBoperator&=\fP (const \fBbitset\fP< _Nb > &__rhs) noexcept" .br .ti -1c .RI "constexpr \fBbitset\fP< _Nb > & \fBoperator|=\fP (const \fBbitset\fP< _Nb > &__rhs) noexcept" .br .ti -1c .RI "constexpr \fBbitset\fP< _Nb > & \fBoperator^=\fP (const \fBbitset\fP< _Nb > &__rhs) noexcept" .br .in -1c .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "constexpr \fBbitset\fP< _Nb > & \fBoperator<<=\fP (size_t __position) noexcept" .br .ti -1c .RI "constexpr \fBbitset\fP< _Nb > & \fBoperator>>=\fP (size_t __position) noexcept" .br .in -1c .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "constexpr \fBbitset\fP< _Nb > & \fB_Unchecked_set\fP (size_t __pos) noexcept" .br .ti -1c .RI "constexpr \fBbitset\fP< _Nb > & \fB_Unchecked_set\fP (size_t __pos, int __val) noexcept" .br .ti -1c .RI "constexpr \fBbitset\fP< _Nb > & \fB_Unchecked_reset\fP (size_t __pos) noexcept" .br .ti -1c .RI "constexpr \fBbitset\fP< _Nb > & \fB_Unchecked_flip\fP (size_t __pos) noexcept" .br .ti -1c .RI "constexpr bool \fB_Unchecked_test\fP (size_t __pos) const noexcept" .br .in -1c .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "constexpr \fBreference\fP \fBoperator[]\fP (size_t __position)" .br .RI "Array-indexing support\&. " .ti -1c .RI "constexpr bool \fBoperator[]\fP (size_t __position) const" .br .RI "Array-indexing support\&. " .in -1c .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "constexpr bool \fBoperator==\fP (const \fBbitset\fP< _Nb > &__rhs) const noexcept" .br .RI "These comparisons for equality/inequality are, well, \fIbitwise\fP\&. " .in -1c .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "constexpr \fBbitset\fP< _Nb > \fBoperator<<\fP (size_t __position) const noexcept" .br .RI "Self-explanatory\&. " .ti -1c .RI "constexpr \fBbitset\fP< _Nb > \fBoperator>>\fP (size_t __position) const noexcept" .br .RI "Self-explanatory\&. " .in -1c .in -1c .SS "Friends" .in +1c .ti -1c .RI "template \fBstd::basic_ostream\fP< _CharT, _Traits > & \fBoperator<<\fP (\fBstd::basic_ostream\fP< _CharT, _Traits > &, const \fBbitset\fP< _Nb2 > &)" .br .ti -1c .RI "template \fBstd::basic_istream\fP< _CharT, _Traits > & \fBoperator>>\fP (\fBstd::basic_istream\fP< _CharT, _Traits > &, \fBbitset\fP< _Nb2 > &)" .br .ti -1c .RI "class \fBreference\fP" .br .ti -1c .RI "struct \fBstd::hash< bitset >\fP" .br .in -1c .SH "Detailed Description" .PP .SS "template .br class std::bitset< _Nb >"The bitset class represents a \fIfixed-size\fP sequence of bits\&. (Note that bitset does \fInot\fP meet the formal requirements of a \fRcontainer\fP\&. Mainly, it lacks iterators\&.) .PP The template argument, \fRNb\fP, may be any non-negative number, specifying the number of bits (e\&.g\&., "0", "12", "1024*1024")\&. .PP In the general unoptimized case, storage is allocated in word-sized blocks\&. Let B be the number of bits in a word, then (Nb+(B-1))/B words will be used for storage\&. B - NbB bits are unused\&. (They are the high-order bits in the highest word\&.) It is a class invariant that those unused bits are always zero\&. .PP If you think of bitset as \fIa simple array of bits\fP, be aware that your mental picture is reversed: a bitset behaves the same way as bits in integers do, with the bit at index 0 in the \fIleast significant / right-hand\fP position, and the bit at index Nb-1 in the \fImost significant / left-hand\fP position\&. Thus, unlike other containers, a bitset's index \fIcounts from right to left\fP, to put it very loosely\&. .PP This behavior is preserved when translating to and from strings\&. For example, the first line of the following program probably prints \fIb('a') is 0001100001\fP on a modern ASCII system\&. .PP .PP .nf #include #include #include using namespace std; int main() { long a = 'a'; bitset<10> b(a); cout << "b('a') is " << b << endl; ostringstream s; s << b; string str = s\&.str(); cout << "index 3 in the string is " << str[3] << " but\\n" << "index 3 in the bitset is " << b[3] << endl; } .fi .PP .PP Also see: https://gcc.gnu.org/onlinedocs/libstdc++/manual/ext_containers.html for a description of extensions\&. .PP Most of the actual code isn't contained in bitset<> itself, but in the base class _Base_bitset\&. The base class works with whole words, not with individual bits\&. This allows us to specialize _Base_bitset for the important special case where the bitset is only a single word\&. .PP Extra confusion can result due to the fact that the storage for _Base_bitset \fIis\fP a regular array, and is indexed as such\&. This is carefully encapsulated\&. .SH "Constructor & Destructor Documentation" .PP .SS "template \fBstd::bitset\fP< _Nb >::bitset ()\fR [inline]\fP, \fR [constexpr]\fP, \fR [noexcept]\fP" .PP All bits set to zero\&. .PP Referenced by \fBoperator&=()\fP, \fBoperator<<()\fP, \fBoperator<<=()\fP, \fBoperator==()\fP, \fBoperator>>()\fP, \fBoperator^=()\fP, \fBoperator|=()\fP, and \fBoperator~()\fP\&. .SS "template \fBstd::bitset\fP< _Nb >::bitset (unsigned long long __val)\fR [inline]\fP, \fR [constexpr]\fP, \fR [noexcept]\fP" .PP Initial bits bitwise-copied from a single word (others set to zero)\&. .SS "template template \fBstd::bitset\fP< _Nb >::bitset (const \fBstd::basic_string\fP< _CharT, _Traits, _Alloc > & __s, size_t __position = \fR0\fP)\fR [inline]\fP, \fR [explicit]\fP, \fR [constexpr]\fP" Use a subset of a string\&. .PP \fBParameters\fP .RS 4 \fI__s\fP A string of \fR0\fP and \fR1\fP characters\&. .br \fI__position\fP Index of the first character in \fR__s\fP to use; defaults to zero\&. .RE .PP \fBExceptions\fP .RS 4 \fI\fBstd::out_of_range\fP\fP If \fR__position > __s\&.size()\fP\&. .br \fI\fBstd::invalid_argument\fP\fP If a character appears in the string which is neither \fR0\fP nor \fR1\fP\&. .RE .PP .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::npos\fP\&. .SS "template template \fBstd::bitset\fP< _Nb >::bitset (const \fBstd::basic_string\fP< _CharT, _Traits, _Alloc > & __s, size_t __position, size_t __n)\fR [inline]\fP, \fR [constexpr]\fP" Use a subset of a string\&. .PP \fBParameters\fP .RS 4 \fI__s\fP A string of \fR0\fP and \fR1\fP characters\&. .br \fI__position\fP Index of the first character in \fR__s\fP to use\&. .br \fI__n\fP The number of characters to copy\&. .RE .PP \fBExceptions\fP .RS 4 \fI\fBstd::out_of_range\fP\fP If \fR__position > __s\&.size()\fP\&. .br \fI\fBstd::invalid_argument\fP\fP If a character appears in the string which is neither \fR0\fP nor \fR1\fP\&. .RE .PP .SS "template template, is_standard_layout<_CharT>, is_trivially_default_constructible<_CharT>, __not_>>> \fBstd::bitset\fP< _Nb >::bitset (const _CharT * __str, typename __bitset< _Nb >::__string< _CharT >\fB::size_type\fP __n = \fR__bitset< _Nb >::__string<_CharT>::npos\fP, _CharT __zero = \fR_CharT('0')\fP, _CharT __one = \fR_CharT('1')\fP)\fR [inline]\fP, \fR [explicit]\fP, \fR [constexpr]\fP" Construct from a character array\&. .PP \fBParameters\fP .RS 4 \fI__str\fP An array of characters \fR__zero\fP and \fR__one\fP\&. .br \fI__n\fP The number of characters to use\&. .br \fI__zero\fP The character corresponding to the value 0\&. .br \fI__one\fP The character corresponding to the value 1\&. .RE .PP \fBExceptions\fP .RS 4 \fI\fBstd::invalid_argument\fP\fP If a character appears in the string which is neither \fR__zero\fP nor \fR__one\fP\&. .RE .PP .PP References \fBstd::basic_string< _CharT >::npos\fP\&. .SH "Member Function Documentation" .PP .SS "template bool \fBstd::bitset\fP< _Nb >::all () const\fR [inline]\fP, \fR [constexpr]\fP, \fR [noexcept]\fP" .PP Tests whether all the bits are on\&. .PP \fBReturns\fP .RS 4 True if all the bits are set\&. .RE .PP .SS "template bool \fBstd::bitset\fP< _Nb >::any () const\fR [inline]\fP, \fR [constexpr]\fP, \fR [noexcept]\fP" .PP Tests whether any of the bits are on\&. .PP \fBReturns\fP .RS 4 True if at least one bit is set\&. .RE .PP .SS "template size_t \fBstd::bitset\fP< _Nb >::count () const\fR [inline]\fP, \fR [constexpr]\fP, \fR [noexcept]\fP" .PP Returns the number of bits which are set\&. .SS "template \fBbitset\fP< _Nb > & \fBstd::bitset\fP< _Nb >::flip ()\fR [inline]\fP, \fR [constexpr]\fP, \fR [noexcept]\fP" .PP Toggles every bit to its opposite value\&. .SS "template \fBbitset\fP< _Nb > & \fBstd::bitset\fP< _Nb >::flip (size_t __position)\fR [inline]\fP, \fR [constexpr]\fP" .PP Toggles a given bit to its opposite value\&. .PP \fBParameters\fP .RS 4 \fI__position\fP The index of the bit\&. .RE .PP \fBExceptions\fP .RS 4 \fI\fBstd::out_of_range\fP\fP If \fIpos\fP is bigger the size of the set\&. .RE .PP .PP References \fB_Unchecked_flip()\fP\&. .SS "template bool \fBstd::bitset\fP< _Nb >::none () const\fR [inline]\fP, \fR [constexpr]\fP, \fR [noexcept]\fP" .PP Tests whether any of the bits are on\&. .PP \fBReturns\fP .RS 4 True if none of the bits are set\&. .RE .PP .SS "template \fBbitset\fP< _Nb > & \fBstd::bitset\fP< _Nb >::operator&= (const \fBbitset\fP< _Nb > & __rhs)\fR [inline]\fP, \fR [constexpr]\fP, \fR [noexcept]\fP" Operations on bitsets\&. .PP \fBParameters\fP .RS 4 \fI__rhs\fP A same-sized bitset\&. .RE .PP These should be self-explanatory\&. .PP References \fBbitset()\fP\&. .SS "template \fBbitset\fP< _Nb > \fBstd::bitset\fP< _Nb >::operator<< (size_t __position) const\fR [inline]\fP, \fR [constexpr]\fP, \fR [noexcept]\fP" .PP Self-explanatory\&. .PP References \fBbitset()\fP\&. .SS "template \fBbitset\fP< _Nb > & \fBstd::bitset\fP< _Nb >::operator<<= (size_t __position)\fR [inline]\fP, \fR [constexpr]\fP, \fR [noexcept]\fP" Operations on bitsets\&. .PP \fBParameters\fP .RS 4 \fI__position\fP The number of places to shift\&. .RE .PP These should be self-explanatory\&. .PP References \fBbitset()\fP, and \fBoperator<<=()\fP\&. .PP Referenced by \fBoperator<<=()\fP\&. .SS "template bool \fBstd::bitset\fP< _Nb >::operator== (const \fBbitset\fP< _Nb > & __rhs) const\fR [inline]\fP, \fR [constexpr]\fP, \fR [noexcept]\fP" .PP These comparisons for equality/inequality are, well, \fIbitwise\fP\&. .PP References \fBbitset()\fP\&. .SS "template \fBbitset\fP< _Nb > \fBstd::bitset\fP< _Nb >::operator>> (size_t __position) const\fR [inline]\fP, \fR [constexpr]\fP, \fR [noexcept]\fP" .PP Self-explanatory\&. .PP References \fBbitset()\fP\&. .SS "template \fBbitset\fP< _Nb > & \fBstd::bitset\fP< _Nb >::operator>>= (size_t __position)\fR [inline]\fP, \fR [constexpr]\fP, \fR [noexcept]\fP" Operations on bitsets\&. .PP \fBParameters\fP .RS 4 \fI__position\fP The number of places to shift\&. .RE .PP These should be self-explanatory\&. .SS "template \fBreference\fP \fBstd::bitset\fP< _Nb >::operator[] (size_t __position)\fR [inline]\fP, \fR [constexpr]\fP" .PP Array-indexing support\&. .PP \fBParameters\fP .RS 4 \fI__position\fP Index into the bitset\&. .RE .PP \fBReturns\fP .RS 4 A bool for a \fIconst bitset\fP\&. For non-const bitsets, an instance of the reference proxy class\&. .RE .PP \fBNote\fP .RS 4 These operators do no range checking and throw no exceptions, as required by DR 11 to the standard\&. .RE .PP _GLIBCXX_RESOLVE_LIB_DEFECTS Note that this implementation already resolves DR 11 (items 1 and 2), but does not do the range-checking required by that DR's resolution\&. -pme The DR has since been changed: range-checking is a precondition (users' responsibility), and these functions must not throw\&. -pme .SS "template bool \fBstd::bitset\fP< _Nb >::operator[] (size_t __position) const\fR [inline]\fP, \fR [constexpr]\fP" .PP Array-indexing support\&. .PP \fBParameters\fP .RS 4 \fI__position\fP Index into the bitset\&. .RE .PP \fBReturns\fP .RS 4 A bool for a \fIconst bitset\fP\&. For non-const bitsets, an instance of the reference proxy class\&. .RE .PP \fBNote\fP .RS 4 These operators do no range checking and throw no exceptions, as required by DR 11 to the standard\&. .RE .PP _GLIBCXX_RESOLVE_LIB_DEFECTS Note that this implementation already resolves DR 11 (items 1 and 2), but does not do the range-checking required by that DR's resolution\&. -pme The DR has since been changed: range-checking is a precondition (users' responsibility), and these functions must not throw\&. -pme .PP References \fB_Unchecked_test()\fP\&. .SS "template \fBbitset\fP< _Nb > & \fBstd::bitset\fP< _Nb >::operator^= (const \fBbitset\fP< _Nb > & __rhs)\fR [inline]\fP, \fR [constexpr]\fP, \fR [noexcept]\fP" Operations on bitsets\&. .PP \fBParameters\fP .RS 4 \fI__rhs\fP A same-sized bitset\&. .RE .PP These should be self-explanatory\&. .PP References \fBbitset()\fP\&. .SS "template \fBbitset\fP< _Nb > & \fBstd::bitset\fP< _Nb >::operator|= (const \fBbitset\fP< _Nb > & __rhs)\fR [inline]\fP, \fR [constexpr]\fP, \fR [noexcept]\fP" Operations on bitsets\&. .PP \fBParameters\fP .RS 4 \fI__rhs\fP A same-sized bitset\&. .RE .PP These should be self-explanatory\&. .PP References \fBbitset()\fP\&. .SS "template \fBbitset\fP< _Nb > \fBstd::bitset\fP< _Nb >::operator~ () const\fR [inline]\fP, \fR [constexpr]\fP, \fR [noexcept]\fP" .PP See the no-argument flip()\&. .PP References \fBbitset()\fP\&. .SS "template \fBbitset\fP< _Nb > & \fBstd::bitset\fP< _Nb >::reset ()\fR [inline]\fP, \fR [constexpr]\fP, \fR [noexcept]\fP" .PP Sets every bit to false\&. .SS "template \fBbitset\fP< _Nb > & \fBstd::bitset\fP< _Nb >::reset (size_t __position)\fR [inline]\fP, \fR [constexpr]\fP" .PP Sets a given bit to false\&. .PP \fBParameters\fP .RS 4 \fI__position\fP The index of the bit\&. .RE .PP \fBExceptions\fP .RS 4 \fI\fBstd::out_of_range\fP\fP If \fIpos\fP is bigger the size of the set\&. .RE .PP Same as writing \fRset(pos,false)\fP\&. .PP References \fB_Unchecked_reset()\fP\&. .SS "template \fBbitset\fP< _Nb > & \fBstd::bitset\fP< _Nb >::set ()\fR [inline]\fP, \fR [constexpr]\fP, \fR [noexcept]\fP" .PP Sets every bit to true\&. .SS "template \fBbitset\fP< _Nb > & \fBstd::bitset\fP< _Nb >::set (size_t __position, bool __val = \fRtrue\fP)\fR [inline]\fP, \fR [constexpr]\fP" .PP Sets a given bit to a particular value\&. .PP \fBParameters\fP .RS 4 \fI__position\fP The index of the bit\&. .br \fI__val\fP Either true or false, defaults to true\&. .RE .PP \fBExceptions\fP .RS 4 \fI\fBstd::out_of_range\fP\fP If \fIpos\fP is bigger the size of the set\&. .RE .PP .PP References \fB_Unchecked_set()\fP\&. .SS "template size_t \fBstd::bitset\fP< _Nb >::size () const\fR [inline]\fP, \fR [constexpr]\fP, \fR [noexcept]\fP" .PP Returns the total number of bits\&. .SS "template bool \fBstd::bitset\fP< _Nb >::test (size_t __position) const\fR [inline]\fP, \fR [constexpr]\fP" .PP Tests the value of a bit\&. .PP \fBParameters\fP .RS 4 \fI__position\fP The index of a bit\&. .RE .PP \fBReturns\fP .RS 4 The value at \fIpos\fP\&. .RE .PP \fBExceptions\fP .RS 4 \fI\fBstd::out_of_range\fP\fP If \fIpos\fP is bigger the size of the set\&. .RE .PP .PP References \fB_Unchecked_test()\fP\&. .SS "template template \fBstd::basic_string\fP< _CharT, _Traits, _Alloc > \fBstd::bitset\fP< _Nb >::to_string () const\fR [inline]\fP, \fR [constexpr]\fP" .PP Returns a character interpretation of the bitset\&. .PP \fBReturns\fP .RS 4 The string equivalent of the bits\&. .RE .PP Note the ordering of the bits: decreasing character positions correspond to increasing bit positions (see the main class notes for an example)\&. .SS "template unsigned long \fBstd::bitset\fP< _Nb >::to_ulong () const\fR [inline]\fP, \fR [constexpr]\fP" .PP Returns a numerical interpretation of the bitset\&. .PP \fBReturns\fP .RS 4 The integral equivalent of the bits\&. .RE .PP \fBExceptions\fP .RS 4 \fI\fBstd::overflow_error\fP\fP If there are too many bits to be represented in an \fRunsigned\fP \fRlong\fP\&. .RE .PP .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.