|
| constexpr | reference (dynamic_bitset< Block, Allocator > &bitset, size_type bit_pos) |
| | Constructs a reference to a bit from a sul::dynamic_bitset and a bit position.
|
| constexpr | reference (const reference &) noexcept=default |
| | Copy constructor.
|
| constexpr | reference (reference &&) noexcept=default |
| | Move constructor.
|
| | ~reference () noexcept=default |
| | Destructor.
|
| constexpr reference & | operator= (bool v) |
| | Assign a value to the referenced bit.
|
| constexpr reference & | operator= (const reference &rhs) |
| | Assign a value to the referenced bit from another reference.
|
| constexpr reference & | operator= (reference &&rhs) noexcept |
| | Assign a value to the referenced bit from another reference.
|
| constexpr reference & | operator&= (bool v) |
| | Apply binary operator AND to the referenced bit and a value, and assign the result to the referenced bit.
|
| constexpr reference & | operator|= (bool v) |
| | Apply binary operator OR to the referenced bit and a value, and assign the result to the referenced bit.
|
| constexpr reference & | operator^= (bool v) |
| | Apply binary operator XOR to the referenced bit and a value, and assign the result to the referenced bit.
|
| constexpr reference & | operator-= (bool v) |
| | Apply binary difference to the referenced bit and a value, and assign the result to the referenced bit.
|
| constexpr bool | operator~ () const |
| | Return the result of applying unary NOT operator.
|
| constexpr | operator bool () const |
| | bool conversion operator.
|
| constexpr void | operator& ()=delete |
| | Deleted to avoid taking the address of a temporary proxy object.
|
| constexpr reference & | set () |
| | Set the referenced bit to true.
|
| constexpr reference & | reset () |
| | Reset the referenced bit to false.
|
| constexpr reference & | flip () |
| | Flip the referenced bit.
|
| constexpr reference & | assign (bool v) |
| | Assign the value v to the referenced bit.
|
template<typename Block = unsigned long long, typename Allocator = std::allocator<Block>>
class sul::dynamic_bitset< Block, Allocator >::reference
Reference to a sul::dynamic_bitset bit.
As the bits in the sul::dynamic_bitset class are stored in an optimized way in blocks, it is not possible for the subscript operators to return a reference to a boolean. Hence this class is used as a proxy to enable subscript operator of the sul::dynamic_bitset class to be used as if it was an array of bools.
- Since
- 1.0.0