19 template <
class B,
bool is_const>
91 constexpr
self_type& operator=(
bool value) noexcept;
98 constexpr operator
bool() const noexcept;
106 constexpr
bool operator~() const noexcept;
140 using block_type = typename B::block_type;
141 using bitset_type = B;
142 using size_type = typename B::size_type;
159 constexpr
void assign(
bool value) noexcept;
165 constexpr
void set() noexcept;
171 constexpr
void reset() noexcept;
173 bitset_type* p_bitset;
177 template <typename RAR>
178 requires
std::
ranges::random_access_range<
std::remove_pointer_t<RAR>>
191 template <class B1, class B2>
229 return p_bitset->test(m_index);
235 return !p_bitset->test(m_index);
263 p_bitset->set(m_index, !p_bitset->test(m_index));
276 constexpr void bitset_reference<B>::assign(
bool rhs)
noexcept
278 rhs ? set() : reset();
282 constexpr void bitset_reference<B>::set() noexcept
284 p_bitset->set(m_index,
true);
288 constexpr void bitset_reference<B>::reset() noexcept
290 p_bitset->set(m_index,
false);
293 template <
class B1,
class B2>
296 return bool(lhs) == bool(rhs);
302 return bool(lhs) == rhs;
306#if defined(__cpp_lib_format)
310struct std::formatter<
sparrow::bitset_reference<B>>
312 constexpr auto parse(std::format_parse_context& ctx)
317 auto format(
const sparrow::bitset_reference<B>& b, std::format_context& ctx)
const
320 return std::format_to(ctx.out(),
"{}", val);
Iterator used to iterate over the bits of a dynamic bitset as if they were addressable values.
A proxy reference class that provides mutable access to individual bits in a bitset.
constexpr bitset_reference(const bitset_reference &) noexcept=default
constexpr self_type & operator^=(bool rhs) noexcept
Bitwise XOR assignment.
bitset_reference< B > self_type
This class type for convenience.
constexpr self_type & operator|=(bool rhs) noexcept
Bitwise OR assignment.
constexpr self_type & operator&=(bool rhs) noexcept
Bitwise AND assignment.
constexpr self_type & operator=(const self_type &rhs) noexcept
Copy assignment from another bitset_reference.
constexpr bitset_reference(bitset_reference &&) noexcept=default
friend class dynamic_bitset_base
constexpr bool operator~() const noexcept
Bitwise NOT operator.
SPARROW_API bool operator==(const array &lhs, const array &rhs)
Compares the content of two arrays.