Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:59:20

0001 // Boost.Range library
0002 //
0003 //  Copyright Thorsten Ottosen 2003-2004. Use, modification and
0004 //  distribution is subject to the Boost Software License, Version
0005 //  1.0. (See accompanying file LICENSE_1_0.txt or copy at
0006 //  http://www.boost.org/LICENSE_1_0.txt)
0007 //
0008 // For more information, see http://www.boost.org/libs/range/
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     // default
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 // pair
0047 //////////////////////////////////////////////////////////////////////////
0048 
0049 template< typename Iterator >
0050 struct range_mutable_iterator< std::pair<Iterator,Iterator> >
0051 {
0052     typedef Iterator type;
0053 };
0054 
0055 //////////////////////////////////////////////////////////////////////////
0056 // array
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     } // namespace range_detail
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 } // namespace boost
0076 
0077 #include <boost/range/detail/msvc_has_iterator_workaround.hpp>
0078 
0079 #endif