]>
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(FUSION_CONVERT_IMPL_09232005_1341) | |
9 | #define FUSION_CONVERT_IMPL_09232005_1341 | |
10 | ||
11 | #include <boost/fusion/support/config.hpp> | |
12 | #include <boost/fusion/container/set/detail/as_set.hpp> | |
13 | #include <boost/fusion/container/set/set.hpp> | |
14 | #include <boost/fusion/sequence/intrinsic/begin.hpp> | |
15 | #include <boost/fusion/sequence/intrinsic/size.hpp> | |
16 | ||
17 | namespace boost { namespace fusion | |
18 | { | |
19 | struct set_tag; | |
20 | ||
21 | namespace extension | |
22 | { | |
23 | template <typename T> | |
24 | struct convert_impl; | |
25 | ||
26 | template <> | |
27 | struct convert_impl<set_tag> | |
28 | { | |
29 | template <typename Sequence> | |
30 | struct apply | |
31 | { | |
32 | typedef detail::as_set<result_of::size<Sequence>::value> gen; | |
33 | typedef typename gen:: | |
34 | template apply<typename result_of::begin<Sequence>::type>::type | |
35 | type; | |
36 | ||
37 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED | |
38 | static type call(Sequence& seq) | |
39 | { | |
40 | return gen::call(fusion::begin(seq)); | |
41 | } | |
42 | }; | |
43 | }; | |
44 | } | |
45 | }} | |
46 | ||
47 | #endif |