20 template <
class B,
bool is_const>
45 constexpr operator
bool() const noexcept;
47 constexpr
bool operator~() const noexcept;
55 using block_type = typename B::block_type;
56 using bitset_type = B;
57 using size_type = typename B::size_type;
61 constexpr
void assign(
bool) noexcept;
62 constexpr
void set() noexcept;
63 constexpr
void reset() noexcept;
65 bitset_type* p_bitset;
69 template <typename RAR>
70 requires
std::
ranges::random_access_range<
std::remove_pointer_t<RAR>>
74 template <class B1, class B2>
104 return p_bitset->test(m_index);
110 return !p_bitset->test(m_index);
138 p_bitset->set(m_index, !p_bitset->test(m_index));
151 constexpr void bitset_reference<B>::assign(
bool rhs)
noexcept
153 rhs ? set() : reset();
157 constexpr void bitset_reference<B>::set() noexcept
159 p_bitset->set(m_index,
true);
163 constexpr void bitset_reference<B>::reset() noexcept
165 p_bitset->set(m_index,
false);
168 template <
class B1,
class B2>
171 return bool(lhs) == bool(rhs);
177 return bool(lhs) == rhs;
181#if defined(__cpp_lib_format)
185struct std::formatter<
sparrow::bitset_reference<B>>
187 constexpr auto parse(std::format_parse_context& ctx)
192 auto format(
const sparrow::bitset_reference<B>& b, std::format_context& ctx)
const
195 return std::format_to(ctx.out(),
"{}", val);
Iterator used to iterate over the bits of a dynamic bitset as if they were addressable values.
Reference proxy used by the bitset_iterator class to make it possible to assign a bit of a bitset as ...
constexpr bitset_reference(const bitset_reference &) noexcept=default
constexpr self_type & operator=(const self_type &) noexcept
constexpr self_type & operator|=(bool) noexcept
bitset_reference< B > self_type
constexpr bitset_reference(bitset_reference &&) noexcept=default
constexpr self_type & operator^=(bool) noexcept
friend class dynamic_bitset_base
constexpr bool operator~() const noexcept
constexpr self_type & operator&=(bool) noexcept
SPARROW_API bool operator==(const array &lhs, const array &rhs)
Compares the content of two arrays.