]> git.sesse.net Git - casparcg/blob - dependencies/boost/boost/phoenix/bind/detail/preprocessed/member_function_ptr_10.hpp
Manually merged pull request #222
[casparcg] / dependencies / boost / boost / phoenix / bind / detail / preprocessed / member_function_ptr_10.hpp
1 /*=============================================================================
2     Copyright (c) 2001-2007 Joel de Guzman
3
4     Distributed under the Boost Software License, Version 1.0. (See accompanying 
5     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 ==============================================================================*/
7     
8     
9     
10     
11     
12     
13     
14     template <>
15     struct member_function_ptr_impl<1>
16     {
17         template <typename RT, typename FP>
18         struct impl
19         {
20             typedef RT result_type;
21             impl(FP fp)
22                 : fp(fp) {}
23             template <typename Class, typename A0>
24             RT operator()(Class& obj, A0 & a0) const
25             {
26                 BOOST_PROTO_USE_GET_POINTER();
27                 typedef typename proto::detail::classtypeof<FP>::type class_type;
28                 return (BOOST_PROTO_GET_POINTER(class_type, obj)->*fp)(a0);
29             }
30             template <typename Class, typename A0>
31             RT operator()(Class* obj, A0 & a0) const
32             {
33                 return (obj->*fp)(a0);
34             }
35             FP fp;
36         };
37     };
38     
39     
40     
41     
42     
43     
44     
45     template <>
46     struct member_function_ptr_impl<2>
47     {
48         template <typename RT, typename FP>
49         struct impl
50         {
51             typedef RT result_type;
52             impl(FP fp)
53                 : fp(fp) {}
54             template <typename Class, typename A0 , typename A1>
55             RT operator()(Class& obj, A0 & a0 , A1 & a1) const
56             {
57                 BOOST_PROTO_USE_GET_POINTER();
58                 typedef typename proto::detail::classtypeof<FP>::type class_type;
59                 return (BOOST_PROTO_GET_POINTER(class_type, obj)->*fp)(a0 , a1);
60             }
61             template <typename Class, typename A0 , typename A1>
62             RT operator()(Class* obj, A0 & a0 , A1 & a1) const
63             {
64                 return (obj->*fp)(a0 , a1);
65             }
66             FP fp;
67         };
68     };
69     
70     
71     
72     
73     
74     
75     
76     template <>
77     struct member_function_ptr_impl<3>
78     {
79         template <typename RT, typename FP>
80         struct impl
81         {
82             typedef RT result_type;
83             impl(FP fp)
84                 : fp(fp) {}
85             template <typename Class, typename A0 , typename A1 , typename A2>
86             RT operator()(Class& obj, A0 & a0 , A1 & a1 , A2 & a2) const
87             {
88                 BOOST_PROTO_USE_GET_POINTER();
89                 typedef typename proto::detail::classtypeof<FP>::type class_type;
90                 return (BOOST_PROTO_GET_POINTER(class_type, obj)->*fp)(a0 , a1 , a2);
91             }
92             template <typename Class, typename A0 , typename A1 , typename A2>
93             RT operator()(Class* obj, A0 & a0 , A1 & a1 , A2 & a2) const
94             {
95                 return (obj->*fp)(a0 , a1 , a2);
96             }
97             FP fp;
98         };
99     };
100     
101     
102     
103     
104     
105     
106     
107     template <>
108     struct member_function_ptr_impl<4>
109     {
110         template <typename RT, typename FP>
111         struct impl
112         {
113             typedef RT result_type;
114             impl(FP fp)
115                 : fp(fp) {}
116             template <typename Class, typename A0 , typename A1 , typename A2 , typename A3>
117             RT operator()(Class& obj, A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3) const
118             {
119                 BOOST_PROTO_USE_GET_POINTER();
120                 typedef typename proto::detail::classtypeof<FP>::type class_type;
121                 return (BOOST_PROTO_GET_POINTER(class_type, obj)->*fp)(a0 , a1 , a2 , a3);
122             }
123             template <typename Class, typename A0 , typename A1 , typename A2 , typename A3>
124             RT operator()(Class* obj, A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3) const
125             {
126                 return (obj->*fp)(a0 , a1 , a2 , a3);
127             }
128             FP fp;
129         };
130     };
131     
132     
133     
134     
135     
136     
137     
138     template <>
139     struct member_function_ptr_impl<5>
140     {
141         template <typename RT, typename FP>
142         struct impl
143         {
144             typedef RT result_type;
145             impl(FP fp)
146                 : fp(fp) {}
147             template <typename Class, typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
148             RT operator()(Class& obj, A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4) const
149             {
150                 BOOST_PROTO_USE_GET_POINTER();
151                 typedef typename proto::detail::classtypeof<FP>::type class_type;
152                 return (BOOST_PROTO_GET_POINTER(class_type, obj)->*fp)(a0 , a1 , a2 , a3 , a4);
153             }
154             template <typename Class, typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
155             RT operator()(Class* obj, A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4) const
156             {
157                 return (obj->*fp)(a0 , a1 , a2 , a3 , a4);
158             }
159             FP fp;
160         };
161     };
162     
163     
164     
165     
166     
167     
168     
169     template <>
170     struct member_function_ptr_impl<6>
171     {
172         template <typename RT, typename FP>
173         struct impl
174         {
175             typedef RT result_type;
176             impl(FP fp)
177                 : fp(fp) {}
178             template <typename Class, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
179             RT operator()(Class& obj, A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5) const
180             {
181                 BOOST_PROTO_USE_GET_POINTER();
182                 typedef typename proto::detail::classtypeof<FP>::type class_type;
183                 return (BOOST_PROTO_GET_POINTER(class_type, obj)->*fp)(a0 , a1 , a2 , a3 , a4 , a5);
184             }
185             template <typename Class, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
186             RT operator()(Class* obj, A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5) const
187             {
188                 return (obj->*fp)(a0 , a1 , a2 , a3 , a4 , a5);
189             }
190             FP fp;
191         };
192     };
193     
194     
195     
196     
197     
198     
199     
200     template <>
201     struct member_function_ptr_impl<7>
202     {
203         template <typename RT, typename FP>
204         struct impl
205         {
206             typedef RT result_type;
207             impl(FP fp)
208                 : fp(fp) {}
209             template <typename Class, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
210             RT operator()(Class& obj, A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6) const
211             {
212                 BOOST_PROTO_USE_GET_POINTER();
213                 typedef typename proto::detail::classtypeof<FP>::type class_type;
214                 return (BOOST_PROTO_GET_POINTER(class_type, obj)->*fp)(a0 , a1 , a2 , a3 , a4 , a5 , a6);
215             }
216             template <typename Class, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
217             RT operator()(Class* obj, A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6) const
218             {
219                 return (obj->*fp)(a0 , a1 , a2 , a3 , a4 , a5 , a6);
220             }
221             FP fp;
222         };
223     };
224     
225     
226     
227     
228     
229     
230     
231     template <>
232     struct member_function_ptr_impl<8>
233     {
234         template <typename RT, typename FP>
235         struct impl
236         {
237             typedef RT result_type;
238             impl(FP fp)
239                 : fp(fp) {}
240             template <typename Class, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
241             RT operator()(Class& obj, A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6 , A7 & a7) const
242             {
243                 BOOST_PROTO_USE_GET_POINTER();
244                 typedef typename proto::detail::classtypeof<FP>::type class_type;
245                 return (BOOST_PROTO_GET_POINTER(class_type, obj)->*fp)(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
246             }
247             template <typename Class, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
248             RT operator()(Class* obj, A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6 , A7 & a7) const
249             {
250                 return (obj->*fp)(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
251             }
252             FP fp;
253         };
254     };
255     
256     
257     
258     
259     
260     
261     
262     template <>
263     struct member_function_ptr_impl<9>
264     {
265         template <typename RT, typename FP>
266         struct impl
267         {
268             typedef RT result_type;
269             impl(FP fp)
270                 : fp(fp) {}
271             template <typename Class, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
272             RT operator()(Class& obj, A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6 , A7 & a7 , A8 & a8) const
273             {
274                 BOOST_PROTO_USE_GET_POINTER();
275                 typedef typename proto::detail::classtypeof<FP>::type class_type;
276                 return (BOOST_PROTO_GET_POINTER(class_type, obj)->*fp)(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
277             }
278             template <typename Class, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
279             RT operator()(Class* obj, A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6 , A7 & a7 , A8 & a8) const
280             {
281                 return (obj->*fp)(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
282             }
283             FP fp;
284         };
285     };
286     
287     
288     
289     
290     
291     
292     
293     template <>
294     struct member_function_ptr_impl<10>
295     {
296         template <typename RT, typename FP>
297         struct impl
298         {
299             typedef RT result_type;
300             impl(FP fp)
301                 : fp(fp) {}
302             template <typename Class, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
303             RT operator()(Class& obj, A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6 , A7 & a7 , A8 & a8 , A9 & a9) const
304             {
305                 BOOST_PROTO_USE_GET_POINTER();
306                 typedef typename proto::detail::classtypeof<FP>::type class_type;
307                 return (BOOST_PROTO_GET_POINTER(class_type, obj)->*fp)(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9);
308             }
309             template <typename Class, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
310             RT operator()(Class* obj, A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6 , A7 & a7 , A8 & a8 , A9 & a9) const
311             {
312                 return (obj->*fp)(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9);
313             }
314             FP fp;
315         };
316     };