absl::c_lower_bound

c_lower_bound overloads

Synopses

Declared in <absl/algorithm/container.h>

Container-based version of the <algorithm> std::lower_bound() function to return an iterator pointing to the first element in a sorted container which does not compare less than value.

template<
    typename Sequence,
    typename T>
constexpr
/* implementation-defined */
c_lower_bound(
    Sequence& sequence,
    T const& value);
» more...

Overload of c_lower_bound() for performing a comp comparison other than the default operator<.

template<
    typename Sequence,
    typename T,
    typename LessThan>
constexpr
/* implementation-defined */
c_lower_bound(
    Sequence& sequence,
    T const& value,
    LessThan&& comp);
» more...

Return Value

  • An iterator to the first element not less than value.
  • An iterator to the first element not ordered before value.

Parameters

NameDescription
sequenceThe sorted container to search.
valueThe value to compare against.
compThe comparison used to order the elements.