]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /*============================================================================= |
2 | Copyright (c) 2007 Tobias Schwinger | |
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_REPETITIVE_VIEW_END_IMPL_HPP_INCLUDED) | |
9 | #define BOOST_FUSION_REPETITIVE_VIEW_END_IMPL_HPP_INCLUDED | |
10 | ||
11 | #include <boost/fusion/support/config.hpp> | |
12 | #include <boost/fusion/sequence/intrinsic/end.hpp> | |
13 | #include <boost/fusion/view/repetitive_view/repetitive_view_fwd.hpp> | |
14 | ||
15 | namespace boost { namespace fusion | |
16 | { | |
17 | struct repetitive_view_tag; | |
18 | ||
19 | template <typename Sequence, typename Pos> | |
20 | struct repetitive_view_iterator; | |
21 | ||
22 | namespace extension | |
23 | { | |
24 | template<typename Tag> | |
25 | struct end_impl; | |
26 | ||
27 | template<> | |
28 | struct end_impl<repetitive_view_tag> | |
29 | { | |
30 | template<typename View> | |
31 | struct apply | |
32 | { | |
33 | typedef typename View::sequence_type sequence_type; | |
34 | ||
35 | typedef repetitive_view_iterator<sequence_type, | |
36 | typename result_of::end<sequence_type>::type > type; | |
37 | ||
38 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED | |
39 | static type call(View const& v) | |
40 | { | |
41 | return type(v.seq,end(v.seq)); | |
42 | } | |
43 | }; | |
44 | }; | |
45 | ||
46 | } | |
47 | ||
48 | }} | |
49 | ||
50 | #endif | |
51 |