JH-Toolkit v1.4.1
An engineering-oriented C++20 toolkit with duck-typed concepts, static design, async coroutines, and semantic containers — header-only, RTTI-free, and concurrency-friendly.
Loading...
Searching...
No Matches
jh::runtime_arr< bool >::bit_iterator Struct Referencefinal

Iterator over individual bits in the bit-packed array. More...

#include <jh/core/runtime_arr.h>

Public Types

using iterator_concept = std::random_access_iterator_tag
using iterator_category = iterator_concept
using value_type = bool
using difference_type = std::ptrdiff_t
using reference = bit_ref
using pointer = void

Public Member Functions

 bit_iterator (runtime_arr *parent, const std::uint64_t index)
bit_ref operator* () const
bit_iterator & operator++ ()
bit_iterator operator++ (int)
bit_iterator & operator-- ()
bit_iterator operator-- (int)
bit_iterator & operator+= (const difference_type n)
bit_iterator & operator-= (const difference_type n)
bit_iterator operator+ (const difference_type n) const
bit_iterator operator- (const difference_type n) const
difference_type operator- (const bit_iterator &other) const
bool operator== (const bit_iterator &other) const
bool operator!= (const bit_iterator &other) const
bool operator< (const bit_iterator &other) const
bool operator<= (const bit_iterator &other) const
bool operator> (const bit_iterator &other) const
bool operator>= (const bit_iterator &other) const

Public Attributes

runtime_arrparent_
std::uint64_t index_

Detailed Description

Iterator over individual bits in the bit-packed array.

Provides STL-style traversal for elements stored in runtime_arr<bool>, where each bit is accessed through a lightweight proxy reference.

Note
Because the element type is represented by proxy objects, the container cannot satisfy the full std::ranges requirements for a boolean range (similar to std::vector<bool>). For a fully standards-compliant boolean range, use the non-packed form: jh::runtime_arr<bool, jh::runtime_arr_helper::bool_flat_alloc>.

The documentation for this struct was generated from the following file: