2 Copyright 2010 Neil Groves
3 Distributed under the Boost Software License, Version 1.0.
4 (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 [section:replace_copy replace_copy]
11 template<class ForwardRange, class OutputIterator, class Value>
12 OutputIterator replace_copy(const ForwardRange& rng, OutputIterator out,
13 const Value& what, const Value& with_what);
18 `replace_copy` copy every element `x` in `rng` such that the corresponding element in the output range `y` is `x == what ? with_what : x`.
22 Defined in the header file `boost/range/algorithm/replace_copy.hpp`
24 [heading Requirements]
26 * `ForwardRange` is a model of the __forward_range__ Concept.
27 * `ForwardRange` is mutable.
28 * `Value` is convertible to `ForwardRange`'s value type.
29 * `Value` is a model of the `AssignableConcept`.
30 * `OutputIterator` is a model of the `OutputIteratorConcept`.
34 Linear. `replace_copy` performs exactly `distance(rng)`.