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_CONST_ITERATOR_HPP
12 #define BOOST_RANGE_CONST_ITERATOR_HPP
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
18 #include <boost/range/config.hpp>
20 #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
21 #include <boost/range/detail/const_iterator.hpp>
24 #include <boost/range/detail/extract_optional_type.hpp>
25 #include <boost/type_traits/remove_const.hpp>
31 //////////////////////////////////////////////////////////////////////////
33 //////////////////////////////////////////////////////////////////////////
35 namespace range_detail {
36 BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( const_iterator )
39 template< typename C >
40 struct range_const_iterator : range_detail::extract_const_iterator<C>
43 //////////////////////////////////////////////////////////////////////////
45 //////////////////////////////////////////////////////////////////////////
47 template< typename Iterator >
48 struct range_const_iterator< std::pair<Iterator,Iterator> >
50 typedef Iterator type;
53 //////////////////////////////////////////////////////////////////////////
55 //////////////////////////////////////////////////////////////////////////
57 template< typename T, std::size_t sz >
58 struct range_const_iterator< T[sz] >
60 typedef const T* type;
65 #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION