blob: 68858f196678d7f10335ca054eb611367e5ab4ae [file] [log] [blame]
Jeff Thompsonef2d5a42013-08-22 19:09:24 -07001// 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
Jeff Thompson3d613fd2013-10-15 15:39:04 -070011#ifndef NDNBOOST_RANGE_RBEGIN_HPP
12#define NDNBOOST_RANGE_RBEGIN_HPP
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070013
14#if defined(_MSC_VER) && (_MSC_VER >= 1200)
15# pragma once
16#endif
17
18#include <ndnboost/range/end.hpp>
19#include <ndnboost/range/reverse_iterator.hpp>
20
21namespace ndnboost
22{
23
Jeff Thompson3d613fd2013-10-15 15:39:04 -070024#ifdef NDNBOOST_NO_FUNCTION_TEMPLATE_ORDERING
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070025
26template< class C >
Jeff Thompson3d613fd2013-10-15 15:39:04 -070027inline NDNBOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070028rbegin( C& c )
29{
Jeff Thompson3d613fd2013-10-15 15:39:04 -070030 return NDNBOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type( ndnboost::end( c ) );
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070031}
32
33#else
34
35template< class C >
Jeff Thompson3d613fd2013-10-15 15:39:04 -070036inline NDNBOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070037rbegin( C& c )
38{
Jeff Thompson3d613fd2013-10-15 15:39:04 -070039 typedef NDNBOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070040 iter_type;
41 return iter_type( ndnboost::end( c ) );
42}
43
44template< class C >
Jeff Thompson3d613fd2013-10-15 15:39:04 -070045inline NDNBOOST_DEDUCED_TYPENAME range_reverse_iterator<const C>::type
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070046rbegin( const C& c )
47{
Jeff Thompson3d613fd2013-10-15 15:39:04 -070048 typedef NDNBOOST_DEDUCED_TYPENAME range_reverse_iterator<const C>::type
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070049 iter_type;
50 return iter_type( ndnboost::end( c ) );
51}
52
Jeff Thompson3d613fd2013-10-15 15:39:04 -070053#endif // NDNBOOST_NO_FUNCTION_TEMPLATE_ORDERING
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070054
55template< class T >
Jeff Thompson3d613fd2013-10-15 15:39:04 -070056inline NDNBOOST_DEDUCED_TYPENAME range_reverse_iterator<const T>::type
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070057const_rbegin( const T& r )
58{
59 return ndnboost::rbegin( r );
60}
61
62} // namespace 'boost'
63
64#endif
65