[ Web Proxy ]
URL:
Viewing: https://ru.cppreference.com/cpp/container/vector/operator_cmp [Back]  [Original]

operator==,!=,<,<=,>,>=(std::vector) cppreference.com
cppreference.com

operator==,!=,<,<=,>,>=(std::vector)

cppreference.com

<metanoindex/>

: :include page

<tbody> </tbody>
template< > bool operator==( vector<>& lhs, vector<>& rhs );
(1)
template< > bool operator!=( vector<>& lhs, vector<>& rhs );
(2)
template< > bool operator<( vector<>& lhs, vector<>& rhs );
(3)
template< > bool operator<=( vector<>& lhs, vector<>& rhs );
(4)
template< > bool operator>( vector<>& lhs, vector<>& rhs );
(5)
template< > bool operator>=( vector<>& lhs, vector<>& rhs );
(6)
.
:
Compares the contents of two containers.
Google.
. .
1-2) , lhs.size() == rhs.size() lhs rhs .
3-6)
lhs rhs . std::lexicographical_compare.
:
Compares the contents of lhs and rhs lexicographically. The comparison is performed by a function equivalent to std::lexicographical_compare.
Google.
. .

lhs, rhs
:
containers whose contents to compare
Google.
. .

1)
true , false
:
true if the contents of the containers are equivalent, false otherwise
Google.
. .
2)
true , false
:
true if the contents of the containers are not equivalent, false otherwise
Google.
. .
3)
true lhs , rhs, false
:
true if the contents of the lhs are lexicographically less than the contents of rhs, false otherwise
Google.
. .
4)
true lhs rhs, false
:
true if the contents of the lhs are lexicographically less than or equal the contents of rhs, false otherwise
Google.
. .
5)
true lhs , rhs, false
:
true if the contents of the lhs are lexicographically greater than the contents of rhs, false otherwise
Google.
. .
6)
true lhs rhs, false
:
true if the contents of the lhs are lexicographically greater than or equal the contents of rhs, false otherwise
Google.
. .

:
Linear in the size of the container
Google.
. .

Web Proxy Viewer  |  New URL  |  Original Page