Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
replace_copy
Prototype

template<class ForwardRange, class OutputIterator, class Value>
OutputIterator replace_copy(const ForwardRange& rng, OutputIterator out,
                            const Value& what, const Value& with_what);

Description

replace_copy copy every element x in rng such that the corresponding element in the output range y is x == what ? with_what : x.

Definition

Defined in the header file boost/range/algorithm/replace_copy.hpp

Requirements
Complexity

Linear. replace_copy performs exactly distance(rng).


PrevUpHomeNext