<xstd/bits/bit_valarray/bit_slice_array.hpp>, <xstd/bits/bit_valarray/bit_gslice_array.hpp>, <xstd/bits/bit_valarray/bit_mask_array.hpp>, <xstd/bits/bit_valarray/bit_indirect_array.hpp>¶
bit_slice_array, bit_gslice_array, bit_mask_array, bit_indirect_array¶
template<unsigned_integer Block>
class bit_slice_array {
public:
using value_type = bool;
bit_slice_array() = delete;
bit_slice_array(const bit_slice_array&) = default;
~bit_slice_array() = default;
constexpr auto operator=(const bit_slice_array& other) const -> const bit_slice_array&;
template<class A>
requires see below
constexpr auto operator=(const A& a) const -> void;
template<class A>
requires see below
constexpr auto operator&=(const A& a) const -> void;
template<class A>
requires see below
constexpr auto operator|=(const A& a) const -> void;
template<class A>
requires see below
constexpr auto operator^=(const A& a) const -> void;
constexpr auto operator=(const bool& value) const -> void;
constexpr auto operator&=(const bool& value) const -> void;
constexpr auto operator|=(const bool& value) const -> void;
constexpr auto operator^=(const bool& value) const -> void;
};
As [template.slice.array],
[template.gslice.array],
[template.mask.array] and
[template.indirect.array] at T = bool. The four have the members
shown for bit_slice_array, with:
- Only a non-const subscript of a valarray over
Blockmakes one. It refers to the array's blocks, and a copy refers to the same elements; it must not outlive the array, or a mask or index array it was made from. - Assigning one proxy to another assigns the elements, never the reference.
- Constraints:
Ais an owner of the valarray reading overBlock, of any storage, or one of the four proxies overBlock. Preconditions:a's size is the number of positions selected. - Effects: The elements of
a, in order, are written to the selected positions, or combined with them by&,|or^. A proxyagathers what it selects before any position is written, sov[s] = v[t]readsvfirst. Aboolis written to, or combined with, every selected position. - The compound assignments from a
boolare additions; the arithmetic compound assignments and the shifts are absent. - A slice of stride zero and a gslice that repeats a position write one position at a time, in order, so the last write to a position stands.