]>
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_END_IMPL_05062005_0906) | |
8 | #define FUSION_END_IMPL_05062005_0906 | |
9 | ||
10 | namespace boost { namespace fusion | |
11 | { | |
12 | struct filter_view_tag; | |
13 | ||
14 | template <typename Category, typename First, typename Last, typename Pred> | |
15 | struct filter_iterator; | |
16 | ||
17 | namespace extension | |
18 | { | |
19 | template <typename Tag> | |
20 | struct end_impl; | |
21 | ||
22 | template <> | |
23 | struct end_impl<filter_view_tag> | |
24 | { | |
25 | template <typename Sequence> | |
26 | struct apply | |
27 | { | |
28 | typedef typename Sequence::last_type last_type; | |
29 | typedef typename Sequence::pred_type pred_type; | |
30 | typedef typename Sequence::category category; | |
31 | typedef filter_iterator<category,last_type, last_type, pred_type> type; | |
32 | ||
33 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED | |
34 | static type | |
35 | call(Sequence& s) | |
36 | { | |
37 | return type(s.last()); | |
38 | } | |
39 | }; | |
40 | }; | |
41 | } | |
42 | }} | |
43 | ||
44 | #endif | |
45 | ||
46 |