Container operators
Syntax: #include <list> container operator=(const container& c2); bool operator==(const container& c1, const container& c2); bool operator!=(const container& c1, const container& c2); bool operator<(const container& c1, const container& c2); bool operator>(const container& c1, const container& c2); bool operator<=(const container& c1, const container& c2); bool operator>=(const container& c1, const container& c2); All of the C++ containers can be compared and assigned with the standard comparison operators: ==, !=, <=, >=, <, >, and =. Performing a comparison or assigning one list to another takes linear time. Two lists are equal if:
Comparisons among lists are done lexicographically. Related topics:
|