]>
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(BOOST_FUSION_END_IMPL_09242011_1744) | |
8 | #define BOOST_FUSION_END_IMPL_09242011_1744 | |
9 | ||
10 | #include <boost/fusion/support/config.hpp> | |
11 | #include <boost/fusion/adapted/std_tuple/std_tuple_iterator.hpp> | |
12 | #include <boost/type_traits/remove_const.hpp> | |
13 | #include <tuple> | |
14 | ||
15 | namespace boost { namespace fusion | |
16 | { | |
17 | struct std_tuple_tag; | |
18 | ||
19 | namespace extension | |
20 | { | |
21 | template<typename T> | |
22 | struct end_impl; | |
23 | ||
24 | template <> | |
25 | struct end_impl<std_tuple_tag> | |
26 | { | |
27 | template <typename Sequence> | |
28 | struct apply | |
29 | { | |
30 | typedef typename remove_const<Sequence>::type seq_type; | |
31 | static int const size = std::tuple_size<seq_type>::value; | |
32 | typedef std_tuple_iterator<Sequence, size> type; | |
33 | ||
34 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED | |
35 | static type | |
36 | call(Sequence& v) | |
37 | { | |
38 | return type(v); | |
39 | } | |
40 | }; | |
41 | }; | |
42 | } | |
43 | }} | |
44 | ||
45 | #endif |