libycxx

function object

std::ranges::sort

Draft
[sort]
Scope
std::ranges

Synopsis

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

Call signatures

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

  1. template<
        std::ranges::random_access_range R,
        class Comp = std::ranges::less,
        class Proj = std::identity>
      requires std::sortable<iterator_t<R>, Comp, Proj>
    constexpr borrowed_iterator_t<R> sort(
        R&& r,
        Comp comp = {},
        Proj proj = {});
    (1)
  2. template<
        std::random_access_iterator I,
        std::sentinel_for<I> S,
        class Comp = std::ranges::less,
        class Proj = std::identity>
      requires std::sortable<I, Comp, Proj>
    constexpr I sort(I first, S last, Comp comp = {}, Proj proj = {});
    (2)
  3. template<
        class ExecutionPolicy,
        std::random_access_iterator I,
        std::sized_sentinel_for<I> S,
        class Comp = std::ranges::less,
        class Proj = std::identity>
      requires execution-policy<ExecutionPolicy> && std::sortable<I, Comp, Proj>
    decltype(auto) sort(
        ExecutionPolicy&&,
        I first,
        S last,
        Comp comp = {},
        Proj proj = {}) noexcept;
    (3)
  4. template<
        class ExecutionPolicy,
        sized-random-access-range R,
        class Comp = std::ranges::less,
        class Proj = std::identity>
      requires execution-policy<ExecutionPolicy> && std::sortable<std::ranges::iterator_t<R>, Comp, Proj>
    decltype(auto) sort(
        ExecutionPolicy&&,
        R&& r,
        Comp comp = {},
        Proj proj = {}) noexcept;
    (4)