Chris@16
|
1 /*=============================================================================
|
Chris@16
|
2 Copyright (c) 2001-2011 Joel de Guzman
|
Chris@16
|
3
|
Chris@16
|
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
|
Chris@16
|
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
6 ==============================================================================*/
|
Chris@16
|
7 #ifndef BOOST_PP_IS_ITERATING
|
Chris@16
|
8 #if !defined(FUSION_AS_SET_0932005_1341)
|
Chris@16
|
9 #define FUSION_AS_SET_0932005_1341
|
Chris@16
|
10
|
Chris@16
|
11 #include <boost/preprocessor/iterate.hpp>
|
Chris@16
|
12 #include <boost/preprocessor/repetition/enum_params.hpp>
|
Chris@16
|
13 #include <boost/preprocessor/repetition/enum_binary_params.hpp>
|
Chris@16
|
14 #include <boost/preprocessor/repetition/repeat.hpp>
|
Chris@16
|
15 #include <boost/preprocessor/cat.hpp>
|
Chris@16
|
16 #include <boost/preprocessor/inc.hpp>
|
Chris@16
|
17 #include <boost/preprocessor/dec.hpp>
|
Chris@16
|
18 #include <boost/fusion/container/set/set.hpp>
|
Chris@16
|
19 #include <boost/fusion/iterator/value_of.hpp>
|
Chris@16
|
20 #include <boost/fusion/iterator/deref.hpp>
|
Chris@16
|
21 #include <boost/fusion/iterator/next.hpp>
|
Chris@16
|
22
|
Chris@16
|
23 namespace boost { namespace fusion { namespace detail
|
Chris@16
|
24 {
|
Chris@101
|
25 BOOST_FUSION_BARRIER_BEGIN
|
Chris@101
|
26
|
Chris@16
|
27 template <int size>
|
Chris@16
|
28 struct as_set;
|
Chris@16
|
29
|
Chris@16
|
30 template <>
|
Chris@16
|
31 struct as_set<0>
|
Chris@16
|
32 {
|
Chris@16
|
33 template <typename Iterator>
|
Chris@16
|
34 struct apply
|
Chris@16
|
35 {
|
Chris@16
|
36 typedef set<> type;
|
Chris@16
|
37 };
|
Chris@16
|
38
|
Chris@16
|
39 template <typename Iterator>
|
Chris@101
|
40 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
Chris@16
|
41 static typename apply<Iterator>::type
|
Chris@16
|
42 call(Iterator)
|
Chris@16
|
43 {
|
Chris@16
|
44 return set<>();
|
Chris@16
|
45 }
|
Chris@16
|
46 };
|
Chris@101
|
47
|
Chris@101
|
48 BOOST_FUSION_BARRIER_END
|
Chris@16
|
49 }}}
|
Chris@16
|
50
|
Chris@16
|
51 #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
|
Chris@16
|
52 #include <boost/fusion/container/set/detail/preprocessed/as_set.hpp>
|
Chris@16
|
53 #else
|
Chris@16
|
54 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
Chris@16
|
55 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/as_set" FUSION_MAX_SET_SIZE_STR ".hpp")
|
Chris@16
|
56 #endif
|
Chris@16
|
57
|
Chris@16
|
58 /*=============================================================================
|
Chris@16
|
59 Copyright (c) 2001-2011 Joel de Guzman
|
Chris@16
|
60
|
Chris@16
|
61 Distributed under the Boost Software License, Version 1.0. (See accompanying
|
Chris@16
|
62 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
63
|
Chris@16
|
64 This is an auto-generated file. Do not edit!
|
Chris@16
|
65 ==============================================================================*/
|
Chris@16
|
66
|
Chris@16
|
67 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
Chris@16
|
68 #pragma wave option(preserve: 1)
|
Chris@16
|
69 #endif
|
Chris@16
|
70
|
Chris@16
|
71 namespace boost { namespace fusion { namespace detail
|
Chris@16
|
72 {
|
Chris@101
|
73 BOOST_FUSION_BARRIER_BEGIN
|
Chris@101
|
74
|
Chris@16
|
75 #define BOOST_FUSION_NEXT_ITERATOR(z, n, data) \
|
Chris@16
|
76 typedef typename fusion::result_of::next<BOOST_PP_CAT(I, n)>::type \
|
Chris@16
|
77 BOOST_PP_CAT(I, BOOST_PP_INC(n));
|
Chris@16
|
78
|
Chris@16
|
79 #define BOOST_FUSION_NEXT_CALL_ITERATOR(z, n, data) \
|
Chris@16
|
80 typename gen::BOOST_PP_CAT(I, BOOST_PP_INC(n)) \
|
Chris@16
|
81 BOOST_PP_CAT(i, BOOST_PP_INC(n)) = fusion::next(BOOST_PP_CAT(i, n));
|
Chris@16
|
82
|
Chris@16
|
83 #define BOOST_FUSION_VALUE_OF_ITERATOR(z, n, data) \
|
Chris@16
|
84 typedef typename fusion::result_of::value_of<BOOST_PP_CAT(I, n)>::type \
|
Chris@16
|
85 BOOST_PP_CAT(T, n);
|
Chris@16
|
86
|
Chris@16
|
87 #define BOOST_PP_FILENAME_1 <boost/fusion/container/set/detail/as_set.hpp>
|
Chris@16
|
88 #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_SET_SIZE)
|
Chris@16
|
89 #include BOOST_PP_ITERATE()
|
Chris@16
|
90
|
Chris@16
|
91 #undef BOOST_FUSION_NEXT_ITERATOR
|
Chris@16
|
92 #undef BOOST_FUSION_NEXT_CALL_ITERATOR
|
Chris@16
|
93 #undef BOOST_FUSION_VALUE_OF_ITERATOR
|
Chris@16
|
94
|
Chris@101
|
95 BOOST_FUSION_BARRIER_END
|
Chris@16
|
96 }}}
|
Chris@16
|
97
|
Chris@16
|
98 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
Chris@16
|
99 #pragma wave option(output: null)
|
Chris@16
|
100 #endif
|
Chris@16
|
101
|
Chris@16
|
102 #endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
|
Chris@16
|
103
|
Chris@16
|
104 #endif
|
Chris@16
|
105 #else // defined(BOOST_PP_IS_ITERATING)
|
Chris@16
|
106 ///////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
107 //
|
Chris@16
|
108 // Preprocessor vertical repetition code
|
Chris@16
|
109 //
|
Chris@16
|
110 ///////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
111
|
Chris@16
|
112 #define N BOOST_PP_ITERATION()
|
Chris@16
|
113
|
Chris@16
|
114 template <>
|
Chris@16
|
115 struct as_set<N>
|
Chris@16
|
116 {
|
Chris@16
|
117 template <typename I0>
|
Chris@16
|
118 struct apply
|
Chris@16
|
119 {
|
Chris@16
|
120 BOOST_PP_REPEAT(N, BOOST_FUSION_NEXT_ITERATOR, _)
|
Chris@16
|
121 BOOST_PP_REPEAT(N, BOOST_FUSION_VALUE_OF_ITERATOR, _)
|
Chris@16
|
122 typedef set<BOOST_PP_ENUM_PARAMS(N, T)> type;
|
Chris@16
|
123 };
|
Chris@16
|
124
|
Chris@16
|
125 template <typename Iterator>
|
Chris@101
|
126 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
Chris@16
|
127 static typename apply<Iterator>::type
|
Chris@16
|
128 call(Iterator const& i0)
|
Chris@16
|
129 {
|
Chris@16
|
130 typedef apply<Iterator> gen;
|
Chris@16
|
131 typedef typename gen::type result;
|
Chris@16
|
132 BOOST_PP_REPEAT(BOOST_PP_DEC(N), BOOST_FUSION_NEXT_CALL_ITERATOR, _)
|
Chris@16
|
133 return result(BOOST_PP_ENUM_PARAMS(N, *i));
|
Chris@16
|
134 }
|
Chris@16
|
135 };
|
Chris@16
|
136
|
Chris@16
|
137 #undef N
|
Chris@16
|
138 #endif // defined(BOOST_PP_IS_ITERATING)
|
Chris@16
|
139
|