File indexing completed on 2024-11-15 09:30:31
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_RANGE_END_HPP
0012 #define BOOST_RANGE_END_HPP
0013
0014 #if defined(_MSC_VER)
0015 # pragma once
0016 #endif
0017
0018 #include <boost/range/config.hpp>
0019
0020 #include <boost/range/detail/implementation_help.hpp>
0021 #include <boost/range/iterator.hpp>
0022 #include <boost/range/const_iterator.hpp>
0023 #include <boost/config.hpp>
0024 #include <boost/config/workaround.hpp>
0025
0026 namespace boost
0027 {
0028
0029 #if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
0030 namespace range_detail
0031 {
0032 #endif
0033
0034
0035
0036
0037 template< typename C >
0038 BOOST_CONSTEXPR inline BOOST_DEDUCED_TYPENAME range_iterator<C>::type
0039 range_end( C& c )
0040 {
0041
0042
0043
0044
0045
0046 return c.end();
0047 }
0048
0049
0050
0051
0052
0053 template< typename Iterator >
0054 BOOST_CONSTEXPR inline Iterator range_end( const std::pair<Iterator,Iterator>& p )
0055 {
0056 return p.second;
0057 }
0058
0059 template< typename Iterator >
0060 BOOST_CONSTEXPR inline Iterator range_end( std::pair<Iterator,Iterator>& p )
0061 {
0062 return p.second;
0063 }
0064
0065
0066
0067
0068
0069 template< typename T, std::size_t sz >
0070 BOOST_CONSTEXPR inline const T* range_end( const T (&a)[sz] ) BOOST_NOEXCEPT
0071 {
0072 return range_detail::array_end<T,sz>( a );
0073 }
0074
0075 template< typename T, std::size_t sz >
0076 BOOST_CONSTEXPR inline T* range_end( T (&a)[sz] ) BOOST_NOEXCEPT
0077 {
0078 return range_detail::array_end<T,sz>( a );
0079 }
0080
0081 #if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
0082 }
0083 #endif
0084
0085 namespace range_adl_barrier
0086 {
0087
0088 template< class T >
0089 #if !BOOST_WORKAROUND(BOOST_GCC, < 40700)
0090 BOOST_CONSTEXPR
0091 #endif
0092 inline BOOST_DEDUCED_TYPENAME range_iterator<T>::type end( T& r )
0093 {
0094 #if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
0095 using namespace range_detail;
0096 #endif
0097 return range_end( r );
0098 }
0099
0100 template< class T >
0101 #if !BOOST_WORKAROUND(BOOST_GCC, < 40700)
0102 BOOST_CONSTEXPR
0103 #endif
0104 inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type end( const T& r )
0105 {
0106 #if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
0107 using namespace range_detail;
0108 #endif
0109 return range_end( r );
0110 }
0111
0112 }
0113 }
0114
0115 namespace boost
0116 {
0117 namespace range_adl_barrier
0118 {
0119 template< class T >
0120 BOOST_CONSTEXPR inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type
0121 const_end( const T& r )
0122 {
0123 return boost::range_adl_barrier::end( r );
0124 }
0125 }
0126 using namespace range_adl_barrier;
0127 }
0128
0129 #endif
0130