名稱空間
變體
操作

operator==(std::extents)

來自 cppreference.com
< cpp‎ | 容器‎ | 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 表示的 extents 相等,則返回 true,否則返回 false

[編輯] 示例