operator==(std::layout_stride::mapping)
From cppreference.com
< cpp | container | mdspan | layout stride | mapping
C++
Feature test macros (C++20)
Concepts library (C++20)
Metaprogramming library (C++11)
Ranges library (C++20)
Filesystem library (C++17)
Concurrency support library (C++11)
Execution control library (C++26)
Containers library
(C++17)
(C++11)
(C++26)
(C++26)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++23)
(C++23)
(C++23)
(C++23)
(C++20)
(C++23)
Tables
std::mdspan
(C++26)
(C++26)
(C++26)
(C++26)
(C++26)
(C++26)
(C++26)
(C++26)
(C++26)
std::layout_stride::mapping
operator==
template< class OtherMapping >
(since C++23)
friend constexpr bool operator==( const mapping& lhs,
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() and rhs.extents() are equal,
- OFFSET(rhs) is equal to 0, and
- for every rank index r in the range
[
0,
lhs.extents().rank())
, lhs.stride(r) is equal to rhs.stride(r)
Where OFFSET(rhs) is equal to:
- rhs(), if rhs.extents().rank() is 0,
- otherwise 0, if the size of the multidimensional index space rhs.extents() is 0,
- otherwise rhs(z...) for a pack of integers z that is a multidimensional index in rhs.extents() and each element of z is equal to 0.
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() is true, and
- OtherMapping::is_always_strided() is true
(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.
Contents
[edit] Parameters
lhs, rhs
-
layout mappings whose extents and strides to compare
[edit] Return value
true if lhs and rhs are both equal as specified above, false otherwise
[edit] Example
This section is incomplete
Reason: no example
Reason: no example