]> git.donarmstrong.com Git - rsem.git/blob - boost/fusion/view/iterator_range/iterator_range.hpp
Updated boost to v1.55.0
[rsem.git] / boost / fusion / view / iterator_range / iterator_range.hpp
1 /*=============================================================================
2     Copyright (c) 2001-2011 Joel de Guzman
3
4     Distributed under the Boost Software License, Version 1.0. (See accompanying
5     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 ==============================================================================*/
7 #if !defined(FUSION_ITERATOR_RANGE_05062005_1224)
8 #define FUSION_ITERATOR_RANGE_05062005_1224
9
10 #include <boost/fusion/support/detail/access.hpp>
11 #include <boost/fusion/support/sequence_base.hpp>
12 #include <boost/fusion/support/category_of.hpp>
13 #include <boost/fusion/iterator/distance.hpp>
14 #include <boost/fusion/iterator/mpl/convert_iterator.hpp>
15 #include <boost/fusion/view/iterator_range/detail/begin_impl.hpp>
16 #include <boost/fusion/view/iterator_range/detail/end_impl.hpp>
17 #include <boost/fusion/view/iterator_range/detail/at_impl.hpp>
18 #include <boost/fusion/view/iterator_range/detail/size_impl.hpp>
19 #include <boost/fusion/view/iterator_range/detail/value_at_impl.hpp>
20 #include <boost/fusion/view/iterator_range/detail/is_segmented_impl.hpp>
21 #include <boost/fusion/view/iterator_range/detail/segments_impl.hpp>
22 #include <boost/fusion/adapted/mpl/mpl_iterator.hpp>
23 #include <boost/config.hpp>
24
25 #if defined (BOOST_MSVC)
26 #  pragma warning(push)
27 #  pragma warning (disable: 4512) // assignment operator could not be generated.
28 #endif
29
30 namespace boost { namespace fusion
31 {
32     struct iterator_range_tag;
33     struct fusion_sequence_tag;
34
35     template <typename First, typename Last>
36     struct iterator_range : sequence_base<iterator_range<First, Last> >
37     {
38         typedef typename convert_iterator<First>::type begin_type;
39         typedef typename convert_iterator<Last>::type end_type;
40         typedef iterator_range_tag fusion_tag;
41         typedef fusion_sequence_tag tag; // this gets picked up by MPL
42         typedef mpl::true_ is_view;
43
44         typedef typename traits::category_of<begin_type>::type category;
45
46         iterator_range(First const& in_first, Last const& in_last)
47             : first(convert_iterator<First>::call(in_first))
48             , last(convert_iterator<Last>::call(in_last)) {}
49
50         begin_type first;
51         end_type last;
52     };
53 }}
54
55 #if defined (BOOST_MSVC)
56 #  pragma warning(pop)
57 #endif
58
59 #endif
60
61