blob: c680ca6acdc5bbf0181e850a4c9ee3f5c49c6a83 [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_REND_HPP
12#define NDNBOOST_RANGE_REND_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/begin.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 -070028rend( C& c )
29{
Jeff Thompson3d613fd2013-10-15 15:39:04 -070030 return NDNBOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type( ndnboost::begin( 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 -070037rend( 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::begin( 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 -070046rend( 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::begin( c ) );
51}
52
53#endif
54
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_rend( const T& r )
58{
59 return ndnboost::rend( r );
60}
61
62} // namespace 'boost'
63
64#endif
65