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_CONST_ITERATOR_HPP
12 #define BOOST_RANGE_DETAIL_CONST_ITERATOR_HPP
14 #include <boost/range/detail/common.hpp>
15 #include <boost/range/detail/remove_extent.hpp>
17 //////////////////////////////////////////////////////////////////////////////
18 // missing partial specialization workaround.
19 //////////////////////////////////////////////////////////////////////////////
23 namespace range_detail
25 template< typename T >
26 struct range_const_iterator_;
29 struct range_const_iterator_<std_container_>
31 template< typename C >
34 typedef BOOST_RANGE_DEDUCED_TYPENAME C::const_iterator type;
39 struct range_const_iterator_<std_pair_>
41 template< typename P >
44 typedef BOOST_RANGE_DEDUCED_TYPENAME P::first_type type;
50 struct range_const_iterator_<array_>
52 template< typename T >
55 typedef const BOOST_RANGE_DEDUCED_TYPENAME
56 remove_extent<T>::type* type;
61 template< typename C >
62 class range_const_iterator
64 typedef BOOST_DEDUCED_TYPENAME range_detail::range<C>::type c_type;
66 typedef BOOST_DEDUCED_TYPENAME range_detail::range_const_iterator_<c_type>::BOOST_NESTED_TEMPLATE pts<C>::type type;