]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /*============================================================================= |
2 | Copyright (c) 2009 Hartmut Kaiser | |
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 | ||
8 | #if !defined(BOOST_FUSION_NVIEW_NEXT_IMPL_SEP_24_2009_0116PM) | |
9 | #define BOOST_FUSION_NVIEW_NEXT_IMPL_SEP_24_2009_0116PM | |
10 | ||
11 | #include <boost/fusion/support/config.hpp> | |
12 | #include <boost/fusion/iterator/next.hpp> | |
13 | ||
14 | namespace boost { namespace fusion | |
15 | { | |
16 | struct nview_iterator_tag; | |
17 | ||
18 | template <typename Sequence, typename Pos> | |
19 | struct nview_iterator; | |
20 | ||
21 | namespace extension | |
22 | { | |
23 | template <typename Tag> | |
24 | struct next_impl; | |
25 | ||
26 | template <> | |
27 | struct next_impl<nview_iterator_tag> | |
28 | { | |
29 | template <typename Iterator> | |
30 | struct apply | |
31 | { | |
32 | typedef typename Iterator::first_type first_type; | |
33 | typedef typename Iterator::sequence_type sequence_type; | |
34 | ||
35 | typedef nview_iterator<sequence_type, | |
36 | typename result_of::next<first_type>::type> type; | |
37 | ||
38 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED | |
39 | static type | |
40 | call(Iterator const& i) | |
41 | { | |
42 | return type(i.seq); | |
43 | } | |
44 | }; | |
45 | }; | |
46 | } | |
47 | ||
48 | }} | |
49 | ||
50 | #endif |