]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
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_DEREF_IMPL_07202005_0851) | |
8 | #define FUSION_DEREF_IMPL_07202005_0851 | |
9 | ||
10 | #include <boost/fusion/support/config.hpp> | |
11 | #include <boost/fusion/iterator/deref.hpp> | |
12 | #include <boost/fusion/iterator/prior.hpp> | |
13 | ||
14 | namespace boost { namespace fusion | |
15 | { | |
16 | struct reverse_view_iterator_tag; | |
17 | ||
18 | namespace extension | |
19 | { | |
20 | template <typename Tag> | |
21 | struct deref_impl; | |
22 | ||
23 | template <> | |
24 | struct deref_impl<reverse_view_iterator_tag> | |
25 | { | |
26 | template <typename Iterator> | |
27 | struct apply | |
28 | { | |
29 | typedef typename | |
30 | result_of::deref< | |
31 | typename result_of::prior< | |
32 | typename Iterator::first_type | |
33 | >::type | |
34 | >::type | |
35 | type; | |
36 | ||
37 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED | |
38 | static type | |
39 | call(Iterator const& i) | |
40 | { | |
41 | return *fusion::prior(i.first); | |
42 | } | |
43 | }; | |
44 | }; | |
45 | } | |
46 | }} | |
47 | ||
48 | #endif | |
49 | ||
50 |