libycxx

function object

std::ranges::lexicographical_compare

Scope
std::ranges

Synopsis

inline constexpr /* implementation-defined */ lexicographical_compare = {};

Call signatures

lexicographical_compare is a function object; these are its call operators as libycxx declares them, written as the functions the draft declares.

  1. template<
        std::ranges::input_range R1,
        std::ranges::input_range R2,
        class Proj1 = std::identity,
        class Proj2 = std::identity,
        std::indirect_strict_weak_order<std::projected<iterator_t<R1>, Proj1>, std::projected<iterator_t<R2>, Proj2>> Comp = std::ranges::less>
    [[nodiscard]] constexpr bool lexicographical_compare(
        R1&& r1,
        R2&& r2,
        Comp comp = {},
        Proj1 proj1 = {},
        Proj2 proj2 = {});
    (1)
  2. template<
        std::input_iterator I1,
        std::sentinel_for<I1> S1,
        std::input_iterator I2,
        std::sentinel_for<I2> S2,
        class Proj1 = std::identity,
        class Proj2 = std::identity,
        std::indirect_strict_weak_order<std::projected<I1, Proj1>, std::projected<I2, Proj2>> Comp = std::ranges::less>
    [[nodiscard]] constexpr bool lexicographical_compare(
        I1 first1,
        S1 last1,
        I2 first2,
        S2 last2,
        Comp comp = {},
        Proj1 proj1 = {},
        Proj2 proj2 = {});
    (2)
  3. template<
        class ExecutionPolicy,
        std::random_access_iterator I1,
        std::sized_sentinel_for<I1> S1,
        std::random_access_iterator I2,
        std::sized_sentinel_for<I2> S2,
        class Proj1 = std::identity,
        class Proj2 = std::identity,
        std::indirect_strict_weak_order<std::projected<I1, Proj1>, std::projected<I2, Proj2>> Comp = std::ranges::less>
      requires execution-policy<ExecutionPolicy>
    decltype(auto) lexicographical_compare(
        ExecutionPolicy&&,
        I1 first1,
        S1 last1,
        I2 first2,
        S2 last2,
        Comp comp = {},
        Proj1 proj1 = {},
        Proj2 proj2 = {}) noexcept;
    (3)
  4. template<
        class ExecutionPolicy,
        sized-random-access-range R1,
        sized-random-access-range R2,
        class Proj1 = std::identity,
        class Proj2 = std::identity,
        std::indirect_strict_weak_order<std::projected<std::ranges::iterator_t<R1>, Proj1>, std::projected<std::ranges::iterator_t<R2>, Proj2>> Comp = std::ranges::less>
      requires execution-policy<ExecutionPolicy>
    decltype(auto) lexicographical_compare(
        ExecutionPolicy&&,
        R1&& r1,
        R2&& r2,
        Comp comp = {},
        Proj1 proj1 = {},
        Proj2 proj2 = {}) noexcept;
    (4)