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_MAKE_VECTOR_07162005_0243)
|
Chris@16
|
9 #define FUSION_MAKE_VECTOR_07162005_0243
|
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/enum_params_with_a_default.hpp>
|
Chris@16
|
15 #include <boost/preprocessor/repetition/repeat_from_to.hpp>
|
Chris@16
|
16 #include <boost/fusion/container/vector/vector.hpp>
|
Chris@16
|
17 #include <boost/fusion/support/detail/as_fusion_element.hpp>
|
Chris@16
|
18
|
Chris@16
|
19 #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
|
Chris@16
|
20 #include <boost/fusion/container/generation/detail/preprocessed/make_vector.hpp>
|
Chris@16
|
21 #else
|
Chris@16
|
22 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
Chris@16
|
23 #pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/make_vector" FUSION_MAX_VECTOR_SIZE_STR".hpp")
|
Chris@16
|
24 #endif
|
Chris@16
|
25
|
Chris@16
|
26 /*=============================================================================
|
Chris@16
|
27 Copyright (c) 2001-2011 Joel de Guzman
|
Chris@16
|
28
|
Chris@16
|
29 Distributed under the Boost Software License, Version 1.0. (See accompanying
|
Chris@16
|
30 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
31
|
Chris@16
|
32 This is an auto-generated file. Do not edit!
|
Chris@16
|
33 ==============================================================================*/
|
Chris@16
|
34
|
Chris@16
|
35 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
Chris@16
|
36 #pragma wave option(preserve: 1)
|
Chris@16
|
37 #endif
|
Chris@16
|
38
|
Chris@16
|
39 namespace boost { namespace fusion
|
Chris@16
|
40 {
|
Chris@16
|
41 struct void_;
|
Chris@16
|
42
|
Chris@16
|
43 namespace result_of
|
Chris@16
|
44 {
|
Chris@16
|
45 template <
|
Chris@16
|
46 BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
|
Chris@16
|
47 FUSION_MAX_VECTOR_SIZE, typename T, void_)
|
Chris@16
|
48 , typename Extra = void_
|
Chris@16
|
49 >
|
Chris@16
|
50 struct make_vector;
|
Chris@16
|
51
|
Chris@16
|
52 template <>
|
Chris@16
|
53 struct make_vector<>
|
Chris@16
|
54 {
|
Chris@16
|
55 typedef vector0<> type;
|
Chris@16
|
56 };
|
Chris@16
|
57 }
|
Chris@16
|
58
|
Chris@101
|
59 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
Chris@16
|
60 inline vector0<>
|
Chris@16
|
61 make_vector()
|
Chris@16
|
62 {
|
Chris@16
|
63 return vector0<>();
|
Chris@16
|
64 }
|
Chris@16
|
65
|
Chris@16
|
66 #define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \
|
Chris@16
|
67 typename detail::as_fusion_element<BOOST_PP_CAT(T, n)>::type
|
Chris@16
|
68
|
Chris@16
|
69 #define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/make_vector.hpp>
|
Chris@16
|
70 #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE)
|
Chris@16
|
71 #include BOOST_PP_ITERATE()
|
Chris@16
|
72
|
Chris@16
|
73 #undef BOOST_FUSION_AS_FUSION_ELEMENT
|
Chris@16
|
74
|
Chris@16
|
75 }}
|
Chris@16
|
76
|
Chris@16
|
77 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
Chris@16
|
78 #pragma wave option(output: null)
|
Chris@16
|
79 #endif
|
Chris@16
|
80
|
Chris@16
|
81 #endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
|
Chris@16
|
82
|
Chris@16
|
83 #endif
|
Chris@16
|
84 #else // defined(BOOST_PP_IS_ITERATING)
|
Chris@16
|
85 ///////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
86 //
|
Chris@16
|
87 // Preprocessor vertical repetition code
|
Chris@16
|
88 //
|
Chris@16
|
89 ///////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
90
|
Chris@16
|
91 #define N BOOST_PP_ITERATION()
|
Chris@16
|
92
|
Chris@16
|
93 namespace result_of
|
Chris@16
|
94 {
|
Chris@16
|
95 template <BOOST_PP_ENUM_PARAMS(N, typename T)>
|
Chris@16
|
96 #define TEXT(z, n, text) , text
|
Chris@16
|
97 struct make_vector< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_VECTOR_SIZE, TEXT, void_) >
|
Chris@16
|
98 #undef TEXT
|
Chris@16
|
99 {
|
Chris@16
|
100 typedef BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> type;
|
Chris@16
|
101 };
|
Chris@16
|
102 }
|
Chris@16
|
103
|
Chris@16
|
104 template <BOOST_PP_ENUM_PARAMS(N, typename T)>
|
Chris@101
|
105 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
Chris@16
|
106 inline BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>
|
Chris@101
|
107 make_vector(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& arg))
|
Chris@16
|
108 {
|
Chris@16
|
109 return BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>(
|
Chris@101
|
110 BOOST_PP_ENUM_PARAMS(N, arg));
|
Chris@16
|
111 }
|
Chris@16
|
112
|
Chris@16
|
113 #undef N
|
Chris@16
|
114 #endif // defined(BOOST_PP_IS_ITERATING)
|
Chris@16
|
115
|