operator<

template<class Key, class Pred, class A>
    bool operator<(
        const set <Key, Pred, A>& lhs,
        const set <Key, Pred, A>& rhs);
template<class Key, class Pred, class A>
    bool operator<(
        const multiset <Key, Pred, A>& lhs,
        const multiset <Key, Pred, A>& rhs);

The first template function overloads operator< to compare two objects of template class set. The second template function overloads operator< to compare two objects of template class multiset. Both functions return lexicographical_compare(lhs. begin(), lhs. end(), rhs.begin(), rhs.end()).