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,21 +17,27 @@
|
||||
|
||||
namespace boost
|
||||
{
|
||||
/// \brief template function copy_backward
|
||||
///
|
||||
/// range-based version of the copy_backwards std algorithm
|
||||
///
|
||||
/// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
|
||||
/// \pre BidirectionalTraversalWriteableIterator is a model of the BidirectionalIteratorConcept
|
||||
/// \pre BidirectionalTraversalWriteableIterator is a model of the WriteableIteratorConcept
|
||||
template< class BidirectionalRange, class BidirectionalTraversalWriteableIterator >
|
||||
inline BidirectionalTraversalWriteableIterator
|
||||
copy_backward(const BidirectionalRange& rng,
|
||||
BidirectionalTraversalWriteableIterator out)
|
||||
namespace range
|
||||
{
|
||||
boost::function_requires< BidirectionalRangeConcept<BidirectionalRange> >();
|
||||
return std::copy_backward(boost::begin(rng), boost::end(rng), out);
|
||||
}
|
||||
|
||||
/// \brief template function copy_backward
|
||||
///
|
||||
/// range-based version of the copy_backwards std algorithm
|
||||
///
|
||||
/// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
|
||||
/// \pre BidirectionalTraversalWriteableIterator is a model of the BidirectionalIteratorConcept
|
||||
/// \pre BidirectionalTraversalWriteableIterator is a model of the WriteableIteratorConcept
|
||||
template< class BidirectionalRange, class BidirectionalTraversalWriteableIterator >
|
||||
inline BidirectionalTraversalWriteableIterator
|
||||
copy_backward(const BidirectionalRange& rng,
|
||||
BidirectionalTraversalWriteableIterator out)
|
||||
{
|
||||
BOOST_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> ));
|
||||
return std::copy_backward(boost::begin(rng), boost::end(rng), out);
|
||||
}
|
||||
|
||||
} // namespace range
|
||||
using range::copy_backward;
|
||||
} // namespace boost
|
||||
|
||||
#endif // include guard
|
||||
|
Reference in New Issue
Block a user