operator<

template<class T, class A>
    bool operator<(
        const vector <T, A>& lhs,
        const vector <T, A>& rhs);

The template function overloads operator< to compare two objects of template class vector. The function returns lexicographical_compare(lhs. begin(), lhs. end(), rhs.begin(), rhs.end()).

See the related sample program.