PageRenderTime 49ms CodeModel.GetById 45ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/Src/Dependencies/Boost/boost/range/algorithm/copy_backward.hpp

http://hadesmem.googlecode.com/
C++ Header | 43 lines | 23 code | 5 blank | 15 comment | 0 complexity | 214c87ae0c4231af2e5d06bb649fa84f MD5 | raw file
 1//  Copyright Neil Groves 2009. Use, modification and
 2//  distribution is subject to the Boost Software License, Version
 3//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
 4//  http://www.boost.org/LICENSE_1_0.txt)
 5//
 6//
 7// For more information, see http://www.boost.org/libs/range/
 8//
 9#ifndef BOOST_RANGE_ALGORITHM_COPY_BACKWARD_HPP_INCLUDED
10#define BOOST_RANGE_ALGORITHM_COPY_BACKWARD_HPP_INCLUDED
11
12#include <boost/concept_check.hpp>
13#include <boost/range/begin.hpp>
14#include <boost/range/end.hpp>
15#include <boost/range/concepts.hpp>
16#include <algorithm>
17
18namespace boost
19{
20    namespace range
21    {
22
23/// \brief template function copy_backward
24///
25/// range-based version of the copy_backwards std algorithm
26///
27/// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
28/// \pre BidirectionalTraversalWriteableIterator is a model of the BidirectionalIteratorConcept
29/// \pre BidirectionalTraversalWriteableIterator is a model of the WriteableIteratorConcept
30template< class BidirectionalRange, class BidirectionalTraversalWriteableIterator >
31inline BidirectionalTraversalWriteableIterator
32copy_backward(const BidirectionalRange& rng,
33              BidirectionalTraversalWriteableIterator out)
34{
35    BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> ));
36    return std::copy_backward(boost::begin(rng), boost::end(rng), out);
37}
38
39    } // namespace range
40    using range::copy_backward;
41} // namespace boost
42
43#endif // include guard