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)
8 // For more information, see http://www.boost.org/libs/range/
11 #ifndef BOOST_RANGE_DETAIL_END_HPP
12 #define BOOST_RANGE_DETAIL_END_HPP
14 #include <boost/config.hpp> // BOOST_MSVC
15 #include <boost/detail/workaround.hpp>
17 #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
18 # include <boost/range/detail/vc6/end.hpp>
20 # include <boost/range/detail/implementation_help.hpp>
21 # include <boost/range/iterator.hpp>
22 # include <boost/range/detail/common.hpp>
23 # if BOOST_WORKAROUND(BOOST_MSVC, < 1310)
24 # include <boost/range/detail/remove_extent.hpp>
29 namespace range_detail
31 template< typename T >
34 //////////////////////////////////////////////////////////////////////
36 //////////////////////////////////////////////////////////////////////
39 struct range_end<std_container_>
41 template< typename C >
42 static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
49 //////////////////////////////////////////////////////////////////////
51 //////////////////////////////////////////////////////////////////////
54 struct range_end<std_pair_>
56 template< typename P >
57 static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<P>::type
64 //////////////////////////////////////////////////////////////////////
66 //////////////////////////////////////////////////////////////////////
69 struct range_end<array_>
71 #if !BOOST_WORKAROUND(BOOST_MSVC, < 1310)
72 template< typename T, std::size_t sz >
73 static T* fun( T BOOST_RANGE_ARRAY_REF()[sz] )
75 return boost::range_detail::array_end( boost_range_array );
79 static BOOST_RANGE_DEDUCED_TYPENAME remove_extent<T>::type* fun(T& t)
81 return t + remove_extent<T>::size;
86 } // namespace 'range_detail'
88 namespace range_adl_barrier
90 template< typename C >
91 inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
94 return range_detail::range_end< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range<C>::type >::fun( c );
96 } // namespace range_adl_barrier
98 } // namespace 'boost'