operator==(std::extents)

来自cppreference.com
< cpp‎ | container‎ | mdspan‎ | extents


 
 
 
 
 
template< class OtherIndexType, std::size_t... OtherExtents >

friend constexpr bool operator==(

    const extents& lhs, const extents<OtherIndexType, OtherExtents...>& rhs ) noexcept;
(C++23 起)

比较两个 extents。若 lhs.rank() 等于 rhs.rank() 且对于 rhs 的每个秩索引 rlhs.extent(r) 均等于 rhs.extent(r) 则返回 true;否则返回 false

参数

lhs, rhs - 要比较值的 extents

返回值

lhsrhs 所表示的尺度相等则返回 true,否则返回 false

示例