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:
@ -18,25 +18,31 @@
|
||||
|
||||
namespace boost
|
||||
{
|
||||
/// \brief template function reverse_copy
|
||||
///
|
||||
/// range-based version of the reverse_copy std algorithm
|
||||
///
|
||||
/// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
|
||||
template<typename BidirectionalRange, typename OutputIterator>
|
||||
inline OutputIterator reverse_copy(BidirectionalRange& rng, OutputIterator out)
|
||||
namespace range
|
||||
{
|
||||
BOOST_CONCEPT_ASSERT((BidirectionalRangeConcept<BidirectionalRange>));
|
||||
return std::reverse_copy(boost::begin(rng), boost::end(rng), out);
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template<typename BidirectionalRange, typename OutputIterator>
|
||||
inline OutputIterator reverse_copy(const BidirectionalRange& rng, OutputIterator out)
|
||||
{
|
||||
BOOST_CONCEPT_ASSERT((BidirectionalRangeConcept<BidirectionalRange>));
|
||||
return std::reverse_copy(boost::begin(rng), boost::end(rng), out);
|
||||
}
|
||||
/// \brief template function reverse_copy
|
||||
///
|
||||
/// range-based version of the reverse_copy std algorithm
|
||||
///
|
||||
/// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
|
||||
template<typename BidirectionalRange, typename OutputIterator>
|
||||
inline OutputIterator reverse_copy(BidirectionalRange& rng, OutputIterator out)
|
||||
{
|
||||
BOOST_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> ));
|
||||
return std::reverse_copy(boost::begin(rng), boost::end(rng), out);
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template<typename BidirectionalRange, typename OutputIterator>
|
||||
inline OutputIterator reverse_copy(const BidirectionalRange& rng, OutputIterator out)
|
||||
{
|
||||
BOOST_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> ));
|
||||
return std::reverse_copy(boost::begin(rng), boost::end(rng), out);
|
||||
}
|
||||
|
||||
} // namespace range
|
||||
using range::reverse_copy;
|
||||
} // namespace boost
|
||||
|
||||
#endif // include guard
|
||||
|
Reference in New Issue
Block a user