PageRenderTime 67ms CodeModel.GetById 6ms app.highlight 55ms RepoModel.GetById 1ms app.codeStats 1ms

/Src/Dependencies/Boost/boost/proto/detail/preprocessed/make_expr_.hpp

http://hadesmem.googlecode.com/
C++ Header | 320 lines | 313 code | 0 blank | 7 comment | 0 complexity | 056a2e772ddc88587a203d23fcc21ed7 MD5 | raw file
  1    ///////////////////////////////////////////////////////////////////////////////
  2    /// \file make_expr_.hpp
  3    /// Contains definition of make_expr_\<\> class template.
  4    //
  5    //  Copyright 2008 Eric Niebler. Distributed under the Boost
  6    //  Software License, Version 1.0. (See accompanying file
  7    //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  8    template<
  9        typename Tag
 10      , typename Domain
 11        , typename A0 = void , typename A1 = void , typename A2 = void , typename A3 = void , typename A4 = void , typename A5 = void , typename A6 = void , typename A7 = void , typename A8 = void , typename A9 = void
 12      , typename _ = void
 13    >
 14    struct make_expr_
 15    {};
 16    template<typename Domain, typename A>
 17    struct make_expr_<tag::terminal, Domain, A
 18        , void , void , void , void , void , void , void , void , void , void>
 19    {
 20        typedef typename proto::detail::protoify<A, Domain>::result_type result_type;
 21        result_type operator()(typename add_reference<A>::type a) const
 22        {
 23            return proto::detail::protoify<A, Domain>()(a);
 24        }
 25    };
 26    template<typename A>
 27    struct make_expr_<tag::terminal, deduce_domain, A
 28        , void , void , void , void , void , void , void , void , void , void>
 29      : make_expr_<tag::terminal, default_domain, A>
 30    {};
 31    template<typename Tag, typename Domain , typename A0>
 32    struct make_expr_<Tag, Domain , A0
 33        , void , void , void , void , void , void , void , void , void, void>
 34    {
 35        typedef
 36            list1<
 37                typename boost::proto::detail::protoify< A0 , Domain >::result_type
 38            >
 39        proto_args;
 40        typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
 41        typedef typename Domain::proto_generator proto_generator;
 42        typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
 43        result_type operator()(typename add_reference<A0 >::type a0) const
 44        {
 45            expr_type const that = {
 46                boost::proto::detail::protoify< A0 , Domain >()(a0)
 47            };
 48            return proto_generator()(that);
 49        }
 50    };
 51    template<typename Tag , typename A0>
 52    struct make_expr_<Tag, deduce_domain , A0
 53        , void , void , void , void , void , void , void , void , void, void>
 54      : make_expr_<
 55            Tag
 56          , typename deduce_domain1<A0>::type
 57            , A0
 58        >
 59    {};
 60    template<typename Tag, typename Domain , typename A0 , typename A1>
 61    struct make_expr_<Tag, Domain , A0 , A1
 62        , void , void , void , void , void , void , void , void, void>
 63    {
 64        typedef
 65            list2<
 66                typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type
 67            >
 68        proto_args;
 69        typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
 70        typedef typename Domain::proto_generator proto_generator;
 71        typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
 72        result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1) const
 73        {
 74            expr_type const that = {
 75                boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1)
 76            };
 77            return proto_generator()(that);
 78        }
 79    };
 80    template<typename Tag , typename A0 , typename A1>
 81    struct make_expr_<Tag, deduce_domain , A0 , A1
 82        , void , void , void , void , void , void , void , void, void>
 83      : make_expr_<
 84            Tag
 85          , typename deduce_domain2<A0 , A1>::type
 86            , A0 , A1
 87        >
 88    {};
 89    template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2>
 90    struct make_expr_<Tag, Domain , A0 , A1 , A2
 91        , void , void , void , void , void , void , void, void>
 92    {
 93        typedef
 94            list3<
 95                typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type
 96            >
 97        proto_args;
 98        typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
 99        typedef typename Domain::proto_generator proto_generator;
100        typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
101        result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2) const
102        {
103            expr_type const that = {
104                boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2)
105            };
106            return proto_generator()(that);
107        }
108    };
109    template<typename Tag , typename A0 , typename A1 , typename A2>
110    struct make_expr_<Tag, deduce_domain , A0 , A1 , A2
111        , void , void , void , void , void , void , void, void>
112      : make_expr_<
113            Tag
114          , typename deduce_domain3<A0 , A1 , A2>::type
115            , A0 , A1 , A2
116        >
117    {};
118    template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2 , typename A3>
119    struct make_expr_<Tag, Domain , A0 , A1 , A2 , A3
120        , void , void , void , void , void , void, void>
121    {
122        typedef
123            list4<
124                typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type , typename boost::proto::detail::protoify< A3 , Domain >::result_type
125            >
126        proto_args;
127        typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
128        typedef typename Domain::proto_generator proto_generator;
129        typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
130        result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2 , typename add_reference<A3 >::type a3) const
131        {
132            expr_type const that = {
133                boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2) , boost::proto::detail::protoify< A3 , Domain >()(a3)
134            };
135            return proto_generator()(that);
136        }
137    };
138    template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3>
139    struct make_expr_<Tag, deduce_domain , A0 , A1 , A2 , A3
140        , void , void , void , void , void , void, void>
141      : make_expr_<
142            Tag
143          , typename deduce_domain4<A0 , A1 , A2 , A3>::type
144            , A0 , A1 , A2 , A3
145        >
146    {};
147    template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
148    struct make_expr_<Tag, Domain , A0 , A1 , A2 , A3 , A4
149        , void , void , void , void , void, void>
150    {
151        typedef
152            list5<
153                typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type , typename boost::proto::detail::protoify< A3 , Domain >::result_type , typename boost::proto::detail::protoify< A4 , Domain >::result_type
154            >
155        proto_args;
156        typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
157        typedef typename Domain::proto_generator proto_generator;
158        typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
159        result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2 , typename add_reference<A3 >::type a3 , typename add_reference<A4 >::type a4) const
160        {
161            expr_type const that = {
162                boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2) , boost::proto::detail::protoify< A3 , Domain >()(a3) , boost::proto::detail::protoify< A4 , Domain >()(a4)
163            };
164            return proto_generator()(that);
165        }
166    };
167    template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
168    struct make_expr_<Tag, deduce_domain , A0 , A1 , A2 , A3 , A4
169        , void , void , void , void , void, void>
170      : make_expr_<
171            Tag
172          , typename deduce_domain5<A0 , A1 , A2 , A3 , A4>::type
173            , A0 , A1 , A2 , A3 , A4
174        >
175    {};
176    template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
177    struct make_expr_<Tag, Domain , A0 , A1 , A2 , A3 , A4 , A5
178        , void , void , void , void, void>
179    {
180        typedef
181            list6<
182                typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type , typename boost::proto::detail::protoify< A3 , Domain >::result_type , typename boost::proto::detail::protoify< A4 , Domain >::result_type , typename boost::proto::detail::protoify< A5 , Domain >::result_type
183            >
184        proto_args;
185        typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
186        typedef typename Domain::proto_generator proto_generator;
187        typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
188        result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2 , typename add_reference<A3 >::type a3 , typename add_reference<A4 >::type a4 , typename add_reference<A5 >::type a5) const
189        {
190            expr_type const that = {
191                boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2) , boost::proto::detail::protoify< A3 , Domain >()(a3) , boost::proto::detail::protoify< A4 , Domain >()(a4) , boost::proto::detail::protoify< A5 , Domain >()(a5)
192            };
193            return proto_generator()(that);
194        }
195    };
196    template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
197    struct make_expr_<Tag, deduce_domain , A0 , A1 , A2 , A3 , A4 , A5
198        , void , void , void , void, void>
199      : make_expr_<
200            Tag
201          , typename deduce_domain6<A0 , A1 , A2 , A3 , A4 , A5>::type
202            , A0 , A1 , A2 , A3 , A4 , A5
203        >
204    {};
205    template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
206    struct make_expr_<Tag, Domain , A0 , A1 , A2 , A3 , A4 , A5 , A6
207        , void , void , void, void>
208    {
209        typedef
210            list7<
211                typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type , typename boost::proto::detail::protoify< A3 , Domain >::result_type , typename boost::proto::detail::protoify< A4 , Domain >::result_type , typename boost::proto::detail::protoify< A5 , Domain >::result_type , typename boost::proto::detail::protoify< A6 , Domain >::result_type
212            >
213        proto_args;
214        typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
215        typedef typename Domain::proto_generator proto_generator;
216        typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
217        result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2 , typename add_reference<A3 >::type a3 , typename add_reference<A4 >::type a4 , typename add_reference<A5 >::type a5 , typename add_reference<A6 >::type a6) const
218        {
219            expr_type const that = {
220                boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2) , boost::proto::detail::protoify< A3 , Domain >()(a3) , boost::proto::detail::protoify< A4 , Domain >()(a4) , boost::proto::detail::protoify< A5 , Domain >()(a5) , boost::proto::detail::protoify< A6 , Domain >()(a6)
221            };
222            return proto_generator()(that);
223        }
224    };
225    template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
226    struct make_expr_<Tag, deduce_domain , A0 , A1 , A2 , A3 , A4 , A5 , A6
227        , void , void , void, void>
228      : make_expr_<
229            Tag
230          , typename deduce_domain7<A0 , A1 , A2 , A3 , A4 , A5 , A6>::type
231            , A0 , A1 , A2 , A3 , A4 , A5 , A6
232        >
233    {};
234    template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
235    struct make_expr_<Tag, Domain , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
236        , void , void, void>
237    {
238        typedef
239            list8<
240                typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type , typename boost::proto::detail::protoify< A3 , Domain >::result_type , typename boost::proto::detail::protoify< A4 , Domain >::result_type , typename boost::proto::detail::protoify< A5 , Domain >::result_type , typename boost::proto::detail::protoify< A6 , Domain >::result_type , typename boost::proto::detail::protoify< A7 , Domain >::result_type
241            >
242        proto_args;
243        typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
244        typedef typename Domain::proto_generator proto_generator;
245        typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
246        result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2 , typename add_reference<A3 >::type a3 , typename add_reference<A4 >::type a4 , typename add_reference<A5 >::type a5 , typename add_reference<A6 >::type a6 , typename add_reference<A7 >::type a7) const
247        {
248            expr_type const that = {
249                boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2) , boost::proto::detail::protoify< A3 , Domain >()(a3) , boost::proto::detail::protoify< A4 , Domain >()(a4) , boost::proto::detail::protoify< A5 , Domain >()(a5) , boost::proto::detail::protoify< A6 , Domain >()(a6) , boost::proto::detail::protoify< A7 , Domain >()(a7)
250            };
251            return proto_generator()(that);
252        }
253    };
254    template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
255    struct make_expr_<Tag, deduce_domain , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
256        , void , void, void>
257      : make_expr_<
258            Tag
259          , typename deduce_domain8<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7>::type
260            , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
261        >
262    {};
263    template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
264    struct make_expr_<Tag, Domain , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
265        , void, void>
266    {
267        typedef
268            list9<
269                typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type , typename boost::proto::detail::protoify< A3 , Domain >::result_type , typename boost::proto::detail::protoify< A4 , Domain >::result_type , typename boost::proto::detail::protoify< A5 , Domain >::result_type , typename boost::proto::detail::protoify< A6 , Domain >::result_type , typename boost::proto::detail::protoify< A7 , Domain >::result_type , typename boost::proto::detail::protoify< A8 , Domain >::result_type
270            >
271        proto_args;
272        typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
273        typedef typename Domain::proto_generator proto_generator;
274        typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
275        result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2 , typename add_reference<A3 >::type a3 , typename add_reference<A4 >::type a4 , typename add_reference<A5 >::type a5 , typename add_reference<A6 >::type a6 , typename add_reference<A7 >::type a7 , typename add_reference<A8 >::type a8) const
276        {
277            expr_type const that = {
278                boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2) , boost::proto::detail::protoify< A3 , Domain >()(a3) , boost::proto::detail::protoify< A4 , Domain >()(a4) , boost::proto::detail::protoify< A5 , Domain >()(a5) , boost::proto::detail::protoify< A6 , Domain >()(a6) , boost::proto::detail::protoify< A7 , Domain >()(a7) , boost::proto::detail::protoify< A8 , Domain >()(a8)
279            };
280            return proto_generator()(that);
281        }
282    };
283    template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
284    struct make_expr_<Tag, deduce_domain , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
285        , void, void>
286      : make_expr_<
287            Tag
288          , typename deduce_domain9<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8>::type
289            , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
290        >
291    {};
292    template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
293    struct make_expr_<Tag, Domain , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9
294        , void>
295    {
296        typedef
297            list10<
298                typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type , typename boost::proto::detail::protoify< A3 , Domain >::result_type , typename boost::proto::detail::protoify< A4 , Domain >::result_type , typename boost::proto::detail::protoify< A5 , Domain >::result_type , typename boost::proto::detail::protoify< A6 , Domain >::result_type , typename boost::proto::detail::protoify< A7 , Domain >::result_type , typename boost::proto::detail::protoify< A8 , Domain >::result_type , typename boost::proto::detail::protoify< A9 , Domain >::result_type
299            >
300        proto_args;
301        typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
302        typedef typename Domain::proto_generator proto_generator;
303        typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
304        result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2 , typename add_reference<A3 >::type a3 , typename add_reference<A4 >::type a4 , typename add_reference<A5 >::type a5 , typename add_reference<A6 >::type a6 , typename add_reference<A7 >::type a7 , typename add_reference<A8 >::type a8 , typename add_reference<A9 >::type a9) const
305        {
306            expr_type const that = {
307                boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2) , boost::proto::detail::protoify< A3 , Domain >()(a3) , boost::proto::detail::protoify< A4 , Domain >()(a4) , boost::proto::detail::protoify< A5 , Domain >()(a5) , boost::proto::detail::protoify< A6 , Domain >()(a6) , boost::proto::detail::protoify< A7 , Domain >()(a7) , boost::proto::detail::protoify< A8 , Domain >()(a8) , boost::proto::detail::protoify< A9 , Domain >()(a9)
308            };
309            return proto_generator()(that);
310        }
311    };
312    template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
313    struct make_expr_<Tag, deduce_domain , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9
314        , void>
315      : make_expr_<
316            Tag
317          , typename deduce_domain10<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9>::type
318            , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9
319        >
320    {};