fix doc example typo
[boost.git] / boost / range / mutable_iterator.hpp
blob2f45c1627e3cf8431a1552138e2bc67d0a2a3a7d
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_MUTABLE_ITERATOR_HPP
12 #define BOOST_RANGE_MUTABLE_ITERATOR_HPP
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
15 # pragma once
16 #endif
18 #include <boost/range/config.hpp>
20 #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
21 #include <boost/range/detail/iterator.hpp>
22 #else
24 #include <boost/iterator/iterator_traits.hpp>
25 #include <cstddef>
26 #include <utility>
28 namespace boost
30 //////////////////////////////////////////////////////////////////////////
31 // default
32 //////////////////////////////////////////////////////////////////////////
34 template< typename C >
35 struct range_mutable_iterator
37 typedef BOOST_DEDUCED_TYPENAME C::iterator type;
40 //////////////////////////////////////////////////////////////////////////
41 // pair
42 //////////////////////////////////////////////////////////////////////////
44 template< typename Iterator >
45 struct range_mutable_iterator< std::pair<Iterator,Iterator> >
47 typedef Iterator type;
50 //////////////////////////////////////////////////////////////////////////
51 // array
52 //////////////////////////////////////////////////////////////////////////
54 template< typename T, std::size_t sz >
55 struct range_mutable_iterator< T[sz] >
57 typedef T* type;
60 } // namespace boost
62 #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
64 #endif