PageRenderTime 72ms CodeModel.GetById 2ms app.highlight 66ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://hadesmem.googlecode.com/
C++ Header | 467 lines | 460 code | 0 blank | 7 comment | 0 complexity | 0e93dfcffbe1c9e2f108e0181aa2c652 MD5 | raw file
  1    ///////////////////////////////////////////////////////////////////////////////
  2    /// \file generate_by_value.hpp
  3    /// Contains definition of by_value_generator_\<\> 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<typename Tag , typename Arg0 >
  9    struct by_value_generator_<
 10        proto::expr<Tag, list1<Arg0>, 1>
 11    >
 12    {
 13        typedef
 14            list1<Arg0>
 15        src_args;
 16        typedef
 17            list1<
 18                typename uncvref<Arg0 >::type
 19            >
 20        dst_args;
 21        typedef proto::expr<Tag, src_args, 1> src_type;
 22        typedef proto::expr<Tag, dst_args, 1> type;
 23        static type const call(src_type const &e)
 24        {
 25            type that = {
 26                e.child0
 27            };
 28            return that;
 29        }
 30    };
 31    template<typename Tag , typename Arg0 >
 32    struct by_value_generator_<
 33        proto::basic_expr<Tag, list1<Arg0>, 1>
 34    >
 35    {
 36        typedef
 37            list1<Arg0>
 38        src_args;
 39        typedef
 40            list1<
 41                typename uncvref<Arg0 >::type
 42            >
 43        dst_args;
 44        typedef proto::basic_expr<Tag, src_args, 1> src_type;
 45        typedef proto::basic_expr<Tag, dst_args, 1> type;
 46        static type const call(src_type const &e)
 47        {
 48            type that = {
 49                e.child0
 50            };
 51            return that;
 52        }
 53    };
 54    template<typename Tag , typename Arg0 , typename Arg1 >
 55    struct by_value_generator_<
 56        proto::expr<Tag, list2<Arg0 , Arg1>, 2>
 57    >
 58    {
 59        typedef
 60            list2<Arg0 , Arg1>
 61        src_args;
 62        typedef
 63            list2<
 64                typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type
 65            >
 66        dst_args;
 67        typedef proto::expr<Tag, src_args, 2> src_type;
 68        typedef proto::expr<Tag, dst_args, 2> type;
 69        static type const call(src_type const &e)
 70        {
 71            type that = {
 72                e.child0 , e.child1
 73            };
 74            return that;
 75        }
 76    };
 77    template<typename Tag , typename Arg0 , typename Arg1 >
 78    struct by_value_generator_<
 79        proto::basic_expr<Tag, list2<Arg0 , Arg1>, 2>
 80    >
 81    {
 82        typedef
 83            list2<Arg0 , Arg1>
 84        src_args;
 85        typedef
 86            list2<
 87                typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type
 88            >
 89        dst_args;
 90        typedef proto::basic_expr<Tag, src_args, 2> src_type;
 91        typedef proto::basic_expr<Tag, dst_args, 2> type;
 92        static type const call(src_type const &e)
 93        {
 94            type that = {
 95                e.child0 , e.child1
 96            };
 97            return that;
 98        }
 99    };
