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 replace]
15 ForwardRange& replace(ForwardRange& rng, const Value& what, const Value& with_what);
21 const ForwardRange& replace(const ForwardRange& rng, const Value& what, const Value& with_what);
26 `replace` every element in `rng` equal to `what` with `with_what`. Return a reference to `rng`.
30 Defined in the header file `boost/range/algorithm/replace.hpp`
32 [heading Requirements]
34 * `ForwardRange` is a model of the __forward_range__ Concept.
35 * `ForwardRange` is mutable.
36 * `Value` is convertible to `ForwardRange`'s value type.
37 * `Value` is a model of the `AssignableConcept`.
38 * `Value` is a model of the `EqualityComparableConcept`, and may be compared for equality with objects of `ForwardRange`'s value type.
42 Linear. `replace` performs exactly `distance(rng)` comparisons for equality and at most `distance(rng)` assignments.