Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Function lexicographical_compare

boost::algorithm::lexicographical_compare — Lexicographical compare predicate.

Synopsis

// In header: <boost/algorithm/string/predicate.hpp>


template<typename Range1T, typename Range2T, typename PredicateT> 
  bool lexicographical_compare(const Range1T & Arg1, const Range2T & Arg2, 
                               PredicateT Pred);
template<typename Range1T, typename Range2T> 
  bool lexicographical_compare(const Range1T & Arg1, const Range2T & Arg2);

Description

This predicate is an overload of std::lexicographical_compare for range arguments

It check whether the first argument is lexicographically less then the second one.

If the optional predicate is specified, it is used for character-wise comparison

[Note] Note

This function provides the strong exception-safety guarantee

Parameters:

Arg1

First argument

Arg2

Second argument

Pred

Comparison predicate

Returns:

The result of the test


PrevUpHomeNext