100    template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 >
101    struct by_value_generator_<
102        proto::expr<Tag, list3<Arg0 , Arg1 , Arg2>, 3>
103    >
104    {
105        typedef
106            list3<Arg0 , Arg1 , Arg2>
107        src_args;
108        typedef
109            list3<
110                typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type
111            >
112        dst_args;
113        typedef proto::expr<Tag, src_args, 3> src_type;
114        typedef proto::expr<Tag, dst_args, 3> type;
115        static type const call(src_type const &e)
116        {
117            type that = {
118                e.child0 , e.child1 , e.child2
119            };
120            return that;
121        }
122    };
123    template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 >
124    struct by_value_generator_<
125        proto::basic_expr<Tag, list3<Arg0 , Arg1 , Arg2>, 3>
126    >
127    {
128        typedef
129            list3<Arg0 , Arg1 , Arg2>
130        src_args;
131        typedef
132            list3<
133                typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type
134            >
135        dst_args;
136        typedef proto::basic_expr<Tag, src_args, 3> src_type;
137        typedef proto::basic_expr<Tag, dst_args, 3> type;
138        static type const call(src_type const &e)
139        {
140            type that = {
141                e.child0 , e.child1 , e.child2
142            };
143            return that;
144        }
145    };
146    template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 >
147    struct by_value_generator_<
148        proto::expr<Tag, list4<Arg0 , Arg1 , Arg2 , Arg3>, 4>
149    >
150    {
151        typedef
152            list4<Arg0 , Arg1 , Arg2 , Arg3>
153        src_args;
154        typedef
155            list4<
156                typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type , typename uncvref<Arg3 >::type
157            >
158        dst_args;
159        typedef proto::expr<Tag, src_args, 4> src_type;
160        typedef proto::expr<Tag, dst_args, 4> type;
161        static type const call(src_type const &e)
162        {
163            type that = {
164                e.child0 , e.child1 , e.child2 , e.child3
165            };
166            return that;
167        }
168    };
169    template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 >
170    struct by_value_generator_<
171        proto::basic_expr<Tag, list4<Arg0 , Arg1 , Arg2 , Arg3>, 4>
172    >
173    {
174        typedef
175            list4<Arg0 , Arg1 , Arg2 , Arg3>
176        src_args;
177        typedef
178            list4<
179                typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type , typename uncvref<Arg3 >::type
180            >
181        dst_args;
182        typedef proto::basic_expr<Tag, src_args, 4> src_type;
183        typedef proto::basic_expr<Tag, dst_args, 4> type;
184        static type const call(src_type const &e)
185        {
186            type that = {
187                e.child0 , e.child1 , e.child2 , e.child3
188            };
189            return that;
190        }
191    };
192    template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 >
193    struct by_value_generator_<
194        proto::expr<Tag, list5<Arg0 , Arg1 , Arg2 , Arg3 , Arg4>, 5>
195    >
196    {
197        typedef
198            list5<Arg0 , Arg1 , Arg2 , Arg3 , Arg4>
199        src_args;
200        typedef
201            list5<
202                typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type , typename uncvref<Arg3 >::type , typename uncvref<Arg4 >::type
203            >
204        dst_args;
205        typedef proto::expr<Tag, src_args, 5> src_type;
206        typedef proto::expr<Tag, dst_args, 5> type;
207        static type const call(src_type const &e)
208        {
209            type that = {
210                e.child0 , e.child1 , e.child2 , e.child3 , e.child4
211            };
212            return that;
213        }
214    };
215    template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 >
216    struct by_value_generator_<
217        proto::basic_expr<Tag, list5<Arg0 , Arg1 , Arg2 , Arg3 , Arg4>, 5>
218    >
219    {
220        typedef
221            list5<Arg0 , Arg1 , Arg2 , Arg3 , Arg4>
222        src_args;
223        typedef
224            list5<
225                typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type , typename uncvref<Arg3 >::type , typename uncvref<Arg4 >::type
226            >
227        dst_args;
228        typedef proto::basic_expr<Tag, src_args, 5> src_type;
229        typedef proto::basic_expr<Tag, dst_args, 5> type;
230        static type const call(src_type const &e)
231        {
232            type that = {
233                e.child0 , e.child1 , e.child2 , e.child3 , e.child4
234            };
235            return that;
236        }
237    };
238    template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 >
239    struct by_value_generator_<
240        proto::expr<Tag, list6<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5>, 6>
241    >
242    {
243        typedef
244            list6<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5>
245        src_args;
246        typedef
247            list6<
248                typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type , typename uncvref<Arg3 >::type , typename uncvref<Arg4 >::type , typename uncvref<Arg5 >::type
249            >
250        dst_args;
251        typedef proto::expr<Tag, src_args, 6> src_type;
252        typedef proto::expr<Tag, dst_args, 6> type;
253        static type const call(src_type const &e)
254        {
255            type that = {
256                e.child0 , e.child1 , e.child2 , e.child3 , e.child4 , e.child5
257            };
258            return that;
259        }
260    };
261    template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 >
262    struct by_value_generator_<
263        proto::basic_expr<Tag, list6<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5>, 6>
264    >
265    {
266        typedef
267            list6<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5>
268        src_args;
269        typedef
270            list6<
271                typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type , typename uncvref<Arg3 >::type , typename uncvref<Arg4 >::type , typename uncvref<Arg5 >::type
272            >
273        dst_args;
274        typedef proto::basic_expr<Tag, src_args, 6> src_type;
275        typedef proto::basic_expr<Tag, dst_args, 6> type;
276        static type const call(src_type const &e)
277        {
278            type that = {
279                e.child0 , e.child1 , e.child2 , e.child3 , e.child4 , e.child5
280            };
281            return that;
282        }
283    };
284    template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 >
285    struct by_value_generator_<
286        proto::expr<Tag, list7<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6>, 7>
287    >
288    {
289        typedef
290            list7<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6>
291        src_args;
292        typedef
293            list7<
294                typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type , typename uncvref<Arg3 >::type , typename uncvref<Arg4 >::type , typename uncvref<Arg5 >::type , typename uncvref<Arg6 >::type
295            >
296        dst_args;
297        typedef proto::expr<Tag, src_args, 7> src_type;
298        typedef proto::expr<Tag, dst_args, 7> type;
299        static type const call(src_type const &e)
300        {
301            type that = {
302                e.child0 , e.child1 , e.child2 , e.child3 , e.child4 , e.child5 , e.child6
303            };
304            return that;
305        }
306    };
307    template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 >
308    struct by_value_generator_<
309        proto::basic_expr<Tag, list7<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6>, 7>
310    >
311    {
312        typedef
313            list7<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6>
314        src_args;
315        typedef
316            list7<
317                typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type , typename uncvref<Arg3 >::type , typename uncvref<Arg4 >::type , typename uncvref<Arg5 >::type , typename uncvref<Arg6 >::type
318            >
319        dst_args;
320        typedef proto::basic_expr<Tag, src_args, 7> src_type;
321        typedef proto::basic_expr<Tag, dst_args, 7> type;
322        static type const call(src_type const &e)
323        {
324            type that = {
325                e.child0 , e.child1 , e.child2 , e.child3 , e.child4 , e.child5 , e.child6
326            };
327            return that;
328        }
329    };
330    template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 >
331    struct by_value_generator_<
332        proto::expr<Tag, list8<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7>, 8>
333    >
334    {
335        typedef
336            list8<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7>
337        src_args;
338        typedef
339            list8<
340                typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type , typename uncvref<Arg3 >::type , typename uncvref<Arg4 >::type , typename uncvref<Arg5 >::type , typename uncvref<Arg6 >::type , typename uncvref<Arg7 >::type
341            >
342        dst_args;
343        typedef proto::expr<Tag, src_args, 8> src_type;
344        typedef proto::expr<Tag, dst_args, 8> type;
345        static type const call(src_type const &e)
346        {
347            type that = {
348                e.child0 , e.child1 , e.child2 , e.child3 , e.child4 , e.child5 , e.child6 , e.child7
349            };
350            return that;
351        }
352    };
353    template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 >
354    struct by_value_generator_<
355        proto::basic_expr<Tag, list8<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7>, 8>
356    >
357    {
358        typedef
359            list8<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7>
360        src_args;
361        typedef
362            list8<
363                typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type , typename uncvref<Arg3 >::type , typename uncvref<Arg4 >::type , typename uncvref<Arg5 >::type , typename uncvref<Arg6 >::type , typename uncvref<Arg7 >::type
364            >
365        dst_args;
366        typedef proto::basic_expr<Tag, src_args, 8> src_type;
367        typedef proto::basic_expr<Tag, dst_args, 8> type;
368        static type const call(src_type const &e)
369        {
370            type that = {
371                e.child0 , e.child1 , e.child2 , e.child3 , e.child4 , e.child5 , e.child6 , e.child7
372            };
373            return that;
374        }
375    };
376    template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 >
377    struct by_value_generator_<
378        proto::expr<Tag, list9<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8>, 9>
379    >
380    {
381        typedef
382            list9<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8>
383        src_args;
384        typedef
385            list9<
386                typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type , typename uncvref<Arg3 >::type , typename uncvref<Arg4 >::type , typename uncvref<Arg5 >::type , typename uncvref<Arg6 >::type , typename uncvref<Arg7 >::type , typename uncvref<Arg8 >::type
387            >
388        dst_args;
389        typedef proto::expr<Tag, src_args, 9> src_type;
390        typedef proto::expr<Tag, dst_args, 9> type;
391        static type const call(src_type const &e)
392        {
393            type that = {
394                e.child0 , e.child1 , e.child2 , e.child3 , e.child4 , e.child5 , e.child6 , e.child7 , e.child8
395            };
396            return that;
397        }
398    };
399    template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 >
400    struct by_value_generator_<
401        proto::basic_expr<Tag, list9<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8>, 9>
402    >
403    {
404        typedef
405            list9<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8>
406        src_args;
407        typedef
408            list9<
409                typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type , typename uncvref<Arg3 >::type , typename uncvref<Arg4 >::type , typename uncvref<Arg5 >::type , typename uncvref<Arg6 >::type , typename uncvref<Arg7 >::type , typename uncvref<Arg8 >::type
410            >
411        dst_args;
412        typedef proto::basic_expr<Tag, src_args, 9> src_type;
413        typedef proto::basic_expr<Tag, dst_args, 9> type;
414        static type const call(src_type const &e)
415        {
416            type that = {
417                e.child0 , e.child1 , e.child2 , e.child3 , e.child4 , e.child5 , e.child6 , e.child7 , e.child8
418            };
419            return that;
420        }
421    };
422    template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 , typename Arg9 >
423    struct by_value_generator_<
424        proto::expr<Tag, list10<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8 , Arg9>, 10>
425    >
426    {
427        typedef
428            list10<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8 , Arg9>
429        src_args;
430        typedef
431            list10<
432                typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type , typename uncvref<Arg3 >::type , typename uncvref<Arg4 >::type , typename uncvref<Arg5 >::type , typename uncvref<Arg6 >::type , typename uncvref<Arg7 >::type , typename uncvref<Arg8 >::type , typename uncvref<Arg9 >::type
433            >
434        dst_args;
435        typedef proto::expr<Tag, src_args, 10> src_type;
436        typedef proto::expr<Tag, dst_args, 10> type;
437        static type const call(src_type const &e)
438        {
439            type that = {
440                e.child0 , e.child1 , e.child2 , e.child3 , e.child4 , e.child5 , e.child6 , e.child7 , e.child8 , e.child9
441            };
442            return that;
443        }
444    };
445    template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 , typename Arg9 >
446    struct by_value_generator_<
447        proto::basic_expr<Tag, list10<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8 , Arg9>, 10>
448    >
449    {
450        typedef
451            list10<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8 , Arg9>
452        src_args;
453        typedef
454            list10<
455                typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type , typename uncvref<Arg3 >::type , typename uncvref<Arg4 >::type , typename uncvref<Arg5 >::type , typename uncvref<Arg6 >::type , typename uncvref<Arg7 >::type , typename uncvref<Arg8 >::type , typename uncvref<Arg9 >::type
456            >
457        dst_args;
458        typedef proto::basic_expr<Tag, src_args, 10> src_type;
459        typedef proto::basic_expr<Tag, dst_args, 10> type;
460        static type const call(src_type const &e)
461        {
462            type that = {
463                e.child0 , e.child1 , e.child2 , e.child3 , e.child4 , e.child5 , e.child6 , e.child7 , e.child8 , e.child9
464            };
465            return that;
466        }
467    };