|
comparison operatorsfunction
template <class Key, class Compare, class Allocator> bool operator== ( const set<Key,Compare,Allocator>& x, const set<Key,Compare,Allocator>& y ); template <class Key, class Compare, class Allocator> bool operator< ( const set<Key,Compare,Allocator>& x, const set<Key,Compare,Allocator>& y ); template <class Key, class Compare, class Allocator> bool operator!= ( const set<Key,Compare,Allocator>& x, const set<Key,Compare,Allocator>& y ); template <class Key, class Compare, class Allocator> bool operator> ( const set<Key,Compare,Allocator>& x, const set<Key,Compare,Allocator>& y ); template <class Key, class Compare, class Allocator> bool operator>= ( const set<Key,Compare,Allocator>& x, const set<Key,Compare,Allocator>& y ); template <class Key, class Compare, class Allocator> bool operator<= ( const set<Key,Compare,Allocator>& x, const set<Key,Compare,Allocator>& y ); Global comparison operator functions These overloaded global operator functions perform the appropriate comparison operation between set containers x and y.Operations == and != are performed by comparing the elements using algorithm equal. Operations <, >, <= and >= are performed by using algorithm lexicographical_compare, which requires that the type of the elements (template parameter Key) has the < operation (less-than) defined between two objects of that type. These operators are overloaded in header <set>. Parameters
Return Valuetrue if the condition holds, and false otherwise.
|