forked from boostorg/range
Boost.Range algorithms are now in the boost::range namespace and brought into boost by the appropriate using statement. This allows better interoperation with Boost.Algorithm since errors only occur when the use calls similarly named ambiguous functions. In this event the user can disambiguate by using algorithm::xxx() or range::xxx(). This iteration also updates the concept assert code in the range algorithms.
[SVN r61023]
This commit is contained in:
@ -17,20 +17,26 @@
|
||||
|
||||
namespace boost
|
||||
{
|
||||
/// \brief template function replace_copy
|
||||
///
|
||||
/// range-based version of the replace_copy std algorithm
|
||||
///
|
||||
/// \pre ForwardRange is a model of the ForwardRangeConcept
|
||||
template< class ForwardRange, class OutputIterator, class Value >
|
||||
inline OutputIterator
|
||||
replace_copy(ForwardRange& rng, OutputIterator out_it, const Value& what,
|
||||
const Value& with_what)
|
||||
namespace range
|
||||
{
|
||||
boost::function_requires< ForwardRangeConcept<ForwardRange> >();
|
||||
return std::replace_copy(boost::begin(rng), boost::end(rng), out_it,
|
||||
what, with_what);
|
||||
}
|
||||
|
||||
/// \brief template function replace_copy
|
||||
///
|
||||
/// range-based version of the replace_copy std algorithm
|
||||
///
|
||||
/// \pre ForwardRange is a model of the ForwardRangeConcept
|
||||
template< class ForwardRange, class OutputIterator, class Value >
|
||||
inline OutputIterator
|
||||
replace_copy(ForwardRange& rng, OutputIterator out_it, const Value& what,
|
||||
const Value& with_what)
|
||||
{
|
||||
BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
|
||||
return std::replace_copy(boost::begin(rng), boost::end(rng), out_it,
|
||||
what, with_what);
|
||||
}
|
||||
|
||||
} // namespace range
|
||||
using range::replace_copy;
|
||||
} // namespace boost
|
||||
|
||||
#endif // include guard
|
||||
|
Reference in New Issue
Block a user