operator==(std::layout_stride::mapping)
From cppreference.com
template< class OtherMapping >
friend constexpr bool operator==( const mapping& lhs,
const OtherMapping& rhs ) noexcept;
|
(since C++23) | |
Compares two layout mappings of possibly different layout types based on their underlying extents and strides.
Layout mappings lhs and rhs compare equal if all of the following conditions are true:
- both
lhs.extents()andrhs.extents()are equal, OFFSET(rhs)is equal to0, and- for every rank index
rin the range[0,lhs.extents().rank()),lhs.stride(r)is equal torhs.stride(r)
Where OFFSET(rhs) is equal to:
rhs(), ifrhs.extents().rank()is0,- otherwise
0, if the size of the multidimensional index spacerhs.extents()is0, - otherwise
rhs(z...)for a pack of integerszthat is a multidimensional index inrhs.extents()and each element ofzis equal to0.
This overload participates in overload resolution only if all of the following constraints are satisfied:
- layout-mapping-alike
<OtherMapping>is satisfied, rank_ == OtherMapping::extents_type::rank()istrue, andOtherMapping::is_always_strided()istrue
(rank_ is an exposition-only static member constant defined in std::layout_stride::mapping.)
If OtherMapping does not meet the LayoutMapping requirements, the behavior is undefined.
Parameters
| lhs, rhs | - | layout mappings whose extents and strides to compare |
Return value
true if lhs and rhs are both equal as specified above, false otherwise
Example
| This section is incomplete Reason: no example |
See also
compares this layout mapping of layout_left with other mapping (function template) | |
compares this layout mapping of layout_right with other mapping (function template) | |
(C++23) |
compare underlying extents in each dimension of two extents (function) |