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>
29 //////////////////////////////////////////////////////////////////////////
31 //////////////////////////////////////////////////////////////////////////
33 template< typename C >
34 struct range_const_iterator
36 typedef BOOST_DEDUCED_TYPENAME C::const_iterator type;
39 //////////////////////////////////////////////////////////////////////////
41 //////////////////////////////////////////////////////////////////////////
43 template< typename Iterator >
44 struct range_const_iterator< std::pair<Iterator,Iterator> >
46 typedef Iterator type;
49 template< typename Iterator >
50 struct range_const_iterator< const std::pair<Iterator,Iterator> >
52 typedef Iterator type;
55 //////////////////////////////////////////////////////////////////////////
57 //////////////////////////////////////////////////////////////////////////
59 template< typename T, std::size_t sz >
60 struct range_const_iterator< T[sz] >
62 typedef const T* type;
65 template< typename T, std::size_t sz >
66 struct range_const_iterator< const T[sz] >
68 typedef const T* type;
71 //////////////////////////////////////////////////////////////////////////
73 //////////////////////////////////////////////////////////////////////////
76 struct range_const_iterator< char* >
78 typedef const char* type;
82 struct range_const_iterator< wchar_t* >
84 typedef const wchar_t* type;
88 struct range_const_iterator< const char* >
90 typedef const char* type;
94 struct range_const_iterator< const wchar_t* >
96 typedef const wchar_t* type;
100 struct range_const_iterator< char* const >
102 typedef const char* type;
106 struct range_const_iterator< wchar_t* const >
108 typedef const wchar_t* type;
112 struct range_const_iterator< const char* const >
114 typedef const char* type;
118 struct range_const_iterator< const wchar_t* const >
120 typedef const wchar_t* type;
125 #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION