File indexing completed on 2025-01-30 09:59:20
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_RANGE_MUTABLE_ITERATOR_HPP
0012 #define BOOST_RANGE_MUTABLE_ITERATOR_HPP
0013
0014 #if defined(_MSC_VER)
0015 # pragma once
0016 #endif
0017
0018 #include <boost/range/config.hpp>
0019
0020 #include <boost/range/range_fwd.hpp>
0021 #include <boost/range/detail/extract_optional_type.hpp>
0022 #include <boost/type_traits/remove_reference.hpp>
0023 #include <boost/iterator/iterator_traits.hpp>
0024 #include <cstddef>
0025 #include <utility>
0026
0027 namespace boost
0028 {
0029
0030
0031
0032
0033
0034 namespace range_detail
0035 {
0036
0037 BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( iterator )
0038
0039 template< typename C >
0040 struct range_mutable_iterator
0041 : range_detail::extract_iterator<
0042 BOOST_DEDUCED_TYPENAME remove_reference<C>::type>
0043 {};
0044
0045
0046
0047
0048
0049 template< typename Iterator >
0050 struct range_mutable_iterator< std::pair<Iterator,Iterator> >
0051 {
0052 typedef Iterator type;
0053 };
0054
0055
0056
0057
0058
0059 template< typename T, std::size_t sz >
0060 struct range_mutable_iterator< T[sz] >
0061 {
0062 typedef T* type;
0063 };
0064
0065 }
0066
0067 template<typename C, typename Enabler=void>
0068 struct range_mutable_iterator
0069 : range_detail::range_mutable_iterator<
0070 BOOST_DEDUCED_TYPENAME remove_reference<C>::type
0071 >
0072 {
0073 };
0074
0075 }
0076
0077 #include <boost/range/detail/msvc_has_iterator_workaround.hpp>
0078
0079 #endif