Public Member Functions | |
bitset () | |
All bits set to zero. | |
bitset (unsigned long __val) | |
Initial bits bitwise-copied from a single word (others set to zero). | |
template<typename CharT, typename Traits, typename Allocator> | |
bitset (const std::basic_string< CharT, Traits, Allocator > &str, typename std::basic_string< CharT, Traits, Allocator >::size_type position=0, typename std::basic_string< CharT, Traits, Allocator >::size_type n=(std::basic_string< CharT, Traits, Allocator >::npos)) | |
bitset (const Base &x) | |
bitset< Nb > & | operator &= (const bitset< Nb > &__rhs) |
bitset< Nb > & | operator|= (const bitset< Nb > &__rhs) |
bitset< Nb > & | operator^= (const bitset< Nb > &__rhs) |
bitset< Nb > & | operator<<= (size_t position) |
Operations on bitsets. | |
bitset< Nb > & | operator>>= (size_t position) |
Operations on bitsets. | |
bitset< Nb > & | set () |
Sets every bit to true. | |
bitset< Nb > & | set (size_t position, bool __val=true) |
Sets a given bit to a particular value. | |
bitset< Nb > & | reset () |
Sets every bit to false. | |
bitset< Nb > & | reset (size_t position) |
Sets a given bit to false. | |
bitset< Nb > | operator~ () const |
See the no-argument flip(). | |
bitset< Nb > & | flip () |
Toggles every bit to its opposite value. | |
bitset< Nb > & | flip (size_t position) |
Toggles a given bit to its opposite value. | |
reference | operator[] (size_t position) |
Array-indexing support. | |
bool | operator[] (size_t position) const |
Array-indexing support. | |
template<typename CharT, typename Traits, typename Allocator> | |
std::basic_string < CharT, Traits, Allocator > | to_string () const |
Retuns a character interpretation of the bitset. | |
bool | operator== (const bitset< Nb > &__rhs) const |
bool | operator!= (const bitset< Nb > &__rhs) const |
bitset< Nb > | operator<< (size_t position) const |
Self-explanatory. | |
bitset< Nb > | operator>> (size_t position) const |
Self-explanatory. | |
Base & | M_base () |
const Base & | M_base () const |
unsigned long | to_ulong () const |
Retuns a numerical interpretation of the bitset. | |
template<class CharT, class Traits, class Alloc> | |
void | M_copy_from_string (const basic_string< CharT, Traits, Alloc > &s, size_t, size_t) |
template<class CharT, class Traits, class Alloc> | |
void | M_copy_to_string (basic_string< CharT, Traits, Alloc > &) const |
size_t | count () const |
Returns the number of bits which are set. | |
size_t | size () const |
Returns the total number of bits. | |
bool | test (size_t position) const |
Tests the value of a bit. | |
bool | any () const |
Tests whether any of the bits are on. | |
bool | none () const |
Tests whether any of the bits are on. | |
size_t | Find_first () const |
Finds the index of the first "on" bit. | |
size_t | Find_next (size_t __prev) const |
Finds the index of the next "on" bit after prev. | |
void | M_invalidate_all () const |
bitset< Nb > & | operator &= (const bitset< Nb > &__rhs) |
Operations on bitsets. | |
bitset< Nb > & | operator|= (const bitset< Nb > &__rhs) |
Operations on bitsets. | |
bitset< Nb > & | operator^= (const bitset< Nb > &__rhs) |
Operations on bitsets. | |
bitset< Nb > & | Unchecked_set (size_t position) |
bitset< Nb > & | Unchecked_set (size_t position, int __val) |
bitset< Nb > & | Unchecked_reset (size_t position) |
bitset< Nb > & | Unchecked_flip (size_t position) |
bool | Unchecked_test (size_t position) const |
bool | operator== (const bitset< Nb > &__rhs) const |
These comparisons for equality/inequality are, well, bitwise. | |
bool | operator!= (const bitset< Nb > &__rhs) const |
These comparisons for equality/inequality are, well, bitwise. | |
Public Attributes | |
Safe_iterator_base * | M_iterators |
The list of mutable iterators that reference this container. | |
Safe_iterator_base * | M_const_iterators |
The list of constant iterators that reference this container. | |
unsigned int | M_version |
The container version number. This number may never be 0. | |
Protected Member Functions | |
void | M_detach_all () |
void | M_detach_singular () |
void | M_revalidate_singular () |
void | M_swap (Safe_sequence_base &x) |
Private Types | |
typedef std::bitset< Nb > | Base |
typedef __gnu_debug::Safe_sequence_base | Safe_base |
Friends | |
class | reference |
Classes | |
class | reference |
Definition at line 41 of file debug/bitset.
__gnu_debug_def::bitset< Nb >::bitset | ( | ) | [inline] |
All bits set to zero.
Reimplemented from std::bitset< Nb >.
Definition at line 119 of file debug/bitset.
Referenced by __gnu_debug_def::bitset< Nb >::operator~().
__gnu_debug_def::bitset< Nb >::bitset | ( | unsigned long | __val | ) | [inline] |
Initial bits bitwise-copied from a single word (others set to zero).
Reimplemented from std::bitset< Nb >.
Definition at line 121 of file debug/bitset.
bitset<Nb>& __gnu_debug_def::bitset< Nb >::operator<<= | ( | size_t | position | ) | [inline] |
Operations on bitsets.
position | The number of places to shift. |
Reimplemented from std::bitset< Nb >.
Definition at line 157 of file debug/bitset.
bitset<Nb>& __gnu_debug_def::bitset< Nb >::operator>>= | ( | size_t | position | ) | [inline] |
Operations on bitsets.
position | The number of places to shift. |
Reimplemented from std::bitset< Nb >.
Definition at line 164 of file debug/bitset.
bitset<Nb>& __gnu_debug_def::bitset< Nb >::set | ( | ) | [inline] |
Sets every bit to true.
Reimplemented from std::bitset< Nb >.
Definition at line 171 of file debug/bitset.
bitset<Nb>& __gnu_debug_def::bitset< Nb >::set | ( | size_t | position, | |
bool | __val = true | |||
) | [inline] |
Sets a given bit to a particular value.
position | The index of the bit. | |
val | Either true or false, defaults to true. |
std::out_of_range | If pos is bigger the size of the set. |
Reimplemented from std::bitset< Nb >.
Definition at line 180 of file debug/bitset.
bitset<Nb>& __gnu_debug_def::bitset< Nb >::reset | ( | ) | [inline] |
Sets every bit to false.
Reimplemented from std::bitset< Nb >.
Definition at line 187 of file debug/bitset.
bitset<Nb>& __gnu_debug_def::bitset< Nb >::reset | ( | size_t | position | ) | [inline] |
Sets a given bit to false.
position | The index of the bit. |
std::out_of_range | If pos is bigger the size of the set. |
set(pos,false)
.
Reimplemented from std::bitset< Nb >.
Definition at line 194 of file debug/bitset.
bitset<Nb> __gnu_debug_def::bitset< Nb >::operator~ | ( | ) | const [inline] |
See the no-argument flip().
Reimplemented from std::bitset< Nb >.
Definition at line 200 of file debug/bitset.
References __gnu_debug_def::bitset< Nb >::bitset().
bitset<Nb>& __gnu_debug_def::bitset< Nb >::flip | ( | ) | [inline] |
Toggles every bit to its opposite value.
Reimplemented from std::bitset< Nb >.
Definition at line 203 of file debug/bitset.
bitset<Nb>& __gnu_debug_def::bitset< Nb >::flip | ( | size_t | position | ) | [inline] |
Toggles a given bit to its opposite value.
position | The index of the bit. |
std::out_of_range | If pos is bigger the size of the set. |
Reimplemented from std::bitset< Nb >.
Definition at line 210 of file debug/bitset.
reference __gnu_debug_def::bitset< Nb >::operator[] | ( | size_t | position | ) | [inline] |
Array-indexing support.
position | Index into the bitset. |
Reimplemented from std::bitset< Nb >.
Definition at line 220 of file debug/bitset.
References std::bitset< Nb >::reference.
bool __gnu_debug_def::bitset< Nb >::operator[] | ( | size_t | position | ) | const [inline] |
Array-indexing support.
position | Index into the bitset. |
Reimplemented from std::bitset< Nb >.
Definition at line 229 of file debug/bitset.
std::basic_string<CharT, Traits, Allocator> __gnu_debug_def::bitset< Nb >::to_string | ( | ) | const [inline] |
Retuns a character interpretation of the bitset.
Also note that you must specify the string's template parameters explicitly. Given a bitset bs
and a string :
s = bs.to_string<char,char_traits<char>,allocator<char> >();
Reimplemented from std::bitset< Nb >.
Definition at line 239 of file debug/bitset.
bitset<Nb> __gnu_debug_def::bitset< Nb >::operator<< | ( | size_t | position | ) | const [inline] |
Self-explanatory.
Reimplemented from std::bitset< Nb >.
Definition at line 258 of file debug/bitset.
bitset<Nb> __gnu_debug_def::bitset< Nb >::operator>> | ( | size_t | position | ) | const [inline] |
Self-explanatory.
Reimplemented from std::bitset< Nb >.
Definition at line 262 of file debug/bitset.
bitset<Nb>& std::bitset< Nb >::operator &= | ( | const bitset< Nb > & | __rhs | ) | [inline, inherited] |
bitset<Nb>& std::bitset< Nb >::operator|= | ( | const bitset< Nb > & | __rhs | ) | [inline, inherited] |
bitset<Nb>& std::bitset< Nb >::operator^= | ( | const bitset< Nb > & | __rhs | ) | [inline, inherited] |
unsigned long std::bitset< Nb >::to_ulong | ( | ) | const [inline, inherited] |
Retuns a numerical interpretation of the bitset.
std::overflow_error | If there are too many bits to be represented in an unsigned long . |
size_t std::bitset< Nb >::count | ( | ) | const [inline, inherited] |
size_t std::bitset< Nb >::size | ( | ) | const [inline, inherited] |
bool std::bitset< Nb >::operator== | ( | const bitset< Nb > & | __rhs | ) | const [inline, inherited] |
bool std::bitset< Nb >::operator!= | ( | const bitset< Nb > & | __rhs | ) | const [inline, inherited] |
bool std::bitset< Nb >::test | ( | size_t | position | ) | const [inline, inherited] |
Tests the value of a bit.
position | The index of a bit. |
std::out_of_range | If pos is bigger the size of the set. |
Definition at line 1016 of file bitset.
References std::__throw_out_of_range().
bool std::bitset< Nb >::any | ( | ) | const [inline, inherited] |
bool std::bitset< Nb >::none | ( | ) | const [inline, inherited] |
void __gnu_debug::Safe_sequence_base::M_detach_all | ( | ) | [protected, inherited] |
void __gnu_debug::Safe_sequence_base::M_detach_singular | ( | ) | [protected, inherited] |
void __gnu_debug::Safe_sequence_base::M_revalidate_singular | ( | ) | [protected, inherited] |
void __gnu_debug::Safe_sequence_base::M_swap | ( | Safe_sequence_base & | x | ) | [protected, inherited] |
Swap this sequence with the given sequence. This operation also swaps ownership of the iterators, so that when the operation is complete all iterators that originally referenced one container now reference the other container.
Definition at line 172 of file debug.cc.
References __gnu_debug::swap().
void __gnu_debug::Safe_sequence_base::M_invalidate_all | ( | ) | const [inline, inherited] |
Invalidates all iterators.
Definition at line 202 of file safe_base.h.
Safe_iterator_base* __gnu_debug::Safe_sequence_base::M_iterators [inherited] |
The list of mutable iterators that reference this container.
Definition at line 153 of file safe_base.h.
Safe_iterator_base* __gnu_debug::Safe_sequence_base::M_const_iterators [inherited] |
The list of constant iterators that reference this container.
Definition at line 156 of file safe_base.h.
unsigned int __gnu_debug::Safe_sequence_base::M_version [mutable, inherited] |
The container version number. This number may never be 0.
Definition at line 159 of file safe_base.h.