forked from boostorg/range
[boost][range] - Improved handling of temporary ranges in range algorithms.
[SVN r63902]
This commit is contained in:
@ -36,6 +36,17 @@ inline ForwardRange&
|
||||
return rng;
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template< class ForwardRange, class UnaryPredicate, class Value >
|
||||
inline const ForwardRange&
|
||||
replace_if(const ForwardRange& rng, UnaryPredicate pred,
|
||||
const Value& val)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
|
||||
std::replace_if(boost::begin(rng), boost::end(rng), pred, val);
|
||||
return rng;
|
||||
}
|
||||
|
||||
} // namespace range
|
||||
using range::replace_if;
|
||||
} // namespace boost
|
||||
|
Reference in New Issue
Block a user