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