Chris@101
|
1 #ifdef BOOST_MSVC
|
Chris@101
|
2 #pragma warning(push)
|
Chris@101
|
3 #pragma warning(disable: 4512) // assignment operator could not be generated
|
Chris@101
|
4 #pragma warning(disable: 4510) // default constructor could not be generated
|
Chris@101
|
5 #pragma warning(disable: 4610) // can never be instantiated - user defined constructor required
|
Chris@101
|
6 #endif
|
Chris@16
|
7 #if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
|
Chris@16
|
8
|
Chris@16
|
9 #ifndef BOOST_PHOENIX_SUPPORT_VECTOR_HPP
|
Chris@16
|
10 #define BOOST_PHOENIX_SUPPORT_VECTOR_HPP
|
Chris@16
|
11
|
Chris@16
|
12 #include <boost/phoenix/core/limits.hpp>
|
Chris@16
|
13 #include <boost/phoenix/support/iterate.hpp>
|
Chris@16
|
14 #include <boost/preprocessor/repetition/enum_shifted_params.hpp>
|
Chris@16
|
15 #include <boost/fusion/adapted/struct/adapt_struct.hpp>
|
Chris@16
|
16
|
Chris@16
|
17 #define BOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL BOOST_FUSION_ADAPT_TPL_STRUCT
|
Chris@16
|
18
|
Chris@16
|
19 #include <boost/phoenix/support/preprocessed/vector.hpp>
|
Chris@16
|
20
|
Chris@16
|
21 #endif
|
Chris@16
|
22
|
Chris@16
|
23 #else
|
Chris@16
|
24
|
Chris@16
|
25 #if !BOOST_PHOENIX_IS_ITERATING
|
Chris@16
|
26
|
Chris@16
|
27 #ifndef BOOST_PHOENIX_SUPPORT_VECTOR_HPP
|
Chris@16
|
28 #define BOOST_PHOENIX_SUPPORT_VECTOR_HPP
|
Chris@16
|
29
|
Chris@16
|
30 #include <boost/phoenix/core/limits.hpp>
|
Chris@16
|
31 #include <boost/phoenix/support/iterate.hpp>
|
Chris@16
|
32 #include <boost/preprocessor/repetition/enum_shifted_params.hpp>
|
Chris@16
|
33 #include <boost/fusion/adapted/struct/adapt_struct.hpp>
|
Chris@16
|
34
|
Chris@16
|
35 #define BOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL BOOST_FUSION_ADAPT_TPL_STRUCT
|
Chris@16
|
36
|
Chris@16
|
37 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
|
Chris@16
|
38 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/vector_" BOOST_PHOENIX_LIMIT_STR ".hpp")
|
Chris@16
|
39 #endif
|
Chris@16
|
40 /*==============================================================================
|
Chris@16
|
41 Copyright (c) 2005-2010 Joel de Guzman
|
Chris@16
|
42 Copyright (c) 2010 Thomas Heller
|
Chris@16
|
43
|
Chris@16
|
44 Distributed under the Boost Software License, Version 1.0. (See accompanying
|
Chris@16
|
45 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
46 ==============================================================================*/
|
Chris@16
|
47 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
|
Chris@16
|
48 #pragma wave option(preserve: 1)
|
Chris@16
|
49 #endif
|
Chris@16
|
50
|
Chris@16
|
51 #define M0(Z, N, D) \
|
Chris@16
|
52 typedef BOOST_PP_CAT(A, N) BOOST_PP_CAT(member_type, N); \
|
Chris@16
|
53 BOOST_PP_CAT(A, N) BOOST_PP_CAT(a, N); \
|
Chris@16
|
54 /**/
|
Chris@16
|
55 #define M1(Z, N, D) \
|
Chris@16
|
56 (BOOST_PP_CAT(A, N)) \
|
Chris@16
|
57 /**/
|
Chris@16
|
58 #define M2(Z, N, D) \
|
Chris@16
|
59 (BOOST_PP_CAT(T, N)) \
|
Chris@16
|
60 /**/
|
Chris@16
|
61 #define M3(Z, N, D) \
|
Chris@16
|
62 (BOOST_PP_CAT(A, N), BOOST_PP_CAT(a, N)) \
|
Chris@16
|
63 /**/
|
Chris@16
|
64
|
Chris@16
|
65 namespace boost { namespace phoenix
|
Chris@16
|
66 {
|
Chris@16
|
67 template <typename Dummy = void>
|
Chris@16
|
68 struct vector0
|
Chris@16
|
69 {
|
Chris@16
|
70 typedef mpl::int_<0> size_type;
|
Chris@16
|
71 static const int size_value = 0;
|
Chris@16
|
72 };
|
Chris@16
|
73 }}
|
Chris@16
|
74
|
Chris@16
|
75
|
Chris@16
|
76 #define BOOST_PHOENIX_ITERATION_PARAMS \
|
Chris@16
|
77 (3, (1, BOOST_PP_INC(BOOST_PHOENIX_LIMIT), \
|
Chris@16
|
78 <boost/phoenix/support/vector.hpp>))
|
Chris@16
|
79 #include BOOST_PHOENIX_ITERATE()
|
Chris@16
|
80
|
Chris@16
|
81 #undef M0
|
Chris@16
|
82 #undef M1
|
Chris@16
|
83 #undef M2
|
Chris@16
|
84 #undef M3
|
Chris@16
|
85
|
Chris@16
|
86 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
|
Chris@16
|
87 #pragma wave option(output: null)
|
Chris@16
|
88 #endif
|
Chris@16
|
89
|
Chris@16
|
90 #endif
|
Chris@16
|
91
|
Chris@16
|
92 #else
|
Chris@16
|
93
|
Chris@16
|
94 namespace boost { namespace phoenix
|
Chris@16
|
95 {
|
Chris@16
|
96 template <BOOST_PHOENIX_typename_A>
|
Chris@16
|
97 struct BOOST_PP_CAT(vector, BOOST_PHOENIX_ITERATION)
|
Chris@16
|
98 {
|
Chris@16
|
99 BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, M0, _)
|
Chris@16
|
100
|
Chris@16
|
101 typedef mpl::int_<BOOST_PHOENIX_ITERATION> size_type;
|
Chris@16
|
102 static const int size_value = BOOST_PHOENIX_ITERATION;
|
Chris@16
|
103
|
Chris@16
|
104 typedef
|
Chris@16
|
105 BOOST_PP_CAT(vector, BOOST_PP_DEC(BOOST_PHOENIX_ITERATION))<BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PHOENIX_ITERATION, A)>
|
Chris@16
|
106 args_type;
|
Chris@16
|
107
|
Chris@16
|
108 args_type args() const
|
Chris@16
|
109 {
|
Chris@16
|
110 args_type r = {BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PHOENIX_ITERATION, a)};
|
Chris@16
|
111 return r;
|
Chris@16
|
112 }
|
Chris@16
|
113 };
|
Chris@16
|
114 }}
|
Chris@16
|
115
|
Chris@16
|
116 #define BOOST_PHOENIX_SUPPORT_VECTOR_ADAT_PARAM0 \
|
Chris@16
|
117 BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, M1, _) \
|
Chris@16
|
118 /**/
|
Chris@16
|
119 #define BOOST_PHOENIX_SUPPORT_VECTOR_ADAT_PARAM1 \
|
Chris@16
|
120 ( \
|
Chris@16
|
121 BOOST_PP_CAT( \
|
Chris@16
|
122 boost::phoenix::vector \
|
Chris@16
|
123 , BOOST_PHOENIX_ITERATION \
|
Chris@16
|
124 ) \
|
Chris@16
|
125 ) \
|
Chris@16
|
126 BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, M1, _) \
|
Chris@16
|
127 /**/
|
Chris@16
|
128 #define BOOST_PHOENIX_SUPPORT_VECTOR_ADAT_PARAM2 \
|
Chris@16
|
129 BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, M3, _) \
|
Chris@16
|
130 /**/
|
Chris@16
|
131
|
Chris@16
|
132 BOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL(
|
Chris@16
|
133 BOOST_PHOENIX_SUPPORT_VECTOR_ADAT_PARAM0
|
Chris@16
|
134 , BOOST_PHOENIX_SUPPORT_VECTOR_ADAT_PARAM1
|
Chris@16
|
135 , BOOST_PHOENIX_SUPPORT_VECTOR_ADAT_PARAM2
|
Chris@16
|
136 )
|
Chris@16
|
137
|
Chris@16
|
138 #endif
|
Chris@16
|
139
|
Chris@16
|
140 #endif
|
Chris@101
|
141
|
Chris@101
|
142 #ifdef BOOST_MSVC
|
Chris@101
|
143 #pragma warning(pop)
|
Chris@101
|
144 #endif
|