operator==,!=,<,<=,>,>=(std::deque)
提供: cppreference.com
| template< class T, class Alloc > bool operator==( const std::deque<T,Alloc>& lhs, |
(1) | |
| template< class T, class Alloc > bool operator!=( const std::deque<T,Alloc>& lhs, |
(2) | |
| template< class T, class Alloc > bool operator<( const std::deque<T,Alloc>& lhs, |
(3) | |
| template< class T, class Alloc > bool operator<=( const std::deque<T,Alloc>& lhs, |
(4) | |
| template< class T, class Alloc > bool operator>( const std::deque<T,Alloc>& lhs, |
(5) | |
| template< class T, class Alloc > bool operator>=( const std::deque<T,Alloc>& lhs, |
(6) | |
2つのコンテナの内容を比較します。
1-2)
lhs と rhs の内容が等しいかどうか調べます。 つまり、それらが同じ個数の要素を持ち、 lhs 内のそれぞれの要素が rhs 内の同じ位置の要素と等しいかどうか比較します。[編集] 引数
| lhs, rhs | - | 内容を比較するコンテナ |
-オーバロード (1-2) を使用するためには T は EqualityComparable の要件を満たさなければなりません。
| ||
-オーバロード (3-6) を使用するためには T は LessThanComparable の要件を満たさなければなりません。 順序関係は全順序を確立しなければなりません。
| ||
[編集] 戻り値
1) コンテナの内容が等しい場合は true、そうでなければ false。
2) コンテナの内容が等しくない場合は true、そうでなければ false。
3)
lhs の内容が rhs の内容より辞書的に小さい場合は true、そうでなければ false。4)
lhs の内容が rhs の内容より辞書的に小さいまたは等しい場合は true、そうでなければ false。5)
lhs の内容が rhs の内容より辞書的に大きい場合は true、そうでなければ false。6)
lhs の内容が rhs の内容より辞書的に大きいまたは等しい場合は true、そうでなければ false。[編集] 計算量
1-2)
lhs と rhs のサイズが異なる場合は一定。 そうでなければコンテナのサイズに比例。3-6) コンテナのサイズに比例。

