libycxx

function object

std::ranges::replace_copy_if

Scope
std::ranges

Synopsis

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

Call signatures

replace_copy_if 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,
        class O,
        class T = std::iter_value_t<O>,
        class Proj = std::identity,
        std::indirect_unary_predicate<std::projected<iterator_t<R>, Proj>> Pred>
      requires std::indirectly_copyable<iterator_t<R>, O> && std::output_iterator<O, const T&>
    constexpr std::ranges::replace_copy_if_result<borrowed_iterator_t<R>, O> replace_copy_if(
        R&& r,
        O result,
        Pred pred,
        const T& new_value,
        Proj proj = {});
    (1)
  2. template<
        std::input_iterator I,
        std::sentinel_for<I> S,
        class O,
        class T = std::iter_value_t<O>,
        class Proj = std::identity,
        std::indirect_unary_predicate<std::projected<I, Proj>> Pred>
      requires std::indirectly_copyable<I, O> && std::output_iterator<O, const T&>
    constexpr std::ranges::replace_copy_if_result<I, O> replace_copy_if(
        I first,
        S last,
        O result,
        Pred pred,
        const T& new_value,
        Proj proj = {});
    (2)
  3. template<
        class ExecutionPolicy,
        sized_random_access_range R,
        sized_random_access_range OutR,
        class T = std::ranges::range_value_t<OutR>,
        class Proj = std::identity,
        std::indirect_unary_predicate<std::projected<std::ranges::iterator_t<R>, Proj>> Pred>
      requires execution-policy<ExecutionPolicy> &&
                 std::indirectly_copyable<std::ranges::iterator_t<R>, std::ranges::iterator_t<OutR>> &&
                 std::indirectly_writable<std::ranges::iterator_t<OutR>, const T&>
    std::ranges::in_out_result<std::ranges::borrowed_iterator_t<R>, std::ranges::borrowed_iterator_t<OutR>> replace_copy_if(
        ExecutionPolicy&& exec,
        R&& r,
        OutR&& result_r,
        Pred pred,
        const T& new_value,
        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 T = std::iter_value_t<O>,
        class Proj = std::identity,
        std::indirect_unary_predicate<std::projected<I, Proj>> Pred>
      requires execution-policy<ExecutionPolicy> && std::indirectly_copyable<I, O> &&
                 std::indirectly_writable<O, const T&>
    std::ranges::in_out_result<I, O> replace_copy_if(
        ExecutionPolicy&&,
        I first,
        S last,
        O result,
        OutS result_last,
        Pred pred,
        const T& new_value,
        Proj proj = {}) noexcept;
    (4)