A view over an integral value allowing for iteration and modification of its individual bits.
More...
|
| | bit_view (std::span< integer_type > span) noexcept |
|
| bit_view (bit_view const &) noexcept=default |
|
| bit_view (bit_view &&) noexcept=default |
|
bit_view & | operator= (bit_view const &) noexcept=default |
|
bit_view & | operator= (bit_view &&) noexcept=default |
| constexpr const_iterator | begin () const |
| constexpr const_iterator | end () const |
| constexpr iterator | begin () |
| constexpr iterator | end () |
|
constexpr const_iterator | cbegin () |
|
constexpr const_iterator | cend () |
| constexpr element_type | at (size_t index) |
| constexpr element_type | at (size_t index) const |
| constexpr element_type | operator[] (size_t index) |
| constexpr element_type | operator[] (size_t index) const |
|
constexpr void | set (size_t index) |
|
constexpr void | clear (size_t index) |
|
constexpr bool | is_set (size_t index) const |
|
constexpr void | set_all () |
|
constexpr void | clear_all () |
|
constexpr void | toggle_all () |
|
constexpr bool | are_all_set () const |
|
template<typename U> |
| constexpr bool | are_all_set (bit_view< U > const &bit_set) const |
|
constexpr bool | are_any_set () const |
|
template<typename U> |
| constexpr bool | are_any_set (bit_view< U > const &bit_set) const |
| constexpr size_t | size () const noexcept |
| constexpr integer_type & | integer_at_bit (size_t bit) |
| constexpr integer_type const & | integer_at_bit (size_t bit) const |
| constexpr auto | integers () const noexcept |
template<typename U>
requires (!std::is_const_v<U>) |
| constexpr void | copy_to (bit_view< U > &target) const |
| | [[nodiscard]] constexpr bit_view<integer_type> subview(size_t starting_at_bit, size_t bit_count) const;
|
template<typename U>
requires (!std::is_const_v<U>) |
| constexpr void | and_with (bit_view< U > &target) const |
template<typename U>
requires (!std::is_const_v<U>) |
| constexpr void | or_with (bit_view< U > &target) const |
template<typename U>
requires (!std::is_const_v<U>) |
| constexpr void | xor_with (bit_view< U > &target) const |
|
constexpr size_t | find_first_bit (bool that_is) const noexcept |
|
constexpr size_t | find_last_bit (bool that_is) const noexcept |
|
constexpr size_t | count_bits (bool that_are) const noexcept |
template<bit_integral INTEGER_TYPE>
struct ghassanpl::bit_view< INTEGER_TYPE >
A view over an integral value allowing for iteration and modification of its individual bits.
Definition at line 19 of file bit_view.h.