]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /*============================================================================= |
2 | Copyright (c) 2001-2011 Joel de Guzman | |
3 | Copyright (c) 2005-2006 Dan Marsden | |
4 | ||
5 | Distributed under the Boost Software License, Version 1.0. (See accompanying | |
6 | file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
7 | ==============================================================================*/ | |
8 | #if !defined(BOOST_FUSION_BEGIN_IMPL_31122005_1209) | |
9 | #define BOOST_FUSION_BEGIN_IMPL_31122005_1209 | |
10 | ||
11 | #include <boost/fusion/support/config.hpp> | |
12 | #include <boost/fusion/adapted/mpl/mpl_iterator.hpp> | |
13 | #include <boost/mpl/begin.hpp> | |
14 | #include <boost/type_traits/remove_const.hpp> | |
15 | ||
16 | namespace boost { namespace fusion { | |
17 | ||
18 | struct mpl_sequence_tag; | |
19 | ||
20 | namespace extension | |
21 | { | |
22 | template <typename Tag> | |
23 | struct begin_impl; | |
24 | ||
25 | template <> | |
26 | struct begin_impl<mpl_sequence_tag> | |
27 | { | |
28 | template <typename Sequence> | |
29 | struct apply | |
30 | { | |
31 | typedef typename mpl::begin< | |
32 | typename remove_const<Sequence>::type | |
33 | >::type iterator; | |
34 | typedef mpl_iterator<iterator> type; | |
35 | ||
36 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED | |
37 | static type | |
38 | call(Sequence) | |
39 | { | |
40 | return type(); | |
41 | } | |
42 | }; | |
43 | }; | |
44 | } | |
45 | }} | |
46 | ||
47 | #endif |