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:replaced replaced]
10 [[Pipe] [`rng | boost::adaptors::replaced(new_value, old_value)`]]
11 [[Function] [`boost::adaptors::replace(rng, new_value, old_value)`]]
15 * `new_value` is convertible to the `value_type` of the range.
16 * `old_value` is convertible to the `value_type` of the range.
17 * [*Postcondition:] For all elements `x` in the returned range, the value `x` is equal to the value of `(y == old_value) ? new_value : y` where `y` is the corresponding element in the original range.
18 * [*Range Category:] __single_pass_range__
19 * [*Range Return Type:] `boost::replaced_range<decltype(rng)>`
20 * [*Returned Range Category:] The range category of `rng`.
22 [section:replaced_example replaced example]
23 [import ../../../test/adaptor_test/replaced_example.cpp]
27 This would produce the output:
29 1,10,3,10,5,10,7,10,9,