Project revived from Feb2017
[EroSomnia.git] / deps / boost_1_63_0 / boost / range / iterator.hpp
blob2956353ab5ab3a68223dcec8597aa39aa18ba7f4
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)
15 # pragma once
16 #endif
18 #include <boost/range/config.hpp>
19 #include <boost/range/range_fwd.hpp>
20 #include <boost/range/mutable_iterator.hpp>
21 #include <boost/range/const_iterator.hpp>
22 #include <boost/type_traits/is_const.hpp>
23 #include <boost/type_traits/remove_const.hpp>
24 #include <boost/mpl/eval_if.hpp>
26 namespace boost
29 #if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
31 namespace range_detail_vc7_1
33 template< typename C, typename Sig = void(C) >
34 struct range_iterator
36 typedef BOOST_RANGE_DEDUCED_TYPENAME
37 mpl::eval_if_c< is_const<C>::value,
38 range_const_iterator< typename remove_const<C>::type >,
39 range_mutable_iterator<C> >::type type;
40 };
42 template< typename C, typename T >
43 struct range_iterator< C, void(T[]) >
45 typedef T* type;
46 };
49 template< typename C, typename Enabler=void >
50 struct range_iterator
53 typedef BOOST_RANGE_DEDUCED_TYPENAME
54 range_detail_vc7_1::range_iterator<C>::type type;
58 #else
60 template< typename C, typename Enabler=void >
61 struct range_iterator
62 : mpl::if_c<
63 is_const<typename remove_reference<C>::type>::value,
64 range_const_iterator<typename remove_const<typename remove_reference<C>::type>::type>,
65 range_mutable_iterator<typename remove_reference<C>::type>
66 >::type
70 #endif
72 } // namespace boost
74 #endif