Compare

All the general comparison operators work on containers.

Containers support the comparison operators ==, !=, <, >, <=, and >=. The comparison of two containers happens on the elements of the containers. When associative containers are compared, their keys are compared. Unordered associative containers support only the comparison operator == and !=.

Get hands-on with 1000+ tech skills courses.