Contents

indexed_bitset data access

Data access

constexpr reference indexed_bitset::test(Index i) const
constexpr reference indexed_bitset::operator[](Index i) const

Element access. test is range-checked, and throws std::out_of_range on error. In case of multidimensional span, operator[] signature is std::tuple<Index1, Index2, ...> whereas test signature is test(Index1, Index2, ...). If using C++23, operator[] is also available as [Index1, Index2, ...]`

Parameters

i – The index. Anything that is implicitly convertible to the Index can be used.

Returns

the value at index i (either true or false)

constexpr reference indexed_bitset::all() const

Returns true if all the bits in the bitset have the value true.

constexpr reference indexed_bitset::any() const

Returns true if at least one of the bits in the bitset has the value true. This is equivalent to !bitset.none().

constexpr reference indexed_bitset::none() const

Returns true if no bit in the bitset has the value true. If applicable, this is equivalent to to_ulonglong() == 0.

constexpr std::size_t indexed_bitset::count() const

Returns the number of bits set to true in the bitset.