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_BEGIN_HPP
12 #define BOOST_RANGE_DETAIL_BEGIN_HPP
14 #include <boost/config.hpp> // BOOST_MSVC
15 #include <boost/detail/workaround.hpp>
16 #include <boost/range/iterator.hpp>
17 #include <boost/range/detail/common.hpp>
22 namespace range_detail
24 template< typename T >
27 //////////////////////////////////////////////////////////////////////
29 //////////////////////////////////////////////////////////////////////
32 struct range_begin<std_container_>
34 template< typename C >
35 static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type fun( C& c )
41 //////////////////////////////////////////////////////////////////////
43 //////////////////////////////////////////////////////////////////////
46 struct range_begin<std_pair_>
48 template< typename P >
49 static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<P>::type fun( const P& p )
55 //////////////////////////////////////////////////////////////////////
57 //////////////////////////////////////////////////////////////////////
60 struct range_begin<array_>
63 static BOOST_RANGE_DEDUCED_TYPENAME range_value<T>::type* fun(T& t)
69 } // namespace 'range_detail'
71 namespace range_adl_barrier
73 template< typename C >
74 inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
77 return range_detail::range_begin< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range<C>::type >::fun( c );
80 } // namespace 'boost'