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_if replaced_if]
10 [[Pipe] [`rng | boost::adaptors::replaced_if(pred, new_value)`]]
11 [[Function] [`boost::adaptors::replace_if(rng, pred, new_value)`]]
15 * The range `value_type` is convertible to the argument type of `pred`.
16 * `new_value` is convertible to the `value_type` of the range.
17 * [*Postconditions:] For all elements `x` in the returned range, the value `x` is equal to the value of `pred(y) ? 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_if_range<decltype(rng)>`
20 * [*Returned Range Category:] The range category of `rng`.
22 [section:replaced_if_example replaced_if example]
23 [import ../../../test/adaptor_test/replaced_if_example.cpp]
27 This would produce the output:
29 1,10,3,10,5,10,7,10,9,