fix doc example typo
[boost.git] / boost / range / iterator.hpp
blob21798c54de16557c54e8d710784c11cf98152119
1 // Boost.Range library
2 //
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)
7 //
8 // For more information, see http://www.boost.org/libs/range/
9 //
11 #ifndef BOOST_RANGE_ITERATOR_HPP
12 #define BOOST_RANGE_ITERATOR_HPP
14 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
15 # pragma once
16 #endif
18 #include <boost/range/config.hpp>
19 #include <boost/range/mutable_iterator.hpp>
20 #include <boost/range/const_iterator.hpp>
21 #include <boost/type_traits/is_const.hpp>
22 #include <boost/type_traits/remove_const.hpp>
23 #include <boost/mpl/eval_if.hpp>
25 namespace boost
28 #if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
30 namespace range_detail_vc7_1
32 template< typename C, typename Sig = void(C) >
33 struct range_iterator
35 typedef BOOST_RANGE_DEDUCED_TYPENAME
36 mpl::eval_if_c< is_const<C>::value,
37 range_const_iterator< typename remove_const<C>::type >,
38 range_mutable_iterator<C> >::type type;
39 };
41 template< typename C, typename T >
42 struct range_iterator< C, void(T[]) >
44 typedef T* type;
45 };
48 #endif
50 template< typename C >
51 struct range_iterator
53 #if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
55 typedef BOOST_RANGE_DEDUCED_TYPENAME
56 range_detail_vc7_1::range_iterator<C>::type type;
58 #else
60 typedef BOOST_RANGE_DEDUCED_TYPENAME
61 mpl::eval_if_c< is_const<C>::value,
62 range_const_iterator< typename remove_const<C>::type >,
63 range_mutable_iterator<C> >::type type;
65 #endif
68 } // namespace boost
70 //#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
72 #endif