]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/range/rbegin.hpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / boost / range / rbegin.hpp
1 // Boost.Range library
2 //
3 // Copyright Thorsten Ottosen 2003-2004. Use, modification and
4 // distribution is subject to the Boost Software License, Version
5 // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
7 //
8 // For more information, see http://www.boost.org/libs/range/
9 //
10
11 #ifndef BOOST_RANGE_RBEGIN_HPP
12 #define BOOST_RANGE_RBEGIN_HPP
13
14 #if defined(_MSC_VER)
15 # pragma once
16 #endif
17
18 #include <boost/range/end.hpp>
19 #include <boost/range/reverse_iterator.hpp>
20
21 namespace boost
22 {
23
24 template< class C >
25 inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
26 rbegin( C& c )
27 {
28 typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
29 iter_type;
30 return iter_type( boost::end( c ) );
31 }
32
33 template< class C >
34 inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<const C>::type
35 rbegin( const C& c )
36 {
37 typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator<const C>::type
38 iter_type;
39 return iter_type( boost::end( c ) );
40 }
41
42 template< class T >
43 inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<const T>::type
44 const_rbegin( const T& r )
45 {
46 return boost::rbegin( r );
47 }
48
49 } // namespace 'boost'
50
51 #endif
52