]> git.sesse.net Git - casparcg/blob - dependencies/boost/boost/proto/transform/detail/preprocessed/call.hpp
Manually merged pull request #222
[casparcg] / dependencies / boost / boost / proto / transform / detail / preprocessed / call.hpp
1     ///////////////////////////////////////////////////////////////////////////////
2     /// \file call.hpp
3     /// Contains definition of the call<> transform.
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     
9     
10     
11     template<typename Fun , typename A0 , typename A1 , typename A2 , typename A3>
12     struct call<Fun(A0 , A1 , A2 , A3)> : transform<call<Fun(A0 , A1 , A2 , A3)> >
13     {
14         template<typename Expr, typename State, typename Data>
15         struct impl : transform_impl<Expr, State, Data>
16         {
17             typedef typename when<_, A0>::template impl<Expr, State, Data> a0; typedef typename a0::result_type b0; typedef typename when<_, A1>::template impl<Expr, State, Data> a1; typedef typename a1::result_type b1; typedef typename when<_, A2>::template impl<Expr, State, Data> a2; typedef typename a2::result_type b2; typedef typename when<_, A3>::template impl<Expr, State, Data> a3; typedef typename a3::result_type b3;
18             typedef detail::poly_function_traits<Fun, Fun(b0 , b1 , b2 , b3)> function_traits;
19             typedef typename function_traits::result_type result_type;
20             
21             
22             
23             
24             
25             
26             
27             result_type operator ()(
28                 typename impl::expr_param e
29               , typename impl::state_param s
30               , typename impl::data_param d
31             ) const
32             {
33                 typedef typename function_traits::function_type function_type;
34                 return function_type()(detail::as_lvalue(a0()(e, s, d)) , detail::as_lvalue(a1()(e, s, d)) , detail::as_lvalue(a2()(e, s, d)) , detail::as_lvalue(a3()(e, s, d)));
35             }
36         };
37     };
38     
39     
40     
41     template<typename Fun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
42     struct call<Fun(A0 , A1 , A2 , A3 , A4)> : transform<call<Fun(A0 , A1 , A2 , A3 , A4)> >
43     {
44         template<typename Expr, typename State, typename Data>
45         struct impl : transform_impl<Expr, State, Data>
46         {
47             typedef typename when<_, A0>::template impl<Expr, State, Data> a0; typedef typename a0::result_type b0; typedef typename when<_, A1>::template impl<Expr, State, Data> a1; typedef typename a1::result_type b1; typedef typename when<_, A2>::template impl<Expr, State, Data> a2; typedef typename a2::result_type b2; typedef typename when<_, A3>::template impl<Expr, State, Data> a3; typedef typename a3::result_type b3; typedef typename when<_, A4>::template impl<Expr, State, Data> a4; typedef typename a4::result_type b4;
48             typedef detail::poly_function_traits<Fun, Fun(b0 , b1 , b2 , b3 , b4)> function_traits;
49             typedef typename function_traits::result_type result_type;
50             
51             
52             
53             
54             
55             
56             
57             result_type operator ()(
58                 typename impl::expr_param e
59               , typename impl::state_param s
60               , typename impl::data_param d
61             ) const
62             {
63                 typedef typename function_traits::function_type function_type;
64                 return function_type()(detail::as_lvalue(a0()(e, s, d)) , detail::as_lvalue(a1()(e, s, d)) , detail::as_lvalue(a2()(e, s, d)) , detail::as_lvalue(a3()(e, s, d)) , detail::as_lvalue(a4()(e, s, d)));
65             }
66         };
67     };
68     
69     
70     
71     template<typename Fun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
72     struct call<Fun(A0 , A1 , A2 , A3 , A4 , A5)> : transform<call<Fun(A0 , A1 , A2 , A3 , A4 , A5)> >
73     {
74         template<typename Expr, typename State, typename Data>
75         struct impl : transform_impl<Expr, State, Data>
76         {
77             typedef typename when<_, A0>::template impl<Expr, State, Data> a0; typedef typename a0::result_type b0; typedef typename when<_, A1>::template impl<Expr, State, Data> a1; typedef typename a1::result_type b1; typedef typename when<_, A2>::template impl<Expr, State, Data> a2; typedef typename a2::result_type b2; typedef typename when<_, A3>::template impl<Expr, State, Data> a3; typedef typename a3::result_type b3; typedef typename when<_, A4>::template impl<Expr, State, Data> a4; typedef typename a4::result_type b4; typedef typename when<_, A5>::template impl<Expr, State, Data> a5; typedef typename a5::result_type b5;
78             typedef detail::poly_function_traits<Fun, Fun(b0 , b1 , b2 , b3 , b4 , b5)> function_traits;
79             typedef typename function_traits::result_type result_type;
80             
81             
82             
83             
84             
85             
86             
87             result_type operator ()(
88                 typename impl::expr_param e
89               , typename impl::state_param s
90               , typename impl::data_param d
91             ) const
92             {
93                 typedef typename function_traits::function_type function_type;
94                 return function_type()(detail::as_lvalue(a0()(e, s, d)) , detail::as_lvalue(a1()(e, s, d)) , detail::as_lvalue(a2()(e, s, d)) , detail::as_lvalue(a3()(e, s, d)) , detail::as_lvalue(a4()(e, s, d)) , detail::as_lvalue(a5()(e, s, d)));
95             }
96         };
97     };
98     
99     
100     
101     template<typename Fun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
102     struct call<Fun(A0 , A1 , A2 , A3 , A4 , A5 , A6)> : transform<call<Fun(A0 , A1 , A2 , A3 , A4 , A5 , A6)> >
103     {
104         template<typename Expr, typename State, typename Data>
105         struct impl : transform_impl<Expr, State, Data>
106         {
107             typedef typename when<_, A0>::template impl<Expr, State, Data> a0; typedef typename a0::result_type b0; typedef typename when<_, A1>::template impl<Expr, State, Data> a1; typedef typename a1::result_type b1; typedef typename when<_, A2>::template impl<Expr, State, Data> a2; typedef typename a2::result_type b2; typedef typename when<_, A3>::template impl<Expr, State, Data> a3; typedef typename a3::result_type b3; typedef typename when<_, A4>::template impl<Expr, State, Data> a4; typedef typename a4::result_type b4; typedef typename when<_, A5>::template impl<Expr, State, Data> a5; typedef typename a5::result_type b5; typedef typename when<_, A6>::template impl<Expr, State, Data> a6; typedef typename a6::result_type b6;
108             typedef detail::poly_function_traits<Fun, Fun(b0 , b1 , b2 , b3 , b4 , b5 , b6)> function_traits;
109             typedef typename function_traits::result_type result_type;
110             
111             
112             
113             
114             
115             
116             
117             result_type operator ()(
118                 typename impl::expr_param e
119               , typename impl::state_param s
120               , typename impl::data_param d
121             ) const
122             {
123                 typedef typename function_traits::function_type function_type;
124                 return function_type()(detail::as_lvalue(a0()(e, s, d)) , detail::as_lvalue(a1()(e, s, d)) , detail::as_lvalue(a2()(e, s, d)) , detail::as_lvalue(a3()(e, s, d)) , detail::as_lvalue(a4()(e, s, d)) , detail::as_lvalue(a5()(e, s, d)) , detail::as_lvalue(a6()(e, s, d)));
125             }
126         };
127     };
128     
129     
130     
131     template<typename Fun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
132     struct call<Fun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7)> : transform<call<Fun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7)> >
133     {
134         template<typename Expr, typename State, typename Data>
135         struct impl : transform_impl<Expr, State, Data>
136         {
137             typedef typename when<_, A0>::template impl<Expr, State, Data> a0; typedef typename a0::result_type b0; typedef typename when<_, A1>::template impl<Expr, State, Data> a1; typedef typename a1::result_type b1; typedef typename when<_, A2>::template impl<Expr, State, Data> a2; typedef typename a2::result_type b2; typedef typename when<_, A3>::template impl<Expr, State, Data> a3; typedef typename a3::result_type b3; typedef typename when<_, A4>::template impl<Expr, State, Data> a4; typedef typename a4::result_type b4; typedef typename when<_, A5>::template impl<Expr, State, Data> a5; typedef typename a5::result_type b5; typedef typename when<_, A6>::template impl<Expr, State, Data> a6; typedef typename a6::result_type b6; typedef typename when<_, A7>::template impl<Expr, State, Data> a7; typedef typename a7::result_type b7;
138             typedef detail::poly_function_traits<Fun, Fun(b0 , b1 , b2 , b3 , b4 , b5 , b6 , b7)> function_traits;
139             typedef typename function_traits::result_type result_type;
140             
141             
142             
143             
144             
145             
146             
147             result_type operator ()(
148                 typename impl::expr_param e
149               , typename impl::state_param s
150               , typename impl::data_param d
151             ) const
152             {
153                 typedef typename function_traits::function_type function_type;
154                 return function_type()(detail::as_lvalue(a0()(e, s, d)) , detail::as_lvalue(a1()(e, s, d)) , detail::as_lvalue(a2()(e, s, d)) , detail::as_lvalue(a3()(e, s, d)) , detail::as_lvalue(a4()(e, s, d)) , detail::as_lvalue(a5()(e, s, d)) , detail::as_lvalue(a6()(e, s, d)) , detail::as_lvalue(a7()(e, s, d)));
155             }
156         };
157     };
158     
159     
160     
161     template<typename Fun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
162     struct call<Fun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8)> : transform<call<Fun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8)> >
163     {
164         template<typename Expr, typename State, typename Data>
165         struct impl : transform_impl<Expr, State, Data>
166         {
167             typedef typename when<_, A0>::template impl<Expr, State, Data> a0; typedef typename a0::result_type b0; typedef typename when<_, A1>::template impl<Expr, State, Data> a1; typedef typename a1::result_type b1; typedef typename when<_, A2>::template impl<Expr, State, Data> a2; typedef typename a2::result_type b2; typedef typename when<_, A3>::template impl<Expr, State, Data> a3; typedef typename a3::result_type b3; typedef typename when<_, A4>::template impl<Expr, State, Data> a4; typedef typename a4::result_type b4; typedef typename when<_, A5>::template impl<Expr, State, Data> a5; typedef typename a5::result_type b5; typedef typename when<_, A6>::template impl<Expr, State, Data> a6; typedef typename a6::result_type b6; typedef typename when<_, A7>::template impl<Expr, State, Data> a7; typedef typename a7::result_type b7; typedef typename when<_, A8>::template impl<Expr, State, Data> a8; typedef typename a8::result_type b8;
168             typedef detail::poly_function_traits<Fun, Fun(b0 , b1 , b2 , b3 , b4 , b5 , b6 , b7 , b8)> function_traits;
169             typedef typename function_traits::result_type result_type;
170             
171             
172             
173             
174             
175             
176             
177             result_type operator ()(
178                 typename impl::expr_param e
179               , typename impl::state_param s
180               , typename impl::data_param d
181             ) const
182             {
183                 typedef typename function_traits::function_type function_type;
184                 return function_type()(detail::as_lvalue(a0()(e, s, d)) , detail::as_lvalue(a1()(e, s, d)) , detail::as_lvalue(a2()(e, s, d)) , detail::as_lvalue(a3()(e, s, d)) , detail::as_lvalue(a4()(e, s, d)) , detail::as_lvalue(a5()(e, s, d)) , detail::as_lvalue(a6()(e, s, d)) , detail::as_lvalue(a7()(e, s, d)) , detail::as_lvalue(a8()(e, s, d)));
185             }
186         };
187     };
188     
189     
190     
191     template<typename Fun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
192     struct call<Fun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9)> : transform<call<Fun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9)> >
193     {
194         template<typename Expr, typename State, typename Data>
195         struct impl : transform_impl<Expr, State, Data>
196         {
197             typedef typename when<_, A0>::template impl<Expr, State, Data> a0; typedef typename a0::result_type b0; typedef typename when<_, A1>::template impl<Expr, State, Data> a1; typedef typename a1::result_type b1; typedef typename when<_, A2>::template impl<Expr, State, Data> a2; typedef typename a2::result_type b2; typedef typename when<_, A3>::template impl<Expr, State, Data> a3; typedef typename a3::result_type b3; typedef typename when<_, A4>::template impl<Expr, State, Data> a4; typedef typename a4::result_type b4; typedef typename when<_, A5>::template impl<Expr, State, Data> a5; typedef typename a5::result_type b5; typedef typename when<_, A6>::template impl<Expr, State, Data> a6; typedef typename a6::result_type b6; typedef typename when<_, A7>::template impl<Expr, State, Data> a7; typedef typename a7::result_type b7; typedef typename when<_, A8>::template impl<Expr, State, Data> a8; typedef typename a8::result_type b8; typedef typename when<_, A9>::template impl<Expr, State, Data> a9; typedef typename a9::result_type b9;
198             typedef detail::poly_function_traits<Fun, Fun(b0 , b1 , b2 , b3 , b4 , b5 , b6 , b7 , b8 , b9)> function_traits;
199             typedef typename function_traits::result_type result_type;
200             
201             
202             
203             
204             
205             
206             
207             result_type operator ()(
208                 typename impl::expr_param e
209               , typename impl::state_param s
210               , typename impl::data_param d
211             ) const
212             {
213                 typedef typename function_traits::function_type function_type;
214                 return function_type()(detail::as_lvalue(a0()(e, s, d)) , detail::as_lvalue(a1()(e, s, d)) , detail::as_lvalue(a2()(e, s, d)) , detail::as_lvalue(a3()(e, s, d)) , detail::as_lvalue(a4()(e, s, d)) , detail::as_lvalue(a5()(e, s, d)) , detail::as_lvalue(a6()(e, s, d)) , detail::as_lvalue(a7()(e, s, d)) , detail::as_lvalue(a8()(e, s, d)) , detail::as_lvalue(a9()(e, s, d)));
215             }
216         };
217     };