]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /*============================================================================= |
2 | Copyright (c) 2012-2014 Kohei Takahashi | |
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_CONVERT_IMPL_10172012_0940) | |
8 | #define BOOST_FUSION_CONVERT_IMPL_10172012_0940 | |
9 | ||
10 | #include <boost/fusion/support/config.hpp> | |
11 | #include <boost/fusion/adapted/std_tuple/detail/build_std_tuple.hpp> | |
12 | #include <boost/fusion/sequence/intrinsic/begin.hpp> | |
13 | #include <boost/fusion/sequence/intrinsic/end.hpp> | |
14 | ||
15 | namespace boost { namespace fusion | |
16 | { | |
17 | struct std_tuple_tag; | |
18 | ||
19 | namespace extension | |
20 | { | |
21 | template <typename T> | |
22 | struct convert_impl; | |
23 | ||
24 | template <> | |
25 | struct convert_impl<std_tuple_tag> | |
26 | { | |
27 | template <typename Sequence> | |
28 | struct apply | |
29 | { | |
30 | typedef detail::build_std_tuple< | |
31 | typename result_of::begin<Sequence>::type | |
32 | , typename result_of::end<Sequence>::type | |
33 | > gen; | |
34 | ||
35 | typedef typename gen::type type; | |
36 | ||
37 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED | |
38 | static type | |
39 | call(Sequence& seq) | |
40 | { | |
41 | return gen::call(begin(seq), end(seq)); | |
42 | } | |
43 | }; | |
44 | }; | |
45 | } | |
46 | }} | |
47 | ||
48 | #endif |