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 #include <boost/range/detail/implementation_help.hpp>
18 #include <boost/range/iterator.hpp>
19 #include <boost/range/detail/common.hpp>
23 namespace range_detail
25 template< typename T >
28 //////////////////////////////////////////////////////////////////////
30 //////////////////////////////////////////////////////////////////////
33 struct range_end<std_container_>
35 template< typename C >
36 static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
43 //////////////////////////////////////////////////////////////////////
45 //////////////////////////////////////////////////////////////////////
48 struct range_end<std_pair_>
50 template< typename P >
51 static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<P>::type
58 //////////////////////////////////////////////////////////////////////
60 //////////////////////////////////////////////////////////////////////
63 struct range_end<array_>
66 static BOOST_RANGE_DEDUCED_TYPENAME remove_extent<T>::type* fun(T& t)
68 return t + remove_extent<T>::size;
72 } // namespace 'range_detail'
74 namespace range_adl_barrier
76 template< typename C >
77 inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
80 return range_detail::range_end< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range<C>::type >::fun( c );
82 } // namespace range_adl_barrier
84 } // namespace 'boost'