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_MUTABLE_ITERATOR_HPP
12 #define BOOST_RANGE_MUTABLE_ITERATOR_HPP
18 #include <boost/range/config.hpp>
20 #include <boost/range/range_fwd.hpp>
21 #include <boost/range/detail/extract_optional_type.hpp>
22 #include <boost/type_traits/remove_reference.hpp>
23 #include <boost/iterator/iterator_traits.hpp>
30 //////////////////////////////////////////////////////////////////////////
32 //////////////////////////////////////////////////////////////////////////
34 namespace range_detail
37 BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( iterator )
39 template< typename C >
40 struct range_mutable_iterator
41 : range_detail::extract_iterator<
42 BOOST_DEDUCED_TYPENAME remove_reference<C>::type>
45 //////////////////////////////////////////////////////////////////////////
47 //////////////////////////////////////////////////////////////////////////
49 template< typename Iterator >
50 struct range_mutable_iterator< std::pair<Iterator,Iterator> >
52 typedef Iterator type;
55 //////////////////////////////////////////////////////////////////////////
57 //////////////////////////////////////////////////////////////////////////
59 template< typename T, std::size_t sz >
60 struct range_mutable_iterator< T[sz] >
65 } // namespace range_detail
67 template<typename C, typename Enabler=void>
68 struct range_mutable_iterator
69 : range_detail::range_mutable_iterator<
70 BOOST_DEDUCED_TYPENAME remove_reference<C>::type
77 #include <boost/range/detail/msvc_has_iterator_workaround.hpp>