libycxx

function object

std::ranges::unique_copy

Scope
std::ranges

Synopsis

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

Call signatures

unique_copy 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 R,
        std::weakly_incrementable O,
        class Proj = std::identity,
        std::indirect_equivalence_relation<std::projected<iterator_t<R>, Proj>> C = std::ranges::equal_to>
      requires std::indirectly_copyable<iterator_t<R>, O> &&
                 (std::forward_iterator<iterator_t<R>> ||
                  (std::input_iterator<O> && std::same_as<std::ranges::range_value_t<R>, std::iter_value_t<O>>) ||
                  std::indirectly_copyable_storable<iterator_t<R>, O>)
    constexpr std::ranges::unique_copy_result<borrowed_iterator_t<R>, O> unique_copy(
        R&& r,
        O result,
        C comp = {},
        Proj proj = {});
    (1)
  2. template<
        std::input_iterator I,
        std::sentinel_for<I> S,
        std::weakly_incrementable O,
        class Proj = std::identity,
        std::indirect_equivalence_relation<std::projected<I, Proj>> C = std::ranges::equal_to>
      requires std::indirectly_copyable<I, O> &&
                 (std::forward_iterator<I> || (std::input_iterator<O> && std::same_as<std::iter_value_t<I>, std::iter_value_t<O>>) ||
                  std::indirectly_copyable_storable<I, O>)
    constexpr std::ranges::unique_copy_result<I, O> unique_copy(
        I first,
        S last,
        O result,
        C comp = {},
        Proj proj = {});
    (2)
  3. template<
        class ExecutionPolicy,
        sized_random_access_range R,
        sized_random_access_range OutR,
        class Proj = std::identity,
        std::indirect_equivalence_relation<std::projected<std::ranges::iterator_t<R>, Proj>> C = std::ranges::equal_to>
      requires execution-policy<ExecutionPolicy> &&
                 std::indirectly_copyable<std::ranges::iterator_t<R>, std::ranges::iterator_t<OutR>>
    std::ranges::in_out_result<std::ranges::borrowed_iterator_t<R>, std::ranges::borrowed_iterator_t<OutR>> unique_copy(
        ExecutionPolicy&& exec,
        R&& r,
        OutR&& result_r,
        C comp = {},
        Proj proj = {}) noexcept;
    (3)
  4. template<
        class ExecutionPolicy,
        std::random_access_iterator I,
        std::sized_sentinel_for<I> S,
        std::random_access_iterator O,
        std::sized_sentinel_for<O> OutS,
        class Proj = std::identity,
        std::indirect_equivalence_relation<std::projected<I, Proj>> C = std::ranges::equal_to>
      requires execution-policy<ExecutionPolicy> && std::indirectly_copyable<I, O>
    std::ranges::in_out_result<I, O> unique_copy(
        ExecutionPolicy&&,
        I first,
        S last,
        O result,
        OutS result_last,
        C comp = {},
        Proj proj = {}) noexcept;
    (4)