.TH "std::tr2::dynamic_bitset< _WordT, _Alloc >" 3cxx "Sun Feb 7 2021" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::tr2::dynamic_bitset< _WordT, _Alloc > \- The dynamic_bitset class represents a sequence of bits\&. .SH SYNOPSIS .br .PP .PP Inherits \fBstd::tr2::__dynamic_bitset_base< unsigned long long, std::allocator< unsigned long long > >\fP\&. .SS "Classes" .in +1c .ti -1c .RI "class \fBreference\fP" .br .in -1c .SS "Public Types" .in +1c .ti -1c .RI "typedef \fB__dynamic_bitset_base\fP< _WordT, _Alloc > \fB_Base\fP" .br .ti -1c .RI "typedef _Alloc \fBallocator_type\fP" .br .ti -1c .RI "typedef _WordT \fBblock_type\fP" .br .ti -1c .RI "typedef bool \fBconst_reference\fP" .br .ti -1c .RI "typedef size_t \fBsize_type\fP" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBdynamic_bitset\fP ()=default" .br .RI "All bits set to zero\&. " .ti -1c .RI "\fBdynamic_bitset\fP (const allocator_type &__alloc)" .br .RI "All bits set to zero\&. " .ti -1c .RI "\fBdynamic_bitset\fP (const char *__str, const allocator_type &__alloc=allocator_type())" .br .RI "Construct from a string\&. " .ti -1c .RI "\fBdynamic_bitset\fP (const \fBdynamic_bitset\fP &)=default" .br .RI "Copy constructor\&. " .ti -1c .RI "template \fBdynamic_bitset\fP (const \fBstd::basic_string\fP< _CharT, _Traits, _Alloc1 > &__str, typename \fBbasic_string\fP< _CharT, _Traits, _Alloc1 >::size_type __pos=0, typename \fBbasic_string\fP< _CharT, _Traits, _Alloc1 >::size_type __n=\fBstd::basic_string\fP< _CharT, _Traits, _Alloc1 >::npos, _CharT __zero=_CharT('0'), _CharT __one=_CharT('1'), const allocator_type &__alloc=allocator_type())" .br .RI "Use a subset of a string\&. " .ti -1c .RI "\fBdynamic_bitset\fP (\fBdynamic_bitset\fP &&__b) noexcept" .br .RI "Move constructor\&. " .ti -1c .RI "\fBdynamic_bitset\fP (\fBinitializer_list\fP< block_type > __il, const allocator_type &__alloc=allocator_type())" .br .ti -1c .RI "\fBdynamic_bitset\fP (size_type __nbits, unsigned long long __val=0ULL, const allocator_type &__alloc=allocator_type())" .br .RI "Initial bits bitwise-copied from a single word (others set to zero)\&. " .ti -1c .RI "template, typename _CharT = typename _Traits::char_type> void \fB_M_copy_from_ptr\fP (const _CharT *, size_t, size_t, size_t, _CharT __zero=_CharT('0'), _CharT __one=_CharT('1'))" .br .ti -1c .RI "template void \fB_M_copy_from_string\fP (const \fBbasic_string\fP< _CharT, _Traits, _Alloc1 > &__str, size_t __pos, size_t __n, _CharT __zero=_CharT('0'), _CharT __one=_CharT('1'))" .br .ti -1c .RI "template void \fB_M_copy_to_string\fP (\fBstd::basic_string\fP< _CharT, _Traits, _Alloc1 > &__str, _CharT __zero=_CharT('0'), _CharT __one=_CharT('1')) const" .br .ti -1c .RI "bool \fBall\fP () const" .br .RI "Tests whether all the bits are on\&. " .ti -1c .RI "bool \fBany\fP () const" .br .RI "Tests whether any of the bits are on\&. " .ti -1c .RI "template void \fBappend\fP (_BlockInputIterator __first, _BlockInputIterator __last)" .br .RI "Append an iterator range of blocks\&. " .ti -1c .RI "void \fBappend\fP (block_type __block)" .br .RI "Append a block\&. " .ti -1c .RI "void \fBappend\fP (\fBinitializer_list\fP< block_type > __il)" .br .ti -1c .RI "void \fBclear\fP ()" .br .RI "Clear the bitset\&. " .ti -1c .RI "size_type \fBcount\fP () const noexcept" .br .RI "Returns the number of bits which are set\&. " .ti -1c .RI "_GLIBCXX_NODISCARD bool \fBempty\fP () const noexcept" .br .RI "Returns true if the dynamic_bitset is empty\&. " .ti -1c .RI "size_type \fBfind_first\fP () const" .br .RI "Finds the index of the first 'on' bit\&. " .ti -1c .RI "size_type \fBfind_next\fP (size_t __prev) const" .br .RI "Finds the index of the next 'on' bit after prev\&. " .ti -1c .RI "\fBdynamic_bitset\fP & \fBflip\fP ()" .br .RI "Toggles every bit to its opposite value\&. " .ti -1c .RI "\fBdynamic_bitset\fP & \fBflip\fP (size_type __pos)" .br .RI "Toggles a given bit to its opposite value\&. " .ti -1c .RI "allocator_type \fBget_allocator\fP () const noexcept" .br .RI "Return the allocator for the bitset\&. " .ti -1c .RI "bool \fBis_proper_subset_of\fP (const \fBdynamic_bitset\fP &__b) const" .br .ti -1c .RI "bool \fBis_subset_of\fP (const \fBdynamic_bitset\fP &__b) const" .br .ti -1c .RI "constexpr size_type \fBmax_size\fP () noexcept" .br .RI "Returns the maximum size of a dynamic_bitset object having the same type as *this\&. The real answer is max() * bits_per_block but is likely to overflow\&. " .ti -1c .RI "bool \fBnone\fP () const" .br .RI "Tests whether any of the bits are on\&. " .ti -1c .RI "size_type \fBnum_blocks\fP () const noexcept" .br .RI "Returns the total number of blocks\&. " .ti -1c .RI "\fBdynamic_bitset\fP & \fBoperator&=\fP (const \fBdynamic_bitset\fP &__rhs)" .br .RI "Operations on dynamic_bitsets\&. " .ti -1c .RI "\fBdynamic_bitset\fP & \fBoperator&=\fP (\fBdynamic_bitset\fP &&__rhs)" .br .ti -1c .RI "\fBdynamic_bitset\fP & \fBoperator\-=\fP (const \fBdynamic_bitset\fP &__rhs)" .br .ti -1c .RI "\fBdynamic_bitset\fP \fBoperator<<\fP (size_type __pos) const" .br .RI "Self-explanatory\&. " .ti -1c .RI "\fBdynamic_bitset\fP & \fBoperator<<=\fP (size_type __pos)" .br .RI "Operations on dynamic_bitsets\&. " .ti -1c .RI "\fBdynamic_bitset\fP & \fBoperator=\fP (const \fBdynamic_bitset\fP &)=default" .br .RI "Copy assignment operator\&. " .ti -1c .RI "\fBdynamic_bitset\fP & \fBoperator=\fP (\fBdynamic_bitset\fP &&__b) noexcept(\fBstd::is_nothrow_move_assignable\fP< \fB_Base\fP >::value)" .br .RI "Move assignment operator\&. " .ti -1c .RI "\fBdynamic_bitset\fP \fBoperator>>\fP (size_type __pos) const" .br .ti -1c .RI "\fBdynamic_bitset\fP & \fBoperator>>=\fP (size_type __pos)" .br .ti -1c .RI "\fBreference\fP \fBoperator[]\fP (size_type __pos)" .br .RI "Array-indexing support\&. " .ti -1c .RI "const_reference \fBoperator[]\fP (size_type __pos) const" .br .ti -1c .RI "\fBdynamic_bitset\fP & \fBoperator^=\fP (const \fBdynamic_bitset\fP &__rhs)" .br .ti -1c .RI "\fBdynamic_bitset\fP & \fBoperator|=\fP (const \fBdynamic_bitset\fP &__rhs)" .br .ti -1c .RI "\fBdynamic_bitset\fP \fBoperator~\fP () const" .br .RI "See the no-argument flip()\&. " .ti -1c .RI "void \fBpush_back\fP (bool __bit)" .br .RI "Push a bit onto the high end of the bitset\&. " .ti -1c .RI "\fBdynamic_bitset\fP & \fBreset\fP ()" .br .RI "Sets every bit to false\&. " .ti -1c .RI "\fBdynamic_bitset\fP & \fBreset\fP (size_type __pos)" .br .RI "Sets a given bit to false\&. " .ti -1c .RI "void \fBresize\fP (size_type __nbits, bool __value=false)" .br .RI "Resize the bitset\&. " .ti -1c .RI "\fBdynamic_bitset\fP & \fBset\fP ()" .br .RI "Sets every bit to true\&. " .ti -1c .RI "\fBdynamic_bitset\fP & \fBset\fP (size_type __pos, bool __val=true)" .br .RI "Sets a given bit to a particular value\&. " .ti -1c .RI "size_type \fBsize\fP () const noexcept" .br .RI "Returns the total number of bits\&. " .ti -1c .RI "void \fBswap\fP (\fBdynamic_bitset\fP &__b) noexcept" .br .RI "Swap with another bitset\&. " .ti -1c .RI "bool \fBtest\fP (size_type __pos) const" .br .RI "Tests the value of a bit\&. " .ti -1c .RI "template, typename _Alloc1 = std::allocator<_CharT>> \fBstd::basic_string\fP< _CharT, _Traits, _Alloc1 > \fBto_string\fP (_CharT __zero=_CharT('0'), _CharT __one=_CharT('1')) const" .br .RI "Returns a character interpretation of the dynamic_bitset\&. " .ti -1c .RI "unsigned long long \fBto_ullong\fP () const" .br .RI "Returns a numerical interpretation of the dynamic_bitset\&. " .ti -1c .RI "unsigned long \fBto_ulong\fP () const" .br .RI "Returns a numerical interpretation of the dynamic_bitset\&. " .in -1c .SS "Static Public Attributes" .in +1c .ti -1c .RI "static const size_type \fBbits_per_block\fP" .br .ti -1c .RI "static const size_type \fBnpos\fP" .br .in -1c .SS "Friends" .in +1c .ti -1c .RI "bool \fBoperator<\fP (const \fBdynamic_bitset\fP &__lhs, const \fBdynamic_bitset\fP &__rhs) noexcept" .br .ti -1c .RI "bool \fBoperator==\fP (const \fBdynamic_bitset\fP &__lhs, const \fBdynamic_bitset\fP &__rhs) noexcept" .br .ti -1c .RI "class \fBreference\fP" .br .in -1c .SH "Detailed Description" .PP .SS "template> .br class std::tr2::dynamic_bitset< _WordT, _Alloc >" The dynamic_bitset class represents a sequence of bits\&. See N2050, Proposal to Add a Dynamically Sizeable Bitset to the Standard Library\&. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2050.pdf .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 dynamic_bitset as 'a simple array of bits,' be aware that your mental picture is reversed: a dynamic_bitset behaves the same way as bits in integers do, with the bit at index 0 in the 'least significant / right-hand' position, and the bit at index Nb-1 in the 'most significant / left-hand' position\&. Thus, unlike other containers, a dynamic_bitset's index 'counts from right to left,' 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 'b('a') is 0001100001' on a modern ASCII system\&. .PP .PP .nf #include #include #include using namespace std; int main() { long a = 'a'; dynamic_bitset<> 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 Most of the actual code isn't contained in dynamic_bitset<> itself, but in the base class __dynamic_bitset_base\&. The base class works with whole words, not with individual bits\&. This allows us to specialize __dynamic_bitset_base for the important special case where the dynamic_bitset is only a single word\&. .PP Extra confusion can result due to the fact that the storage for __dynamic_bitset_base \fIis\fP a vector, and is indexed as such\&. This is carefully encapsulated\&. .PP Definition at line 419 of file dynamic_bitset\&. .SH "Constructor & Destructor Documentation" .PP .SS "template> \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::\fBdynamic_bitset\fP ()\fC [default]\fP" .PP All bits set to zero\&. .SS "template> \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::\fBdynamic_bitset\fP (const allocator_type & __alloc)\fC [inline]\fP, \fC [explicit]\fP" .PP All bits set to zero\&. .PP Definition at line 578 of file dynamic_bitset\&. .SS "template> \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::\fBdynamic_bitset\fP (size_type __nbits, unsigned long long __val = \fC0ULL\fP, const allocator_type & __alloc = \fCallocator_type()\fP)\fC [inline]\fP, \fC [explicit]\fP" .PP Initial bits bitwise-copied from a single word (others set to zero)\&. .PP Definition at line 584 of file dynamic_bitset\&. .SS "template> template \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::\fBdynamic_bitset\fP (const \fBstd::basic_string\fP< _CharT, _Traits, _Alloc1 > & __str, typename \fBbasic_string\fP< _CharT, _Traits, _Alloc1 >::size_type __pos = \fC0\fP, typename \fBbasic_string\fP< _CharT, _Traits, _Alloc1 >::size_type __n = \fC\fBstd::basic_string\fP<_CharT, _Traits, _Alloc1>::npos\fP, _CharT __zero = \fC_CharT('0')\fP, _CharT __one = \fC_CharT('1')\fP, const allocator_type & __alloc = \fCallocator_type()\fP)\fC [inline]\fP, \fC [explicit]\fP" .PP Use a subset of a string\&. .PP \fBParameters\fP .RS 4 \fI__str\fP A string of '0' and '1' characters\&. .br \fI__pos\fP Index of the first character in \fC__str\fP to use\&. .br \fI__n\fP The number of characters to copy\&. .br \fI__zero\fP The character to use for unset bits\&. .br \fI__one\fP The character to use for set bits\&. .br \fI__alloc\fP An allocator\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::out_of_range\fP If \fC__pos\fP is bigger the size of \fC__str\fP\&. .br \fIstd::invalid_argument\fP If a character appears in the string which is neither '0' nor '1'\&. .RE .PP .PP Definition at line 609 of file dynamic_bitset\&. .SS "template> \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::\fBdynamic_bitset\fP (const char * __str, const allocator_type & __alloc = \fCallocator_type()\fP)\fC [inline]\fP, \fC [explicit]\fP" .PP Construct from a string\&. .PP \fBParameters\fP .RS 4 \fI__str\fP A string of '0' and '1' characters\&. .br \fI__alloc\fP An allocator\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::invalid_argument\fP If a character appears in the string which is neither '0' nor '1'\&. .RE .PP .PP Definition at line 636 of file dynamic_bitset\&. .SS "template> \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::\fBdynamic_bitset\fP (const \fBdynamic_bitset\fP< _WordT, _Alloc > &)\fC [default]\fP" .PP Copy constructor\&. .SS "template> \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::\fBdynamic_bitset\fP (\fBdynamic_bitset\fP< _WordT, _Alloc > && __b)\fC [inline]\fP, \fC [noexcept]\fP" .PP Move constructor\&. .PP Definition at line 648 of file dynamic_bitset\&. .SH "Member Function Documentation" .PP .SS "template> bool \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::all () const\fC [inline]\fP" .PP Tests whether all the bits are on\&. .PP \fBReturns\fP .RS 4 True if all the bits are set\&. .RE .PP .PP Definition at line 1036 of file dynamic_bitset\&. .SS "template> bool \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::any () const\fC [inline]\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 .PP Definition at line 1044 of file dynamic_bitset\&. .SS "template> template void \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::append (_BlockInputIterator __first, _BlockInputIterator __last)\fC [inline]\fP" .PP Append an iterator range of blocks\&. .PP Definition at line 744 of file dynamic_bitset\&. .SS "template> void \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::append (block_type __block)\fC [inline]\fP" .PP Append a block\&. .PP Definition at line 726 of file dynamic_bitset\&. .SS "template> void \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::clear ()\fC [inline]\fP" .PP Clear the bitset\&. .PP Definition at line 701 of file dynamic_bitset\&. .SS "template> size_type \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::count () const\fC [inline]\fP, \fC [noexcept]\fP" .PP Returns the number of bits which are set\&. .PP Definition at line 992 of file dynamic_bitset\&. .SS "template> _GLIBCXX_NODISCARD bool \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::empty () const\fC [inline]\fP, \fC [noexcept]\fP" .PP Returns true if the dynamic_bitset is empty\&. .PP Definition at line 1007 of file dynamic_bitset\&. .SS "template> size_type \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::find_first () const\fC [inline]\fP" .PP Finds the index of the first 'on' bit\&. .PP \fBReturns\fP .RS 4 The index of the first bit set, or size() if not found\&. .RE .PP \fBSee also\fP .RS 4 find_next .RE .PP .PP Definition at line 1072 of file dynamic_bitset\&. .SS "template> size_type \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::find_next (size_t __prev) const\fC [inline]\fP" .PP Finds the index of the next 'on' bit after prev\&. .PP \fBReturns\fP .RS 4 The index of the next bit set, or size() if not found\&. .RE .PP \fBParameters\fP .RS 4 \fI__prev\fP Where to start searching\&. .RE .PP \fBSee also\fP .RS 4 find_first .RE .PP .PP Definition at line 1082 of file dynamic_bitset\&. .SS "template> \fBdynamic_bitset\fP& \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::flip ()\fC [inline]\fP" .PP Toggles every bit to its opposite value\&. .PP Definition at line 883 of file dynamic_bitset\&. .SS "template> \fBdynamic_bitset\fP& \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::flip (size_type __pos)\fC [inline]\fP" .PP Toggles a given bit to its opposite value\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP The index of the bit\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::out_of_range\fP If \fI__pos\fP is bigger the size of the set\&. .RE .PP .PP Definition at line 896 of file dynamic_bitset\&. .SS "template> allocator_type \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::get_allocator () const\fC [inline]\fP, \fC [noexcept]\fP" .PP Return the allocator for the bitset\&. .PP Definition at line 681 of file dynamic_bitset\&. .SS "template> constexpr size_type \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::max_size ()\fC [inline]\fP, \fC [constexpr]\fP, \fC [noexcept]\fP" .PP Returns the maximum size of a dynamic_bitset object having the same type as *this\&. The real answer is max() * bits_per_block but is likely to overflow\&. .PP Definition at line 1014 of file dynamic_bitset\&. .SS "template> bool \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::none () const\fC [inline]\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 .PP Definition at line 1052 of file dynamic_bitset\&. .SS "template> size_type \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::num_blocks () const\fC [inline]\fP, \fC [noexcept]\fP" .PP Returns the total number of blocks\&. .PP Definition at line 1002 of file dynamic_bitset\&. .SS "template> \fBdynamic_bitset\fP& \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::operator&= (const \fBdynamic_bitset\fP< _WordT, _Alloc > & __rhs)\fC [inline]\fP" .PP Operations on dynamic_bitsets\&. .PP \fBParameters\fP .RS 4 \fI__rhs\fP A same-sized dynamic_bitset\&. .RE .PP These should be self-explanatory\&. .PP Definition at line 759 of file dynamic_bitset\&. .SS "template> \fBdynamic_bitset\fP \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::operator<< (size_type __pos) const\fC [inline]\fP" .PP Self-explanatory\&. .PP Definition at line 1057 of file dynamic_bitset\&. .SS "template> \fBdynamic_bitset\fP& \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::operator<<= (size_type __pos)\fC [inline]\fP" .PP Operations on dynamic_bitsets\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP The number of places to shift\&. .RE .PP These should be self-explanatory\&. .PP Definition at line 801 of file dynamic_bitset\&. .SS "template> \fBdynamic_bitset\fP& \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::operator= (const \fBdynamic_bitset\fP< _WordT, _Alloc > &)\fC [default]\fP" .PP Copy assignment operator\&. .SS "template> \fBdynamic_bitset\fP& \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::operator= (\fBdynamic_bitset\fP< _WordT, _Alloc > && __b)\fC [inline]\fP, \fC [noexcept]\fP" .PP Move assignment operator\&. .PP Definition at line 665 of file dynamic_bitset\&. .SS "template> \fBreference\fP \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::operator[] (size_type __pos)\fC [inline]\fP" .PP Array-indexing support\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP Index into the dynamic_bitset\&. .RE .PP \fBReturns\fP .RS 4 A bool for a 'const dynamic_bitset'\&. 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 .PP Definition at line 918 of file dynamic_bitset\&. .SS "template> \fBdynamic_bitset\fP \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::operator~ () const\fC [inline]\fP" .PP See the no-argument flip()\&. .PP Definition at line 905 of file dynamic_bitset\&. .SS "template> void \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::push_back (bool __bit)\fC [inline]\fP" .PP Push a bit onto the high end of the bitset\&. .PP Definition at line 711 of file dynamic_bitset\&. .SS "template> \fBdynamic_bitset\fP& \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::reset ()\fC [inline]\fP" .PP Sets every bit to false\&. .PP Definition at line 858 of file dynamic_bitset\&. .SS "template> \fBdynamic_bitset\fP& \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::reset (size_type __pos)\fC [inline]\fP" .PP Sets a given bit to false\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP The index of the bit\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::out_of_range\fP If \fI__pos\fP is bigger the size of the set\&. .RE .PP Same as writing \fCset(__pos, false)\fP\&. .PP Definition at line 872 of file dynamic_bitset\&. .SS "template> void \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::resize (size_type __nbits, bool __value = \fCfalse\fP)\fC [inline]\fP" .PP Resize the bitset\&. .PP Definition at line 688 of file dynamic_bitset\&. .SS "template> \fBdynamic_bitset\fP& \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::\fBset\fP ()\fC [inline]\fP" .PP Sets every bit to true\&. .PP Definition at line 833 of file dynamic_bitset\&. .SS "template> \fBdynamic_bitset\fP& \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::\fBset\fP (size_type __pos, bool __val = \fCtrue\fP)\fC [inline]\fP" .PP Sets a given bit to a particular value\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP The index of the bit\&. .br \fI__val\fP Either true or false, defaults to true\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::out_of_range\fP If \fI__pos\fP is bigger the size of the set\&. .RE .PP .PP Definition at line 847 of file dynamic_bitset\&. .SS "template> size_type \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::size () const\fC [inline]\fP, \fC [noexcept]\fP" .PP Returns the total number of bits\&. .PP Definition at line 997 of file dynamic_bitset\&. .PP Referenced by std::tr2::operator>>()\&. .SS "template> void \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::swap (\fBdynamic_bitset\fP< _WordT, _Alloc > & __b)\fC [inline]\fP, \fC [noexcept]\fP" .PP Swap with another bitset\&. .PP Definition at line 654 of file dynamic_bitset\&. .SS "template> bool \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::test (size_type __pos) const\fC [inline]\fP" .PP Tests the value of a bit\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP The index of a bit\&. .RE .PP \fBReturns\fP .RS 4 The value at \fI__pos\fP\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::out_of_range\fP If \fI__pos\fP is bigger the size of the set\&. .RE .PP .PP Definition at line 1024 of file dynamic_bitset\&. .SS "template> template, typename _Alloc1 = std::allocator<_CharT>> \fBstd::basic_string\fP<_CharT, _Traits, _Alloc1> \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::to_string (_CharT __zero = \fC_CharT('0')\fP, _CharT __one = \fC_CharT('1')\fP) const\fC [inline]\fP" .PP Returns a character interpretation of the dynamic_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)\&. .PP Definition at line 958 of file dynamic_bitset\&. .SS "template> unsigned long long \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::to_ullong () const\fC [inline]\fP" .PP Returns a numerical interpretation of the dynamic_bitset\&. .PP \fBReturns\fP .RS 4 The integral equivalent of the bits\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::overflow_error\fP If there are too many bits to be represented in an \fCunsigned\fP \fClong\fP\&. .RE .PP .PP Definition at line 943 of file dynamic_bitset\&. .SS "template> unsigned long \fBstd::tr2::dynamic_bitset\fP< _WordT, _Alloc >::to_ulong () const\fC [inline]\fP" .PP Returns a numerical interpretation of the dynamic_bitset\&. .PP \fBReturns\fP .RS 4 The integral equivalent of the bits\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::overflow_error\fP If there are too many bits to be represented in an \fCunsigned\fP \fClong\fP\&. .RE .PP .PP Definition at line 933 of file dynamic_bitset\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.