blob: 4c249438fe061c3216bc0e4039567ee04df7407d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_REVERSE_VIEW_ITERATOR_07202005_0835)
#define FUSION_REVERSE_VIEW_ITERATOR_07202005_0835
#include <boost/fusion/support/iterator_base.hpp>
#include <boost/fusion/support/category_of.hpp>
#include <boost/fusion/iterator/mpl/convert_iterator.hpp>
#include <boost/fusion/adapted/mpl/mpl_iterator.hpp>
#include <boost/fusion/view/reverse_view/detail/deref_impl.hpp>
#include <boost/fusion/view/reverse_view/detail/next_impl.hpp>
#include <boost/fusion/view/reverse_view/detail/prior_impl.hpp>
#include <boost/fusion/view/reverse_view/detail/advance_impl.hpp>
#include <boost/fusion/view/reverse_view/detail/distance_impl.hpp>
#include <boost/fusion/view/reverse_view/detail/value_of_impl.hpp>
#include <boost/fusion/view/reverse_view/detail/deref_data_impl.hpp>
#include <boost/fusion/view/reverse_view/detail/value_of_data_impl.hpp>
#include <boost/fusion/view/reverse_view/detail/key_of_impl.hpp>
#include <boost/type_traits/is_base_of.hpp>
#include <boost/static_assert.hpp>
namespace boost { namespace fusion
{
struct reverse_view_iterator_tag;
template <typename First>
struct reverse_view_iterator
: iterator_base<reverse_view_iterator<First> >
{
typedef convert_iterator<First> converter;
typedef typename converter::type first_type;
typedef reverse_view_iterator_tag fusion_tag;
typedef typename traits::category_of<first_type>::type category;
BOOST_STATIC_ASSERT((
is_base_of<
bidirectional_traversal_tag
, category>::value));
reverse_view_iterator(First const& in_first)
: first(converter::call(in_first)) {}
first_type first;
private:
// silence MSVC warning C4512: assignment operator could not be generated
reverse_view_iterator& operator= (reverse_view_iterator const&);
};
}}
#endif
|