1 | #ifndef SikiMultimethodH
|
---|
2 | #define SikiMultimethodH
|
---|
3 | /*---------------------------------------------------------------------------
|
---|
4 | Multimethod.hpp
|
---|
5 |
|
---|
6 | ---------------------------------------------------------------------------
|
---|
7 | Copyright (C) 2009/01 - 2009 Nowake nowake@fircewinds.net
|
---|
8 |
|
---|
9 | ----------------------------------------------------------------------------*/
|
---|
10 |
|
---|
11 | #include <vector>
|
---|
12 | #include <map>
|
---|
13 | #include <boost/type_traits.hpp>
|
---|
14 | #include <boost/any.hpp>
|
---|
15 | #include <boost/unordered_map.hpp>
|
---|
16 | #include <loki/LokiTypeInfo.h>
|
---|
17 | #include "MemberFunctionChecker.hpp" // http://groups.google.com/group/comp.lang.c++.moderated/tree/browse_frm/thread/4f7c7a96f9afbe44/c95a7b4c645e449f#doc_e5fbc9305539f699
|
---|
18 |
|
---|
19 |
|
---|
20 | namespace Loki {
|
---|
21 | std::size_t hash_value(const TypeInfo& value) {
|
---|
22 | boost::hash<const std::type_info*> hasher;
|
---|
23 | return hasher(&(value.Get()));
|
---|
24 | }
|
---|
25 | }
|
---|
26 |
|
---|
27 | ///////////////////////////////////////////////////////////////////////////
|
---|
28 | // multi method executor
|
---|
29 | ///////////////////////////////////////////////////////////////////////////
|
---|
30 | struct Multimethod {
|
---|
31 | Multimethod() {};
|
---|
32 | public:
|
---|
33 | template<typename holder_t> struct Traits;
|
---|
34 | class BadMultimethod : public std::bad_cast {
|
---|
35 | public:
|
---|
36 | virtual const char * what() const throw() {
|
---|
37 | return "Bad Multimethod apply: no entried argument set.";
|
---|
38 | };
|
---|
39 | };
|
---|
40 | private: ////////////////////////////////////////////////////////////////////////
|
---|
41 | template<typename T>
|
---|
42 | static T& find(const unsigned int pos1) {
|
---|
43 | static std::vector<T> r;
|
---|
44 | if (r.size() <= pos1) {
|
---|
45 | r.resize(pos1+1, 0);
|
---|
46 | }
|
---|
47 | return r[pos1];
|
---|
48 | };
|
---|
49 | template<typename T>
|
---|
50 | static T& find(unsigned int pos1, unsigned int pos2) {
|
---|
51 | static std::vector<std::vector<T> > r;
|
---|
52 | if (r.size() <= pos1) {
|
---|
53 | r.resize(pos1+1);
|
---|
54 | }
|
---|
55 | if (r[pos1].size() <= pos2) {
|
---|
56 | r[pos1].resize(pos2+1, 0);
|
---|
57 | }
|
---|
58 | return r[pos1][pos2];
|
---|
59 | };
|
---|
60 | template<typename T>
|
---|
61 | static T& find(unsigned int pos1, unsigned int pos2, unsigned int pos3) {
|
---|
62 | static std::vector<std::vector<std::vector<T> > > r;
|
---|
63 | if (r.size() <= pos1) {
|
---|
64 | r.resize(pos1+1);
|
---|
65 | }
|
---|
66 | if (r[pos1].size() <= pos2) {
|
---|
67 | r[pos1].resize(pos2+1);
|
---|
68 | }
|
---|
69 | if (r[pos1][pos2].size() <= pos3) {
|
---|
70 | r[pos1][pos2].resize(pos3+1, 0);
|
---|
71 | }
|
---|
72 | return r[pos1][pos2][pos3];
|
---|
73 | };
|
---|
74 | template<typename T>
|
---|
75 | static T& find(unsigned int pos1, unsigned int pos2, unsigned int pos3, unsigned int pos4) {
|
---|
76 | struct r1 { std::vector<T> r; };
|
---|
77 | struct r2 { std::vector<r1> r; };
|
---|
78 | struct r3 { std::vector<r2> r; };
|
---|
79 | struct r4 { std::vector<r3> r; };
|
---|
80 | static r4 r; // C4503 workaround
|
---|
81 | if (r.r.size() <= pos1) {
|
---|
82 | r.r.resize(pos1+1);
|
---|
83 | }
|
---|
84 | if (r.r[pos1].r.size() <= pos2) {
|
---|
85 | r.r[pos1].r.resize(pos2+1);
|
---|
86 | }
|
---|
87 | if (r.r[pos1].r[pos2].r.size() <= pos3) {
|
---|
88 | r.r[pos1].r[pos2].r.resize(pos3+1);
|
---|
89 | }
|
---|
90 | if (r.r[pos1].r[pos2].r[pos3].r.size() <= pos4) {
|
---|
91 | r.r[pos1].r[pos2].r[pos3].r.resize(pos4+1, 0);
|
---|
92 | }
|
---|
93 | return r.r[pos1].r[pos2].r[pos3].r[pos4];
|
---|
94 | };
|
---|
95 | /*template<typename T>
|
---|
96 | static T& find(unsigned int pos1, unsigned int pos2, unsigned int pos3, unsigned int pos4, unsigned int pos5) {
|
---|
97 | struct r1 { std::vector<T> r; };
|
---|
98 | struct r2 { std::vector<r1> r; };
|
---|
99 | struct r3 { std::vector<r2> r; };
|
---|
100 | struct r4 { std::vector<r3> r; };
|
---|
101 | struct r5 { std::vector<r4> r; };
|
---|
102 | static r5 r; // C4503 workaround
|
---|
103 | if (r.r.size() <= pos1) {
|
---|
104 | r.r.resize(pos1+1);
|
---|
105 | }
|
---|
106 | if (r.r[pos1].r.size() <= pos2) {
|
---|
107 | r.r[pos1].r.resize(pos2+1);
|
---|
108 | }
|
---|
109 | if (r.r[pos1].r[pos2].r.size() <= pos3) {
|
---|
110 | r.r[pos1].r[pos2].r.resize(pos3+1);
|
---|
111 | }
|
---|
112 | if (r.r[pos1].r[pos2].r[pos3].r.size() <= pos4) {
|
---|
113 | r.r[pos1].r[pos2].r[pos3].r.resize(pos4+1, 0);
|
---|
114 | }
|
---|
115 | if (r.r[pos1].r[pos2].r[pos3].r[pos4].r.size() <= pos5) {
|
---|
116 | r.r[pos1].r[pos2].r[pos3].r[pos4].r.resize(pos5+1, 0);
|
---|
117 | }
|
---|
118 | return r.r[pos1].r[pos2].r[pos3].r[pos4].r[pos5];
|
---|
119 | };*/
|
---|
120 | ////////////////////////////////////////////////////////////////////////
|
---|
121 | template<typename T>
|
---|
122 | static T& find(const Loki::TypeInfo& type1) {
|
---|
123 | //*
|
---|
124 | typedef boost::unordered_map<Loki::TypeInfo, T> map1;
|
---|
125 | /*/
|
---|
126 | typedef std::map<Loki::TypeInfo, T> map1;
|
---|
127 | //*/
|
---|
128 | static map1 rr;
|
---|
129 | std::pair<map1::iterator, bool> t1(rr.insert(make_pair(type1, static_cast<T>(0))));
|
---|
130 | return t1.first->second;
|
---|
131 | };
|
---|
132 | template<typename T>
|
---|
133 | static T& find(const Loki::TypeInfo& type1, const Loki::TypeInfo& type2) {
|
---|
134 | //*
|
---|
135 | typedef boost::unordered_map<Loki::TypeInfo, T> map1;
|
---|
136 | typedef boost::unordered_map<Loki::TypeInfo, map1> map2;
|
---|
137 | /*/
|
---|
138 | typedef std::map<Loki::TypeInfo, T> map1;
|
---|
139 | typedef std::map<Loki::TypeInfo, map1> map2;
|
---|
140 | //*/
|
---|
141 | static map2 rr;
|
---|
142 | std::pair<map2::iterator, bool> t2(rr.insert(make_pair(type2, map1())));
|
---|
143 | std::pair<map1::iterator, bool> t1(t2.first->second.insert(make_pair(type1, static_cast<T>(0))));
|
---|
144 | return t1.first->second;
|
---|
145 | };
|
---|
146 | template<typename T>
|
---|
147 | static T& find(const Loki::TypeInfo& type1, const Loki::TypeInfo& type2, const Loki::TypeInfo& type3) {
|
---|
148 | //*
|
---|
149 | typedef boost::unordered_map<Loki::TypeInfo, T> map1;
|
---|
150 | typedef boost::unordered_map<Loki::TypeInfo, map1> map2;
|
---|
151 | typedef boost::unordered_map<Loki::TypeInfo, map2> map3;
|
---|
152 | /*/
|
---|
153 | typedef std::map<Loki::TypeInfo, T> map1;
|
---|
154 | typedef std::map<Loki::TypeInfo, map1> map2;
|
---|
155 | typedef std::map<Loki::TypeInfo, map2> map3;
|
---|
156 | //*/
|
---|
157 | static map3 rr;
|
---|
158 | std::pair<map3::iterator, bool> t3(rr.insert(make_pair(type3, map2())));
|
---|
159 | std::pair<map2::iterator, bool> t2(t3.first->second.insert(make_pair(type2, map1())));
|
---|
160 | std::pair<map1::iterator, bool> t1(t2.first->second.insert(make_pair(type1, static_cast<T>(0))));
|
---|
161 | return t1.first->second;
|
---|
162 | };
|
---|
163 | template<typename T>
|
---|
164 | static T& find(const Loki::TypeInfo& type1, const Loki::TypeInfo& type2, const Loki::TypeInfo& type3, const Loki::TypeInfo& type4) {
|
---|
165 | //*
|
---|
166 | typedef boost::unordered_map<index_type, T> map1;
|
---|
167 | typedef boost::unordered_map<index_type, map1> map2;
|
---|
168 | typedef boost::unordered_map<index_type, map2> map3;
|
---|
169 | typedef boost::unordered_map<index_type, map3> map4;
|
---|
170 | /*/
|
---|
171 | typedef std::map<index_type, T> map1;
|
---|
172 | typedef std::map<index_type, map1> map2;
|
---|
173 | typedef std::map<index_type, map2> map3;
|
---|
174 | typedef std::map<index_type, map3> map4;
|
---|
175 | //*/
|
---|
176 | static map4 rr;
|
---|
177 | std::pair<map4::iterator, bool> t4(rr.insert(make_pair(type4, map3())));
|
---|
178 | std::pair<map3::iterator, bool> t3(t4.first->second.insert(make_pair(type3, map2())));
|
---|
179 | std::pair<map2::iterator, bool> t2(t3.first->second.insert(make_pair(type2, map1())));
|
---|
180 | std::pair<map1::iterator, bool> t1(t2.first->second.insert(make_pair(type1, static_cast<T>(0))));
|
---|
181 | return t1.first->second;
|
---|
182 | };
|
---|
183 | /*template<typename T>
|
---|
184 | static T& find(const Loki::TypeInfo& type1, const Loki::TypeInfo& type2, const Loki::TypeInfo& type3, const Loki::TypeInfo& type4, const Loki::TypeInfo& type5) {
|
---|
185 | typedef std::map<index_type, T> map1;
|
---|
186 | typedef std::map<index_type, map1> map2;
|
---|
187 | typedef std::map<index_type, map2> map3;
|
---|
188 | typedef std::map<index_type, map3> map4;
|
---|
189 | typedef std::map<index_type, map4> map5;
|
---|
190 | static map5 rr;
|
---|
191 | std::pair<map5::iterator, bool> t5(rr.insert(make_pair(type5, map4())));
|
---|
192 | std::pair<map4::iterator, bool> t4(t5.first->second.insert(make_pair(type4, map3())));
|
---|
193 | std::pair<map3::iterator, bool> t3(t4.first->second.insert(make_pair(type3, map2())));
|
---|
194 | std::pair<map2::iterator, bool> t2(t3.first->second.insert(make_pair(type2, map1())));
|
---|
195 | std::pair<map1::iterator, bool> t1(t2.first->second.insert(make_pair(type1, static_cast<T>(0))));
|
---|
196 | return t1.first->second;
|
---|
197 | };*/
|
---|
198 |
|
---|
199 |
|
---|
200 | private: ////////////////////////////////////////////////////////////////////////
|
---|
201 | template<typename R, bool return_value, typename HHH, typename M00> struct filter00 {
|
---|
202 | static R trampoline(HHH& m00) { return Traits<HHH>::cast<M00&>(m00)(); };
|
---|
203 | };
|
---|
204 | template<typename R, typename HHH, typename M00> struct filter00<R, false, HHH, M00> {
|
---|
205 | static R trampoline(HHH& m00) { Traits<HHH>::cast<M00&>(m00)(); return R(); };
|
---|
206 | };
|
---|
207 | public:
|
---|
208 | template<typename R, typename HHH, typename M00>
|
---|
209 | static bool entry() {
|
---|
210 | struct Local {
|
---|
211 | static R trampoline(HHH& m00) {
|
---|
212 | return filter00<R, !(MemberFunctionChecker::is_call_possible<M00, void()>::value), HHH, M00>::trampoline(m00);
|
---|
213 | };
|
---|
214 | };
|
---|
215 | typedef R (*T00)(HHH&);
|
---|
216 | static bool t00((find<T00>(Traits<HHH>::id<M00>()) = &Local::trampoline) != 0);
|
---|
217 | return true;
|
---|
218 | };
|
---|
219 | template<typename R, typename HHH>
|
---|
220 | static R apply(HHH& m00) {
|
---|
221 | typedef R (*T)(HHH&);
|
---|
222 | T t(find<T>(Traits<HHH>::id(m00)));
|
---|
223 | if (!t) throw BadMultimethod();
|
---|
224 | return t(m00);
|
---|
225 | };
|
---|
226 | private: ////////////////////////////////////////////////////////////////////////
|
---|
227 | template<typename R, bool return_value, typename HHH, typename M00, typename A01> struct filter01 {
|
---|
228 | static R trampoline(HHH& m00, HHH& a01) { return Traits<HHH>::cast<M00&>(m00)(Traits<HHH>::cast<A01&>(a01)); };
|
---|
229 | static R trampoline(M00& m00, HHH& a01) { return m00(Traits<HHH>::cast<A01&>(a01)); };
|
---|
230 | static R trampoline(HHH& m00, A01& a01) { return Traits<HHH>::cast<M00&>(m00)(a01); };
|
---|
231 | };
|
---|
232 | template<typename R, typename HHH, typename M00, typename A01> struct filter01<R, false, HHH, M00, A01> {
|
---|
233 | static R trampoline(HHH& m00, HHH& a01) { Traits<HHH>::cast<M00&>(m00)(Traits<HHH>::cast<A01&>(a01)); return R(); };
|
---|
234 | static R trampoline(M00& m00, HHH& a01) { m00(Traits<HHH>::cast<A01&>(a01)); return R(); };
|
---|
235 | static R trampoline(HHH& m00, A01& a01) { Traits<HHH>::cast<M00&>(m00)(a01); return R(); };
|
---|
236 | };
|
---|
237 | public:
|
---|
238 | template<typename R, typename HHH, typename M00, typename A01>
|
---|
239 | static bool entry() {
|
---|
240 | struct Local {
|
---|
241 | static R trampoline(HHH& m00, HHH& a01) {
|
---|
242 | return filter01<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01)>::value), HHH, M00, A01>::trampoline(m00, a01);
|
---|
243 | };
|
---|
244 | static R trampoline(M00& m00, HHH& a01) {
|
---|
245 | return filter01<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01)>::value), HHH, M00, A01>::trampoline(m00, a01);
|
---|
246 | };
|
---|
247 | static R trampoline(HHH& m00, A01& a01) {
|
---|
248 | return filter01<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01)>::value), HHH, M00, A01>::trampoline(m00, a01);
|
---|
249 | };
|
---|
250 | };
|
---|
251 | typedef R (*T00)(HHH&, HHH&);
|
---|
252 | static bool t00((find<T00>(Traits<HHH>::id<M00>(), Traits<HHH>::id<A01>()) = &Local::trampoline) != 0);
|
---|
253 | typedef R (*T01)(M00&, HHH&);
|
---|
254 | static bool t01((find<T01>(Traits<HHH>::id<A01>()) = &Local::trampoline) != 0);
|
---|
255 | typedef R (*T02)(HHH&, A01&);
|
---|
256 | static bool t02((find<T02>(Traits<HHH>::id<M00>()) = &Local::trampoline) != 0);
|
---|
257 | return true;
|
---|
258 | };
|
---|
259 | template<typename R, typename HHH>
|
---|
260 | static R apply(HHH& m00, HHH& a01) {
|
---|
261 | typedef R (*T)(HHH&, HHH&);
|
---|
262 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a01)));
|
---|
263 | if (!t) throw BadMultimethod();
|
---|
264 | return t(m00, a01);
|
---|
265 | };
|
---|
266 | template<typename R, typename HHH, typename T00>
|
---|
267 | static R apply(T00& m00, HHH& a01, typename Traits<HHH>::index_type* = 0) {
|
---|
268 | typedef R (*T)(T00&, HHH&);
|
---|
269 | T t(find<T>(Traits<HHH>::id(a01)));
|
---|
270 | if (!t) throw BadMultimethod();
|
---|
271 | return t(m00, a01);
|
---|
272 | };
|
---|
273 | template<typename R, typename HHH, typename T00>
|
---|
274 | static R apply(HHH& m00, T00& a01, typename Traits<HHH>::index_type* = 0) {
|
---|
275 | typedef R (*T)(HHH&, T00&);
|
---|
276 | T t(find<T>(Traits<HHH>::id(m00)));
|
---|
277 | if (!t) throw BadMultimethod();
|
---|
278 | return t(m00, a01);
|
---|
279 | };
|
---|
280 | template<typename R, typename HHH, typename T00>
|
---|
281 | static R apply(const T00& m00, HHH& a01, typename Traits<HHH>::index_type* = 0) {
|
---|
282 | typedef R (*T)(const T00&, HHH&);
|
---|
283 | T t(find<T>(Traits<HHH>::id(a01)));
|
---|
284 | if (!t) throw BadMultimethod();
|
---|
285 | return t(m00, a01);
|
---|
286 | };
|
---|
287 | template<typename R, typename HHH, typename T00>
|
---|
288 | static R apply(HHH& m00, const T00& a01, typename Traits<HHH>::index_type* = 0) {
|
---|
289 | typedef R (*T)(HHH&, const T00&);
|
---|
290 | T t(find<T>(Traits<HHH>::id(m00)));
|
---|
291 | if (!t) throw BadMultimethod();
|
---|
292 | return t(m00, a01);
|
---|
293 | };
|
---|
294 | private: ////////////////////////////////////////////////////////////////////////
|
---|
295 | template<typename R, bool return_value, typename HHH, typename M00, typename A01, typename A02> struct filter02 {
|
---|
296 | static R trampoline(HHH& m00, HHH& a01, HHH& a02) { return Traits<HHH>::cast<M00&>(m00)(Traits<HHH>::cast<A01&>(a01), Traits<HHH>::cast<A02&>(a02)); };
|
---|
297 | static R trampoline(M00& m00, HHH& a01, HHH& a02) { return m00(Traits<HHH>::cast<A01&>(a01), Traits<HHH>::cast<A02&>(a02)); };
|
---|
298 | static R trampoline(HHH& m00, A01& a01, HHH& a02) { return Traits<HHH>::cast<M00&>(m00)(a01, Traits<HHH>::cast<A02&>(a02)); };
|
---|
299 | static R trampoline(HHH& m00, HHH& a01, A02& a02) { return Traits<HHH>::cast<M00&>(m00)(Traits<HHH>::cast<A01&>(a01), a02); };
|
---|
300 | static R trampoline(HHH& m00, A01& a01, A02& a02) { return Traits<HHH>::cast<M00&>(m00)(a01, a02); };
|
---|
301 | static R trampoline(M00& m00, HHH& a01, A02& a02) { return m00(Traits<HHH>::cast<A01&>(a01), a02); };
|
---|
302 | static R trampoline(M00& m00, A01& a01, HHH& a02) { return m00(a01, Traits<HHH>::cast<A02&>(a02)); };
|
---|
303 | };
|
---|
304 | template<typename R, typename HHH, typename M00, typename A01, typename A02> struct filter02<R, false, HHH, M00, A01, A02> {
|
---|
305 | static R trampoline(HHH& m00, HHH& a01, HHH& a02) { Traits<HHH>::cast<M00&>(m00)(Traits<HHH>::cast<A01&>(a01), Traits<HHH>::cast<A02&>(a02)); return R(); };
|
---|
306 | static R trampoline(M00& m00, HHH& a01, HHH& a02) { m00(Traits<HHH>::cast<A01&>(a01), Traits<HHH>::cast<A02&>(a02)); return R(); };
|
---|
307 | static R trampoline(HHH& m00, A01& a01, HHH& a02) { Traits<HHH>::cast<M00&>(m00)(a01, Traits<HHH>::cast<A02&>(a02)); return R(); };
|
---|
308 | static R trampoline(HHH& m00, HHH& a01, A02& a02) { Traits<HHH>::cast<M00&>(m00)(Traits<HHH>::cast<A01&>(a01), a02); return R(); };
|
---|
309 | static R trampoline(HHH& m00, A01& a01, A02& a02) { Traits<HHH>::cast<M00&>(m00)(a01, a02); return R(); };
|
---|
310 | static R trampoline(M00& m00, HHH& a01, A02& a02) { m00(Traits<HHH>::cast<A01&>(a01), a02); return R(); };
|
---|
311 | static R trampoline(M00& m00, A01& a01, HHH& a02) { m00(a01, Traits<HHH>::cast<A02&>(a02)); return R(); };
|
---|
312 | };
|
---|
313 | public:
|
---|
314 | template<typename R, typename HHH, typename M00, typename A01, typename A02>
|
---|
315 | static bool entry() {
|
---|
316 | struct Local {
|
---|
317 | static R trampoline(HHH& m00, HHH& a01, HHH& a02) {
|
---|
318 | return filter02<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02)>::value), HHH, M00, A01, A02>::trampoline(m00, a01, a02);
|
---|
319 | };
|
---|
320 | static R trampoline(M00& m00, HHH& a01, HHH& a02) {
|
---|
321 | return filter02<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02)>::value), HHH, M00, A01, A02>::trampoline(m00, a01, a02);
|
---|
322 | };
|
---|
323 | static R trampoline(HHH& m00, A01& a01, HHH& a02) {
|
---|
324 | return filter02<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02)>::value), HHH, M00, A01, A02>::trampoline(m00, a01, a02);
|
---|
325 | };
|
---|
326 | static R trampoline(HHH& m00, HHH& a01, A02& a02) {
|
---|
327 | return filter02<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02)>::value), HHH, M00, A01, A02>::trampoline(m00, a01, a02);
|
---|
328 | };
|
---|
329 | static R trampoline(HHH& m00, A01& a01, A02& a02) {
|
---|
330 | return filter02<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02)>::value), HHH, M00, A01, A02>::trampoline(m00, a01, a02);
|
---|
331 | };
|
---|
332 | static R trampoline(M00& m00, HHH& a01, A02& a02) {
|
---|
333 | return filter02<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02)>::value), HHH, M00, A01, A02>::trampoline(m00, a01, a02);
|
---|
334 | };
|
---|
335 | static R trampoline(M00& m00, A01& a01, HHH& a02) {
|
---|
336 | return filter02<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02)>::value), HHH, M00, A01, A02>::trampoline(m00, a01, a02);
|
---|
337 | };
|
---|
338 | };
|
---|
339 | typedef R (*T00)(HHH&, HHH&, HHH&);
|
---|
340 | static bool t00((find<T00>(Traits<HHH>::id<M00>(), Traits<HHH>::id<A01>(), Traits<HHH>::id<A02>()) = &Local::trampoline) != 0);
|
---|
341 | typedef R (*T01)(M00&, HHH&, HHH&);
|
---|
342 | static bool t01((find<T01>(Traits<HHH>::id<A01>(), Traits<HHH>::id<A02>()) = &Local::trampoline) != 0);
|
---|
343 | typedef R (*T02)(HHH&, A01&, HHH&);
|
---|
344 | static bool t02((find<T02>(Traits<HHH>::id<M00>(), Traits<HHH>::id<A02>()) = &Local::trampoline) != 0);
|
---|
345 | typedef R (*T03)(HHH&, HHH&, A02&);
|
---|
346 | static bool t03((find<T02>(Traits<HHH>::id<M00>(), Traits<HHH>::id<A01>()) = &Local::trampoline) != 0);
|
---|
347 | typedef R (*T04)(HHH&, A01&, A02&);
|
---|
348 | static bool t04((find<T04>(Traits<HHH>::id<M00>()) = &Local::trampoline) != 0);
|
---|
349 | typedef R (*T05)(M00&, HHH&, A02&);
|
---|
350 | static bool t05((find<T05>(Traits<HHH>::id<A01>()) = &Local::trampoline) != 0);
|
---|
351 | typedef R (*T06)(M00&, A01&, HHH&);
|
---|
352 | static bool t06((find<T06>(Traits<HHH>::id<A02>()) = &Local::trampoline) != 0);
|
---|
353 | return true;
|
---|
354 | };
|
---|
355 | template<typename R, typename HHH>
|
---|
356 | static R apply(HHH& m00, HHH& a01, HHH& a02) {
|
---|
357 | typedef R (*T)(HHH&, HHH&, HHH&);
|
---|
358 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a01), Traits<HHH>::id(a02)));
|
---|
359 | if (!t) throw BadMultimethod();
|
---|
360 | return t(m00, a01, a02);
|
---|
361 | };
|
---|
362 | template<typename R, typename HHH, typename T00>
|
---|
363 | static R apply(T00& m00, HHH& a01, HHH& a02, typename Traits<HHH>::index_type* = 0) {
|
---|
364 | typedef R (*T)(T00&, HHH&, HHH&);
|
---|
365 | T t(find<T>(Traits<HHH>::id(a01), Traits<HHH>::id(a02)));
|
---|
366 | if (!t) throw BadMultimethod();
|
---|
367 | return t(m00, a01, a02);
|
---|
368 | };
|
---|
369 | template<typename R, typename HHH, typename T00>
|
---|
370 | static R apply(HHH& m00, T00& a01, HHH& a02, typename Traits<HHH>::index_type* = 0) {
|
---|
371 | typedef R (*T)(HHH&, T00&, HHH&);
|
---|
372 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(ma02)));
|
---|
373 | if (!t) throw BadMultimethod();
|
---|
374 | return t(m00, a01, a02);
|
---|
375 | };
|
---|
376 | template<typename R, typename HHH, typename T00>
|
---|
377 | static R apply(HHH& m00, HHH& a01, T00& a02, typename Traits<HHH>::index_type* = 0) {
|
---|
378 | typedef R (*T)(const T00&, HHH&);
|
---|
379 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a01)));
|
---|
380 | if (!t) throw BadMultimethod();
|
---|
381 | return t(m00, a01, a02);
|
---|
382 | };
|
---|
383 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
384 | static R apply(HHH& m00, T00& a01, T01& a02, typename Traits<HHH>::index_type* = 0) {
|
---|
385 | typedef R (*T)(HHH&, T00&, T01&);
|
---|
386 | T t(find<T>(Traits<HHH>::id(m00)));
|
---|
387 | if (!t) throw BadMultimethod();
|
---|
388 | return t(m00, a01, a02);
|
---|
389 | };
|
---|
390 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
391 | static R apply(T00& m00, HHH& a01, T01& a02, typename Traits<HHH>::index_type* = 0) {
|
---|
392 | typedef R (*T)(T00&, HHH&, T01&);
|
---|
393 | T t(find<T>(Traits<HHH>::id(a01)));
|
---|
394 | if (!t) throw BadMultimethod();
|
---|
395 | return t(m00, a01, a02);
|
---|
396 | };
|
---|
397 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
398 | static R apply(T00& m00, T01& a01, HHH& a02, typename Traits<HHH>::index_type* = 0) {
|
---|
399 | typedef R (*T)(T00&, T01&, HHH&);
|
---|
400 | T t(find<T>(Traits<HHH>::id(a02)));
|
---|
401 | if (!t) throw BadMultimethod();
|
---|
402 | return t(m00, a01, a02);
|
---|
403 | };
|
---|
404 | template<typename R, typename HHH, typename T00>
|
---|
405 | static R apply(const T00& m00, HHH& a01, HHH& a02, typename Traits<HHH>::index_type* = 0) {
|
---|
406 | typedef R (*T)(const T00&, HHH&, HHH&);
|
---|
407 | T t(find<T>(Traits<HHH>::id(a01), Traits<HHH>::id(a02)));
|
---|
408 | if (!t) throw BadMultimethod();
|
---|
409 | return t(m00, a01, a02);
|
---|
410 | };
|
---|
411 | template<typename R, typename HHH, typename T00>
|
---|
412 | static R apply(HHH& m00, const T00& a01, HHH& a02, typename Traits<HHH>::index_type* = 0) {
|
---|
413 | typedef R (*T)(HHH&, const T00&, HHH&);
|
---|
414 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(ma02)));
|
---|
415 | if (!t) throw BadMultimethod();
|
---|
416 | return t(m00, a01, a02);
|
---|
417 | };
|
---|
418 | template<typename R, typename HHH, typename T00>
|
---|
419 | static R apply(HHH& m00, HHH& a01, const T00& a02, typename Traits<HHH>::index_type* = 0) {
|
---|
420 | typedef R (*T)(HHH&, HHH&, const T00);
|
---|
421 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a01)));
|
---|
422 | if (!t) throw BadMultimethod();
|
---|
423 | return t(m00, a01, a02);
|
---|
424 | };
|
---|
425 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
426 | static R apply(HHH& m00, const T00& a01, T01& a02, typename Traits<HHH>::index_type* = 0) {
|
---|
427 | typedef R (*T)(HHH&, const T00&, T01&);
|
---|
428 | T t(find<T>(Traits<HHH>::id(m00)));
|
---|
429 | if (!t) throw BadMultimethod();
|
---|
430 | return t(m00, a01, a02);
|
---|
431 | };
|
---|
432 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
433 | static R apply(HHH& m00, T00& a01, const T01& a02, typename Traits<HHH>::index_type* = 0) {
|
---|
434 | typedef R (*T)(HHH&, T00&, const T01&);
|
---|
435 | T t(find<T>(Traits<HHH>::id(m00)));
|
---|
436 | if (!t) throw BadMultimethod();
|
---|
437 | return t(m00, a01, a02);
|
---|
438 | };
|
---|
439 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
440 | static R apply(HHH& m00, const T00& a01, const T01& a02, typename Traits<HHH>::index_type* = 0) {
|
---|
441 | typedef R (*T)(HHH&, const T00&, const T01&);
|
---|
442 | T t(find<T>(Traits<HHH>::id(m00)));
|
---|
443 | if (!t) throw BadMultimethod();
|
---|
444 | return t(m00, a01, a02);
|
---|
445 | };
|
---|
446 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
447 | static R apply(const T00& m00, HHH& a01, T01& a02, typename Traits<HHH>::index_type* = 0) {
|
---|
448 | typedef R (*T)(const T00&, HHH&, T01&);
|
---|
449 | T t(find<T>(Traits<HHH>::id(a01)));
|
---|
450 | if (!t) throw BadMultimethod();
|
---|
451 | return t(m00, a01, a02);
|
---|
452 | };
|
---|
453 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
454 | static R apply(T00& m00, HHH& a01, const T01& a02, typename Traits<HHH>::index_type* = 0) {
|
---|
455 | typedef R (*T)(T00&, HHH&, const T01&);
|
---|
456 | T t(find<T>(Traits<HHH>::id(a01)));
|
---|
457 | if (!t) throw BadMultimethod();
|
---|
458 | return t(m00, a01, a02);
|
---|
459 | };
|
---|
460 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
461 | static R apply(const T00& m00, HHH& a01, const T01& a02, typename Traits<HHH>::index_type* = 0) {
|
---|
462 | typedef R (*T)(const T00&, HHH&, const T01&);
|
---|
463 | T t(find<T>(Traits<HHH>::id(a01)));
|
---|
464 | if (!t) throw BadMultimethod();
|
---|
465 | return t(m00, a01, a02);
|
---|
466 | };
|
---|
467 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
468 | static R apply(const T00& m00, T01& a01, HHH& a02, typename Traits<HHH>::index_type* = 0) {
|
---|
469 | typedef R (*T)(const T00&, T01&, HHH&);
|
---|
470 | T t(find<T>(Traits<HHH>::id(a02)));
|
---|
471 | if (!t) throw BadMultimethod();
|
---|
472 | return t(m00, a01, a02);
|
---|
473 | };
|
---|
474 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
475 | static R apply(T00& m00, const T01& a01, HHH& a02, typename Traits<HHH>::index_type* = 0) {
|
---|
476 | typedef R (*T)(T00&, const T01&, HHH&);
|
---|
477 | T t(find<T>(Traits<HHH>::id(a02)));
|
---|
478 | if (!t) throw BadMultimethod();
|
---|
479 | return t(m00, a01, a02);
|
---|
480 | };
|
---|
481 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
482 | static R apply(const T00& m00, const T01& a01, HHH& a02, typename Traits<HHH>::index_type* = 0) {
|
---|
483 | typedef R (*T)(const T00&, const T01&, HHH&);
|
---|
484 | T t(find<T>(Traits<HHH>::id(a02)));
|
---|
485 | if (!t) throw BadMultimethod();
|
---|
486 | return t(m00, a01, a02);
|
---|
487 | };
|
---|
488 | private: ////////////////////////////////////////////////////////////////////////
|
---|
489 | template<typename R, bool return_value, typename HHH, typename M00, typename A01, typename A02, typename A03> struct filter03 {
|
---|
490 | static R trampoline(HHH& m00, HHH& a01, HHH& a02, HHH& a03) { return Traits<HHH>::cast<M00&>(m00)(Traits<HHH>::cast<A01&>(a01), Traits<HHH>::cast<A02&>(a02), Traits<HHH>::cast<A02&>(a03)); };
|
---|
491 | static R trampoline(M00& m00, HHH& a01, HHH& a02, HHH& a03) { return m00(Traits<HHH>::cast<A01&>(a01), Traits<HHH>::cast<A02&>(a02), Traits<HHH>::cast<A02&>(a03)); };
|
---|
492 | static R trampoline(HHH& m00, A01& a01, HHH& a02, HHH& a03) { return Traits<HHH>::cast<M00&>(m00)(a01, Traits<HHH>::cast<A02&>(a02), Traits<HHH>::cast<A02&>(a03)); };
|
---|
493 | static R trampoline(HHH& m00, HHH& a01, A02& a02, HHH& a03) { return Traits<HHH>::cast<M00&>(m00)(Traits<HHH>::cast<A01&>(a01), a02, Traits<HHH>::cast<A02&>(a03)); };
|
---|
494 | static R trampoline(HHH& m00, HHH& a01, HHH& a02, A03& a03) { return Traits<HHH>::cast<M00&>(m00)(Traits<HHH>::cast<A01&>(a01), Traits<HHH>::cast<A02&>(a02), a03); };
|
---|
495 | static R trampoline(M00& m00, A01& a01, HHH& a02, HHH& a03) { return m00(a01, Traits<HHH>::cast<A02&>(a02), Traits<HHH>::cast<A02&>(a03)); };
|
---|
496 | static R trampoline(M00& m00, HHH& a01, A02& a02, HHH& a03) { return m00(Traits<HHH>::cast<A01&>(a01), a02, Traits<HHH>::cast<A02&>(a03)); };
|
---|
497 | static R trampoline(M00& m00, HHH& a01, HHH& a02, A03& a03) { return m00(Traits<HHH>::cast<A01&>(a01), Traits<HHH>::cast<A02&>(a02), a03); };
|
---|
498 | static R trampoline(HHH& m00, A01& a01, A02& a02, HHH& a03) { return Traits<HHH>::cast<M00&>(m00)(a01, a02, Traits<HHH>::cast<A03&>(a03)); };
|
---|
499 | static R trampoline(HHH& m00, A01& a01, HHH& a02, A03& a03) { return Traits<HHH>::cast<M00&>(m00)(a01, Traits<HHH>::cast<A02&>(a02), a03); };
|
---|
500 | static R trampoline(HHH& m00, HHH& a01, A02& a02, A03& a03) { return Traits<HHH>::cast<M00&>(m00)(Traits<HHH>::cast<A01&>(a01), a02, a03); };
|
---|
501 | static R trampoline(HHH& m00, A01& a01, A02& a02, A03& a03) { return Traits<HHH>::cast<M00&>(m00)(a01, a02, a03); };
|
---|
502 | static R trampoline(M00& m00, HHH& a01, A02& a02, A03& a03) { return m00(Traits<HHH>::cast<A01&>(a01), a02, a03); };
|
---|
503 | static R trampoline(M00& m00, A01& a01, HHH& a02, A03& a03) { return m00(a01, Traits<HHH>::cast<A01&>(a02), a03); };
|
---|
504 | static R trampoline(M00& m00, A01& a01, A02& a02, HHH& a03) { return m00(a01, a02, Traits<HHH>::cast<A01&>(a03)); };
|
---|
505 | };
|
---|
506 | template<typename R, typename HHH, typename M00, typename A01, typename A02, typename A03> struct filter03<R, false, HHH, M00, A01, A02, A03> {
|
---|
507 | static R trampoline(HHH& m00, HHH& a01, HHH& a02, HHH& a03) { Traits<HHH>::cast<M00&>(m00)(Traits<HHH>::cast<A01&>(a01), Traits<HHH>::cast<A02&>(a02), Traits<HHH>::cast<A02&>(a03)); return R(); };
|
---|
508 | static R trampoline(M00& m00, HHH& a01, HHH& a02, HHH& a03) { m00(Traits<HHH>::cast<A01&>(a01), Traits<HHH>::cast<A02&>(a02), Traits<HHH>::cast<A02&>(a03)); return R(); };
|
---|
509 | static R trampoline(HHH& m00, A01& a01, HHH& a02, HHH& a03) { Traits<HHH>::cast<M00&>(m00)(a01, Traits<HHH>::cast<A02&>(a02), Traits<HHH>::cast<A02&>(a03)); return R(); };
|
---|
510 | static R trampoline(HHH& m00, HHH& a01, A02& a02, HHH& a03) { Traits<HHH>::cast<M00&>(m00)(Traits<HHH>::cast<A01&>(a01), a02, Traits<HHH>::cast<A02&>(a03)); return R(); };
|
---|
511 | static R trampoline(HHH& m00, HHH& a01, HHH& a02, A03& a03) { Traits<HHH>::cast<M00&>(m00)(Traits<HHH>::cast<A01&>(a01), Traits<HHH>::cast<A02&>(a02), a03); return R(); };
|
---|
512 | static R trampoline(M00& m00, A01& a01, HHH& a02, HHH& a03) { m00(a01, Traits<HHH>::cast<A02&>(a02), Traits<HHH>::cast<A02&>(a03)); return R(); };
|
---|
513 | static R trampoline(M00& m00, HHH& a01, A02& a02, HHH& a03) { m00(Traits<HHH>::cast<A01&>(a01), a02, Traits<HHH>::cast<A02&>(a03)); return R(); };
|
---|
514 | static R trampoline(M00& m00, HHH& a01, HHH& a02, A03& a03) { m00(Traits<HHH>::cast<A01&>(a01), Traits<HHH>::cast<A02&>(a02), a03); return R(); };
|
---|
515 | static R trampoline(HHH& m00, A01& a01, A02& a02, HHH& a03) { Traits<HHH>::cast<M00&>(m00)(a01, a02, Traits<HHH>::cast<A03&>(a03)); return R(); };
|
---|
516 | static R trampoline(HHH& m00, A01& a01, HHH& a02, A03& a03) { Traits<HHH>::cast<M00&>(m00)(a01, Traits<HHH>::cast<A02&>(a02), a03); return R(); };
|
---|
517 | static R trampoline(HHH& m00, HHH& a01, A02& a02, A03& a03) { Traits<HHH>::cast<M00&>(m00)(Traits<HHH>::cast<A01&>(a01), a02, a03); return R(); };
|
---|
518 | static R trampoline(HHH& m00, A01& a01, A02& a02, A03& a03) { Traits<HHH>::cast<M00&>(m00)(a01, a02, a03); return R(); };
|
---|
519 | static R trampoline(M00& m00, HHH& a01, A02& a02, A03& a03) { m00(Traits<HHH>::cast<A01&>(a01), a02, a03); return R(); };
|
---|
520 | static R trampoline(M00& m00, A01& a01, HHH& a02, A03& a03) { m00(a01, Traits<HHH>::cast<A02&>(a02), a03); return R(); };
|
---|
521 | static R trampoline(M00& m00, A01& a01, A02& a02, HHH& a03) { m00(a01, a02, Traits<HHH>::cast<A03&>(a03)); return R(); };
|
---|
522 | };
|
---|
523 | public:
|
---|
524 | template<typename R, typename HHH, typename M00, typename A01, typename A02, typename A03>
|
---|
525 | static bool entry() {
|
---|
526 | struct Local {
|
---|
527 | static R trampoline(HHH& m00, HHH& a01, HHH& a02, HHH& a03) {
|
---|
528 | return filter03<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02, A03)>::value), HHH, M00, A01, A02, A03>::trampoline(m00, a01, a02, a03);
|
---|
529 | };
|
---|
530 | static R trampoline(M00& m00, HHH& a01, HHH& a02, HHH& a03) {
|
---|
531 | return filter03<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02, A03)>::value), HHH, M00, A01, A02, A03>::trampoline(m00, a01, a02, a03);
|
---|
532 | };
|
---|
533 | static R trampoline(HHH& m00, A01& a01, HHH& a02, HHH& a03) {
|
---|
534 | return filter03<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02, A03)>::value), HHH, M00, A01, A02, A03>::trampoline(m00, a01, a02, a03);
|
---|
535 | };
|
---|
536 | static R trampoline(HHH& m00, HHH& a01, A02& a02, HHH& a03) {
|
---|
537 | return filter03<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02, A03)>::value), HHH, M00, A01, A02, A03>::trampoline(m00, a01, a02, a03);
|
---|
538 | };
|
---|
539 | static R trampoline(HHH& m00, HHH& a01, HHH& a02, A03& a03) {
|
---|
540 | return filter03<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02, A03)>::value), HHH, M00, A01, A02, A03>::trampoline(m00, a01, a02, a03);
|
---|
541 | };
|
---|
542 | static R trampoline(M00& m00, A01& a01, HHH& a02, HHH& a03) {
|
---|
543 | return filter03<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02, A03)>::value), HHH, M00, A01, A02, A03>::trampoline(m00, a01, a02, a03);
|
---|
544 | };
|
---|
545 | static R trampoline(M00& m00, HHH& a01, A02& a02, HHH& a03) {
|
---|
546 | return filter03<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02, A03)>::value), HHH, M00, A01, A02, A03>::trampoline(m00, a01, a02, a03);
|
---|
547 | };
|
---|
548 | static R trampoline(M00& m00, HHH& a01, HHH& a02, A03& a03) {
|
---|
549 | return filter03<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02, A03)>::value), HHH, M00, A01, A02, A03>::trampoline(m00, a01, a02, a03);
|
---|
550 | };
|
---|
551 | static R trampoline(HHH& m00, A01& a01, A02& a02, HHH& a03) {
|
---|
552 | return filter03<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02, A03)>::value), HHH, M00, A01, A02, A03>::trampoline(m00, a01, a02, a03);
|
---|
553 | };
|
---|
554 | static R trampoline(HHH& m00, A01& a01, HHH& a02, A03& a03) {
|
---|
555 | return filter03<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02, A03)>::value), HHH, M00, A01, A02, A03>::trampoline(m00, a01, a02, a03);
|
---|
556 | };
|
---|
557 | static R trampoline(HHH& m00, HHH& a01, A02& a02, A03& a03) {
|
---|
558 | return filter03<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02, A03)>::value), HHH, M00, A01, A02, A03>::trampoline(m00, a01, a02, a03);
|
---|
559 | };
|
---|
560 | static R trampoline(HHH& m00, A01& a01, A02& a02, A03& a03) {
|
---|
561 | return filter03<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02, A03)>::value), HHH, M00, A01, A02, A03>::trampoline(m00, a01, a02, a03);
|
---|
562 | };
|
---|
563 | static R trampoline(M00& m00, HHH& a01, A02& a02, A03& a03) {
|
---|
564 | return filter03<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02, A03)>::value), HHH, M00, A01, A02, A03>::trampoline(m00, a01, a02, a03);
|
---|
565 | };
|
---|
566 | static R trampoline(M00& m00, A01& a01, HHH& a02, A03& a03) {
|
---|
567 | return filter03<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02, A03)>::value), HHH, M00, A01, A02, A03>::trampoline(m00, a01, a02, a03);
|
---|
568 | };
|
---|
569 | static R trampoline(M00& m00, A01& a01, A02& a02, HHH& a03) {
|
---|
570 | return filter03<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02, A03)>::value), HHH, M00, A01, A02, A03>::trampoline(m00, a01, a02, a03);
|
---|
571 | };
|
---|
572 | };
|
---|
573 | typedef R (*T00)(HHH&, HHH&, HHH&, HHH&);
|
---|
574 | static bool t00((find<T00>(Traits<HHH>::id<M00>(), Traits<HHH>::id<A01>(), Traits<HHH>::id<A02>(), Traits<HHH>::id<A03>()) = &Local::trampoline) != 0);
|
---|
575 | typedef R (*T01)(M00&, HHH&, HHH&, HHH&);
|
---|
576 | static bool t01((find<T01>(Traits<HHH>::id<A01>(), Traits<HHH>::id<A02>(), Traits<HHH>::id<A03>()) = &Local::trampoline) != 0);
|
---|
577 | typedef R (*T02)(HHH&, A01&, HHH&, HHH&);
|
---|
578 | static bool t02((find<T02>(Traits<HHH>::id<M00>(), Traits<HHH>::id<A02>(), Traits<HHH>::id<A03>()) = &Local::trampoline) != 0);
|
---|
579 | typedef R (*T03)(HHH&, HHH&, A02&, HHH&);
|
---|
580 | static bool t03((find<T03>(Traits<HHH>::id<M00>(), Traits<HHH>::id<A01>(), Traits<HHH>::id<A03>()) = &Local::trampoline) != 0);
|
---|
581 | typedef R (*T04)(HHH&, HHH&, HHH&, A03&);
|
---|
582 | static bool t04((find<T04>(Traits<HHH>::id<M00>(), Traits<HHH>::id<A01>(), Traits<HHH>::id<A02>()) = &Local::trampoline) != 0);
|
---|
583 | typedef R (*T05)(M00&, A01&, HHH&, HHH&);
|
---|
584 | static bool t05((find<T05>(Traits<HHH>::id<A02>(), Traits<HHH>::id<A03>()) = &Local::trampoline) != 0);
|
---|
585 | typedef R (*T06)(M00&, HHH&, A02&, HHH&);
|
---|
586 | static bool t06((find<T06>(Traits<HHH>::id<M00>(), Traits<HHH>::id<A03>()) = &Local::trampoline) != 0);
|
---|
587 | typedef R (*T07)(M00&, A01&, HHH&, HHH&);
|
---|
588 | static bool t07((find<T07>(Traits<HHH>::id<A02>(), Traits<HHH>::id<A03>()) = &Local::trampoline) != 0);
|
---|
589 | typedef R (*T08)(HHH&, A01&, A02&, A03&);
|
---|
590 | static bool t08((find<T08>(Traits<HHH>::id<M00>()) = &Local::trampoline) != 0);
|
---|
591 | typedef R (*T09)(M00&, HHH&, A02&, A03&);
|
---|
592 | static bool t09((find<T09>(Traits<HHH>::id<A01>()) = &Local::trampoline) != 0);
|
---|
593 | typedef R (*T10)(M00&, A01&, HHH&, A03&);
|
---|
594 | static bool t10((find<T09>(Traits<HHH>::id<A02>()) = &Local::trampoline) != 0);
|
---|
595 | typedef R (*T11)(M00&, A01&, A02&, HHH&);
|
---|
596 | static bool t11((find<T09>(Traits<HHH>::id<A03>()) = &Local::trampoline) != 0);
|
---|
597 | return true;
|
---|
598 | };
|
---|
599 | template<typename R, typename HHH>
|
---|
600 | static R apply(HHH& m00, HHH& a01, HHH& a02, HHH& a03) {
|
---|
601 | typedef R (*T)(HHH&, HHH&, HHH&, HHH&);
|
---|
602 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a01), Traits<HHH>::id(a02), Traits<HHH>::id(a03)));
|
---|
603 | if (!t) throw BadMultimethod();
|
---|
604 | return t(m00, a01, a02, a03);
|
---|
605 | };
|
---|
606 | template<typename R, typename HHH, typename T00>
|
---|
607 | static R apply(T00& m00, HHH& a01, HHH& a02, HHH& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
608 | typedef R (*T)(T00&, HHH&, HHH&, HHH&);
|
---|
609 | T t(find<T>(Traits<HHH>::id(a01), Traits<HHH>::id(a02), Traits<HHH>::id(a03)));
|
---|
610 | if (!t) throw BadMultimethod();
|
---|
611 | return t(m00, a01, a02, a03);
|
---|
612 | };
|
---|
613 | template<typename R, typename HHH, typename T00>
|
---|
614 | static R apply(const T00& m00, HHH& a01, HHH& a02, HHH& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
615 | typedef R (*T)(const T00&, HHH&, HHH&, HHH&);
|
---|
616 | T t(find<T>(Traits<HHH>::id(a01), Traits<HHH>::id(a02), Traits<HHH>::id(a03)));
|
---|
617 | if (!t) throw BadMultimethod();
|
---|
618 | return t(m00, a01, a02, a03);
|
---|
619 | };
|
---|
620 | template<typename R, typename HHH, typename T00>
|
---|
621 | static R apply(HHH& m00, T00& a01, HHH& a02, HHH& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
622 | typedef R (*T)(HHH&, T00&, HHH&, HHH&);
|
---|
623 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a02), Traits<HHH>::id(a03)));
|
---|
624 | if (!t) throw BadMultimethod();
|
---|
625 | return t(m00, a01, a02, a03);
|
---|
626 | };
|
---|
627 | template<typename R, typename HHH, typename T00>
|
---|
628 | static R apply(HHH& m00, const T00& a01, HHH& a02, HHH& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
629 | typedef R (*T)(HHH&, const T00&, HHH&, HHH&);
|
---|
630 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a02), Traits<HHH>::id(a03)));
|
---|
631 | if (!t) throw BadMultimethod();
|
---|
632 | return t(m00, a01, a02, a03);
|
---|
633 | };
|
---|
634 | template<typename R, typename HHH, typename T00>
|
---|
635 | static R apply(HHH& m00, HHH& a01, T00& a02, HHH& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
636 | typedef R (*T)(HHH&, HHH&, T00&, HHH&);
|
---|
637 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a01), Traits<HHH>::id(a03)));
|
---|
638 | if (!t) throw BadMultimethod();
|
---|
639 | return t(m00, a01, a02, a03);
|
---|
640 | };
|
---|
641 | template<typename R, typename HHH, typename T00>
|
---|
642 | static R apply(HHH& m00, HHH& a01, const T00& a02, HHH& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
643 | typedef R (*T)(HHH&, HHH&, const T00&, HHH&);
|
---|
644 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a01), Traits<HHH>::id(a03)));
|
---|
645 | if (!t) throw BadMultimethod();
|
---|
646 | return t(m00, a01, a02, a03);
|
---|
647 | };
|
---|
648 | template<typename R, typename HHH, typename T00>
|
---|
649 | static R apply(HHH& m00, HHH& a01, HHH& a02, T00& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
650 | typedef R (*T)(HHH&, HHH&, HHH&, T00&);
|
---|
651 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a01), Traits<HHH>::id(a02)));
|
---|
652 | if (!t) throw BadMultimethod();
|
---|
653 | return t(m00, a01, a02, a03);
|
---|
654 | };
|
---|
655 | template<typename R, typename HHH, typename T00>
|
---|
656 | static R apply(HHH& m00, HHH& a01, HHH& a02, const T00& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
657 | typedef R (*T)(HHH&, HHH&, HHH&, const T00&);
|
---|
658 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a01), Traits<HHH>::id(a02)));
|
---|
659 | if (!t) throw BadMultimethod();
|
---|
660 | return t(m00, a01, a02, a03);
|
---|
661 | };
|
---|
662 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
663 | static R apply(T00& m00, T01& a01, HHH& a02, HHH& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
664 | typedef R (*T)(T00&, T01&, HHH&, HHH&);
|
---|
665 | T t(find<T>(Traits<HHH>::id(a02), Traits<HHH>::id(a03)));
|
---|
666 | if (!t) throw BadMultimethod();
|
---|
667 | return t(m00, a01, a02, a03);
|
---|
668 | };
|
---|
669 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
670 | static R apply(const T00& m00, T01& a01, HHH& a02, HHH& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
671 | typedef R (*T)(const T00&, T01&, HHH&, HHH&);
|
---|
672 | T t(find<T>(Traits<HHH>::id(a02), Traits<HHH>::id(a03)));
|
---|
673 | if (!t) throw BadMultimethod();
|
---|
674 | return t(m00, a01, a02, a03);
|
---|
675 | };
|
---|
676 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
677 | static R apply(T00& m00, const T01& a01, HHH& a02, HHH& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
678 | typedef R (*T)(T00&, const T01&, HHH&, HHH&);
|
---|
679 | T t(find<T>(Traits<HHH>::id(a02), Traits<HHH>::id(a03)));
|
---|
680 | if (!t) throw BadMultimethod();
|
---|
681 | return t(m00, a01, a02, a03);
|
---|
682 | };
|
---|
683 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
684 | static R apply(const T00& m00, const T01& a01, HHH& a02, HHH& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
685 | typedef R (*T)(const T00&, const T01&, HHH&, HHH&);
|
---|
686 | T t(find<T>(Traits<HHH>::id(a02), Traits<HHH>::id(a03)));
|
---|
687 | if (!t) throw BadMultimethod();
|
---|
688 | return t(m00, a01, a02, a03);
|
---|
689 | };
|
---|
690 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
691 | static R apply(T00& m00, HHH& a01, T01& a02, HHH& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
692 | typedef R (*T)(T00&, HHH&, T01&, HHH&);
|
---|
693 | T t(find<T>(Traits<HHH>::id(a01), Traits<HHH>::id(a03)));
|
---|
694 | if (!t) throw BadMultimethod();
|
---|
695 | return t(m00, a01, a02, a03);
|
---|
696 | };
|
---|
697 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
698 | static R apply(const T00& m00, HHH& a01, T01& a02, HHH& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
699 | typedef R (*T)(const T00&, HHH&, T01&, HHH&);
|
---|
700 | T t(find<T>(Traits<HHH>::id(a01), Traits<HHH>::id(a03)));
|
---|
701 | if (!t) throw BadMultimethod();
|
---|
702 | return t(m00, a01, a02, a03);
|
---|
703 | };
|
---|
704 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
705 | static R apply(T00& m00, HHH& a01, const T01& a02, HHH& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
706 | typedef R (*T)(T00&, HHH&, const T01&, HHH&);
|
---|
707 | T t(find<T>(Traits<HHH>::id(a01), Traits<HHH>::id(a03)));
|
---|
708 | if (!t) throw BadMultimethod();
|
---|
709 | return t(m00, a01, a02, a03);
|
---|
710 | };
|
---|
711 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
712 | static R apply(const T00& m00, HHH& a01, const T01& a02, HHH& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
713 | typedef R (*T)(const T00&, HHH&, const T01&, HHH&);
|
---|
714 | T t(find<T>(Traits<HHH>::id(a01), Traits<HHH>::id(a03)));
|
---|
715 | if (!t) throw BadMultimethod();
|
---|
716 | return t(m00, a01, a02, a03);
|
---|
717 | };
|
---|
718 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
719 | static R apply(T00& m00, HHH& a01, HHH& a02, T01& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
720 | typedef R (*T)(T00&, HHH&, HHH&, T01&);
|
---|
721 | T t(find<T>(Traits<HHH>::id(a01), Traits<HHH>::id(a02)));
|
---|
722 | if (!t) throw BadMultimethod();
|
---|
723 | return t(m00, a01, a02, a03);
|
---|
724 | };
|
---|
725 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
726 | static R apply(const T00& m00, HHH& a01, HHH& a02, T01& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
727 | typedef R (*T)(const T00&, HHH&, HHH&, T01&);
|
---|
728 | T t(find<T>(Traits<HHH>::id(a01), Traits<HHH>::id(a02)));
|
---|
729 | if (!t) throw BadMultimethod();
|
---|
730 | return t(m00, a01, a02, a03);
|
---|
731 | };
|
---|
732 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
733 | static R apply(T00& m00, HHH& a01, HHH& a02, const T01& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
734 | typedef R (*T)(T00&, HHH&, HHH&, const T01&);
|
---|
735 | T t(find<T>(Traits<HHH>::id(a01), Traits<HHH>::id(a02)));
|
---|
736 | if (!t) throw BadMultimethod();
|
---|
737 | return t(m00, a01, a02, a03);
|
---|
738 | };
|
---|
739 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
740 | static R apply(const T00& m00, HHH& a01, HHH& a02, const T01& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
741 | typedef R (*T)(const T00&, HHH&, HHH&, const T01&);
|
---|
742 | T t(find<T>(Traits<HHH>::id(a01), Traits<HHH>::id(a02)));
|
---|
743 | if (!t) throw BadMultimethod();
|
---|
744 | return t(m00, a01, a02, a03);
|
---|
745 | };
|
---|
746 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
747 | static R apply(HHH& m00, T00& a01, T01& a02, HHH& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
748 | typedef R (*T)(HHH&, T00&, T01&, HHH&);
|
---|
749 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a03)));
|
---|
750 | if (!t) throw BadMultimethod();
|
---|
751 | return t(m00, a01, a02, a03);
|
---|
752 | };
|
---|
753 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
754 | static R apply(HHH& m00, const T00& a01, T01& a02, HHH& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
755 | typedef R (*T)(HHH&, const T00&, T01&, HHH&);
|
---|
756 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a03)));
|
---|
757 | if (!t) throw BadMultimethod();
|
---|
758 | return t(m00, a01, a02, a03);
|
---|
759 | };
|
---|
760 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
761 | static R apply(HHH& m00, T00& a01, const T01& a02, HHH& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
762 | typedef R (*T)(HHH&, T00&, const T01&, HHH&);
|
---|
763 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a03)));
|
---|
764 | if (!t) throw BadMultimethod();
|
---|
765 | return t(m00, a01, a02, a03);
|
---|
766 | };
|
---|
767 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
768 | static R apply(HHH& m00, const T00& a01, const T01& a02, HHH& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
769 | typedef R (*T)(HHH&, const T00&, const T01&, HHH&);
|
---|
770 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a03)));
|
---|
771 | if (!t) throw BadMultimethod();
|
---|
772 | return t(m00, a01, a02, a03);
|
---|
773 | };
|
---|
774 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
775 | static R apply(HHH& m00, T00& a01, HHH& a02, T01& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
776 | typedef R (*T)(HHH&, T00&, HHH&, T01&);
|
---|
777 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a02)));
|
---|
778 | if (!t) throw BadMultimethod();
|
---|
779 | return t(m00, a01, a02, a03);
|
---|
780 | };
|
---|
781 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
782 | static R apply(HHH& m00, const T00& a01, HHH& a02, T01& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
783 | typedef R (*T)(HHH&, const T00&, HHH&, T01&);
|
---|
784 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a02)));
|
---|
785 | if (!t) throw BadMultimethod();
|
---|
786 | return t(m00, a01, a02, a03);
|
---|
787 | };
|
---|
788 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
789 | static R apply(HHH& m00, T00& a01, HHH& a02, const T01& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
790 | typedef R (*T)(HHH&, T00&, HHH&, const T01&);
|
---|
791 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a02)));
|
---|
792 | if (!t) throw BadMultimethod();
|
---|
793 | return t(m00, a01, a02, a03);
|
---|
794 | };
|
---|
795 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
796 | static R apply(HHH& m00, const T00& a01, HHH& a02, const T01& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
797 | typedef R (*T)(HHH&, const T00&, HHH&, const T01&);
|
---|
798 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a02)));
|
---|
799 | if (!t) throw BadMultimethod();
|
---|
800 | return t(m00, a01, a02, a03);
|
---|
801 | };
|
---|
802 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
803 | static R apply(HHH& m00, HHH& a01, T00& a02, T01& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
804 | typedef R (*T)(HHH&, HHH&, T00&, T01&);
|
---|
805 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a01)));
|
---|
806 | if (!t) throw BadMultimethod();
|
---|
807 | return t(m00, a01, a02, a03);
|
---|
808 | };
|
---|
809 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
810 | static R apply(HHH& m00, HHH& a01, const T00& a02, T01& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
811 | typedef R (*T)(HHH&, HHH&, const T00&, T01&);
|
---|
812 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a01)));
|
---|
813 | if (!t) throw BadMultimethod();
|
---|
814 | return t(m00, a01, a02, a03);
|
---|
815 | };
|
---|
816 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
817 | static R apply(HHH& m00, HHH& a01, T00& a02, const T01& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
818 | typedef R (*T)(HHH&, HHH&, T00&, const T01&);
|
---|
819 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a01)));
|
---|
820 | if (!t) throw BadMultimethod();
|
---|
821 | return t(m00, a01, a02, a03);
|
---|
822 | };
|
---|
823 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
824 | static R apply(HHH& m00, HHH& a01, const T00& a02, const T01& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
825 | typedef R (*T)(HHH&, HHH&, const T00&, const T01&);
|
---|
826 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a01)));
|
---|
827 | if (!t) throw BadMultimethod();
|
---|
828 | return t(m00, a01, a02, a03);
|
---|
829 | };
|
---|
830 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
831 | static R apply(HHH& m00, T00& a01, T01& a02, T02& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
832 | typedef R (*T)(HHH&, T00&, T01&, T02&);
|
---|
833 | T t(find<T>(Traits<HHH>::id(m00)));
|
---|
834 | if (!t) throw BadMultimethod();
|
---|
835 | return t(m00, a01, a02, a03);
|
---|
836 | };
|
---|
837 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
838 | static R apply(HHH& m00, const T00& a01, T01& a02, T02& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
839 | typedef R (*T)(HHH&, const T00&, T01&, T02&);
|
---|
840 | T t(find<T>(Traits<HHH>::id(m00)));
|
---|
841 | if (!t) throw BadMultimethod();
|
---|
842 | return t(m00, a01, a02, a03);
|
---|
843 | };
|
---|
844 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
845 | static R apply(HHH& m00, T00& a01, const T01& a02, T02& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
846 | typedef R (*T)(HHH&, T00&, const T01&, T02&);
|
---|
847 | T t(find<T>(Traits<HHH>::id(m00)));
|
---|
848 | if (!t) throw BadMultimethod();
|
---|
849 | return t(m00, a01, a02, a03);
|
---|
850 | };
|
---|
851 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
852 | static R apply(HHH& m00, T00& a01, T01& a02, const T02& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
853 | typedef R (*T)(HHH&, T00&, T01&, const T02&);
|
---|
854 | T t(find<T>(Traits<HHH>::id(m00)));
|
---|
855 | if (!t) throw BadMultimethod();
|
---|
856 | return t(m00, a01, a02, a03);
|
---|
857 | };
|
---|
858 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
859 | static R apply(HHH& m00, const T00& a01, const T01& a02, T02& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
860 | typedef R (*T)(HHH&, const T00&, const T01&, T02&);
|
---|
861 | T t(find<T>(Traits<HHH>::id(m00)));
|
---|
862 | if (!t) throw BadMultimethod();
|
---|
863 | return t(m00, a01, a02, a03);
|
---|
864 | };
|
---|
865 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
866 | static R apply(HHH& m00, const T00& a01, T01& a02, const T02& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
867 | typedef R (*T)(HHH&, const T00&, T01&, const T02&);
|
---|
868 | T t(find<T>(Traits<HHH>::id(m00)));
|
---|
869 | if (!t) throw BadMultimethod();
|
---|
870 | return t(m00, a01, a02, a03);
|
---|
871 | };
|
---|
872 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
873 | static R apply(HHH& m00, T00& a01, const T01& a02, const T02& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
874 | typedef R (*T)(HHH&, T00&, const T01&, const T02&);
|
---|
875 | T t(find<T>(Traits<HHH>::id(m00)));
|
---|
876 | if (!t) throw BadMultimethod();
|
---|
877 | return t(m00, a01, a02, a03);
|
---|
878 | };
|
---|
879 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
880 | static R apply(HHH& m00, const T00& a01, const T01& a02, const T02& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
881 | typedef R (*T)(HHH&, const T00&, const T01&, const T02&);
|
---|
882 | T t(find<T>(Traits<HHH>::id(m00)));
|
---|
883 | if (!t) throw BadMultimethod();
|
---|
884 | return t(m00, a01, a02, a03);
|
---|
885 | };
|
---|
886 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
887 | static R apply(T00& m00, HHH& a01, T01& a02, T02& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
888 | typedef R (*T)(T00&, HHH&, T01&, T02&);
|
---|
889 | T t(find<T>(Traits<HHH>::id(a01)));
|
---|
890 | if (!t) throw BadMultimethod();
|
---|
891 | return t(m00, a01, a02, a03);
|
---|
892 | };
|
---|
893 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
894 | static R apply(const T00& m00, HHH& a01, T01& a02, T02& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
895 | typedef R (*T)(const T00&, HHH&, T01&, T02&);
|
---|
896 | T t(find<T>(Traits<HHH>::id(a01)));
|
---|
897 | if (!t) throw BadMultimethod();
|
---|
898 | return t(m00, a01, a02, a03);
|
---|
899 | };
|
---|
900 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
901 | static R apply(T00& m00, HHH& a01, const T01& a02, T02& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
902 | typedef R (*T)(T00&, HHH&, const T01&, T02&);
|
---|
903 | T t(find<T>(Traits<HHH>::id(a01)));
|
---|
904 | if (!t) throw BadMultimethod();
|
---|
905 | return t(m00, a01, a02, a03);
|
---|
906 | };
|
---|
907 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
908 | static R apply(T00& m00, HHH& a01, T01& a02, const T02& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
909 | typedef R (*T)(T00&, HHH&, T01&, const T02&);
|
---|
910 | T t(find<T>(Traits<HHH>::id(a01)));
|
---|
911 | if (!t) throw BadMultimethod();
|
---|
912 | return t(m00, a01, a02, a03);
|
---|
913 | };
|
---|
914 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
915 | static R apply(const T00& m00, HHH& a01, const T01& a02, T02& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
916 | typedef R (*T)(const T00&, HHH&, const T01&, T02&);
|
---|
917 | T t(find<T>(Traits<HHH>::id(a01)));
|
---|
918 | if (!t) throw BadMultimethod();
|
---|
919 | return t(m00, a01, a02, a03);
|
---|
920 | };
|
---|
921 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
922 | static R apply(const T00& m00, HHH& a01, T01& a02, const T02& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
923 | typedef R (*T)(const T00&, HHH&, T01&, const T02&);
|
---|
924 | T t(find<T>(Traits<HHH>::id(a01)));
|
---|
925 | if (!t) throw BadMultimethod();
|
---|
926 | return t(m00, a01, a02, a03);
|
---|
927 | };
|
---|
928 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
929 | static R apply(const T00& m00, HHH& a01, const T01& a02, const T02& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
930 | typedef R (*T)(const T00&, HHH&, const T01&, const T02&);
|
---|
931 | T t(find<T>(Traits<HHH>::id(a01)));
|
---|
932 | if (!t) throw BadMultimethod();
|
---|
933 | return t(m00, a01, a02, a03);
|
---|
934 | };
|
---|
935 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
936 | static R apply(T00& m00, T01& a01, HHH& a02, T02& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
937 | typedef R (*T)(T00&, T01&, HHH&, T02&);
|
---|
938 | T t(find<T>(Traits<HHH>::id(a02)));
|
---|
939 | if (!t) throw BadMultimethod();
|
---|
940 | return t(m00, a01, a02, a03);
|
---|
941 | };
|
---|
942 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
943 | static R apply(const T00& m00, T01& a01, HHH& a02, T02& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
944 | typedef R (*T)(const T00&, T01&, HHH&, T02&);
|
---|
945 | T t(find<T>(Traits<HHH>::id(a02)));
|
---|
946 | if (!t) throw BadMultimethod();
|
---|
947 | return t(m00, a01, a02, a03);
|
---|
948 | };
|
---|
949 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
950 | static R apply(T00& m00, const T01& a01, HHH& a02, T02& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
951 | typedef R (*T)(T00&, const T01&, HHH&, T02&);
|
---|
952 | T t(find<T>(Traits<HHH>::id(a02)));
|
---|
953 | if (!t) throw BadMultimethod();
|
---|
954 | return t(m00, a01, a02, a03);
|
---|
955 | };
|
---|
956 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
957 | static R apply(T00& m00, T01& a01, HHH& a02, const T02& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
958 | typedef R (*T)(T00&, T01&, HHH&, const T02&);
|
---|
959 | T t(find<T>(Traits<HHH>::id(a02)));
|
---|
960 | if (!t) throw BadMultimethod();
|
---|
961 | return t(m00, a01, a02, a03);
|
---|
962 | };
|
---|
963 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
964 | static R apply(const T00& m00, const T01& a01, HHH& a02, T02& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
965 | typedef R (*T)(const T00&, const T01&, HHH&, T02&);
|
---|
966 | T t(find<T>(Traits<HHH>::id(a02)));
|
---|
967 | if (!t) throw BadMultimethod();
|
---|
968 | return t(m00, a01, a02, a03);
|
---|
969 | };
|
---|
970 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
971 | static R apply(const T00& m00, T01& a01, HHH& a02, const T02& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
972 | typedef R (*T)(const T00&, T01&, HHH&, const T02&);
|
---|
973 | T t(find<T>(Traits<HHH>::id(a02)));
|
---|
974 | if (!t) throw BadMultimethod();
|
---|
975 | return t(m00, a01, a02, a03);
|
---|
976 | };
|
---|
977 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
978 | static R apply(T00& m00, const T01& a01, HHH& a02, const T02& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
979 | typedef R (*T)(T00&, const T01&, HHH&, const T02&);
|
---|
980 | T t(find<T>(Traits<HHH>::id(a02)));
|
---|
981 | if (!t) throw BadMultimethod();
|
---|
982 | return t(m00, a01, a02, a03);
|
---|
983 | };
|
---|
984 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
985 | static R apply(const T00& m00, const T01& a01, HHH& a02, const T02& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
986 | typedef R (*T)(const T00&, const T01&, HHH&, const T02&);
|
---|
987 | T t(find<T>(Traits<HHH>::id(a02)));
|
---|
988 | if (!t) throw BadMultimethod();
|
---|
989 | return t(m00, a01, a02, a03);
|
---|
990 | };
|
---|
991 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
992 | static R apply(T00& m00, T01& a01, T02& a02, HHH& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
993 | typedef R (*T)(T00&, T01&, T02&, HHH&);
|
---|
994 | T t(find<T>(Traits<HHH>::id(a03)));
|
---|
995 | if (!t) throw BadMultimethod();
|
---|
996 | return t(m00, a01, a02, a03);
|
---|
997 | };
|
---|
998 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
999 | static R apply(const T00& m00, T01& a01, T02& a02, HHH& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
1000 | typedef R (*T)(const T00&, T01&, T02&, HHH&);
|
---|
1001 | T t(find<T>(Traits<HHH>::id(a03)));
|
---|
1002 | if (!t) throw BadMultimethod();
|
---|
1003 | return t(m00, a01, a02, a03);
|
---|
1004 | };
|
---|
1005 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
1006 | static R apply(T00& m00, const T01& a01, T02& a02, HHH& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
1007 | typedef R (*T)(T00&, const T01&, T02&, HHH&);
|
---|
1008 | T t(find<T>(Traits<HHH>::id(a03)));
|
---|
1009 | if (!t) throw BadMultimethod();
|
---|
1010 | return t(m00, a01, a02, a03);
|
---|
1011 | };
|
---|
1012 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
1013 | static R apply(T00& m00, T01& a01, const T02& a02, HHH& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
1014 | typedef R (*T)(T00&, T01&, const T02&, HHH&);
|
---|
1015 | T t(find<T>(Traits<HHH>::id(a03)));
|
---|
1016 | if (!t) throw BadMultimethod();
|
---|
1017 | return t(m00, a01, a02, a03);
|
---|
1018 | };
|
---|
1019 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
1020 | static R apply(const T00& m00, const T01& a01, T02& a02, HHH& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
1021 | typedef R (*T)(const T00&, const T01&, T02&, HHH&);
|
---|
1022 | T t(find<T>(Traits<HHH>::id(a03)));
|
---|
1023 | if (!t) throw BadMultimethod();
|
---|
1024 | return t(m00, a01, a02, a03);
|
---|
1025 | };
|
---|
1026 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
1027 | static R apply(const T00& m00, T01& a01, const T02& a02, HHH& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
1028 | typedef R (*T)(const T00&, T01&, const T02&, HHH&);
|
---|
1029 | T t(find<T>(Traits<HHH>::id(a03)));
|
---|
1030 | if (!t) throw BadMultimethod();
|
---|
1031 | return t(m00, a01, a02, a03);
|
---|
1032 | };
|
---|
1033 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
1034 | static R apply(T00& m00, const T01& a01, const T02& a02, HHH& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
1035 | typedef R (*T)(T00&, const T01&, const T02&, HHH&);
|
---|
1036 | T t(find<T>(Traits<HHH>::id(a03)));
|
---|
1037 | if (!t) throw BadMultimethod();
|
---|
1038 | return t(m00, a01, a02, a03);
|
---|
1039 | };
|
---|
1040 | template<typename R, typename HHH, typename T00, typename T01, typename T02, typename T03>
|
---|
1041 | static R apply(const T00& m00, const T01& a01, const T02& a02, HHH& a03, typename Traits<HHH>::index_type* = 0) {
|
---|
1042 | typedef R (*T)(const T00&, const T01&, const T02&, HHH&);
|
---|
1043 | T t(find<T>(Traits<HHH>::id(a03)));
|
---|
1044 | if (!t) throw BadMultimethod();
|
---|
1045 | return t(m00, a01, a02, a03);
|
---|
1046 | };
|
---|
1047 | /*private: ////////////////////////////////////////////////////////////////////////
|
---|
1048 | template<typename R, bool return_value, typename HHH, typename M00, typename A01, typename A02, typename A03, typename A04> struct filter04 {
|
---|
1049 | static R trampoline(HHH& m00, HHH& a01, HHH& a02, HHH& a03, HHH& a04) { return Traits<HHH>::cast<M00&>(m00)(Traits<HHH>::cast<A01&>(a01), Traits<HHH>::cast<A02&>(a02), Traits<HHH>::cast<A02&>(a03), Traits<HHH>::cast<A02&>(a04)); };
|
---|
1050 | static R trampoline(M00& m00, HHH& a01, HHH& a02, HHH& a03, HHH& a04) { return m00(Traits<HHH>::cast<A01&>(a01), Traits<HHH>::cast<A02&>(a02), Traits<HHH>::cast<A02&>(a03), Traits<HHH>::cast<A02&>(a04)); };
|
---|
1051 | static R trampoline(HHH& m00, A01& a01, HHH& a02, HHH& a03, HHH& a04) { return Traits<HHH>::cast<M00&>(m00)(a01, Traits<HHH>::cast<A02&>(a02), Traits<HHH>::cast<A02&>(a03), Traits<HHH>::cast<A02&>(a04)); };
|
---|
1052 | static R trampoline(HHH& m00, HHH& a01, A02& a02, HHH& a03, HHH& a04) { return Traits<HHH>::cast<M00&>(m00)(Traits<HHH>::cast<A01&>(a01), a02, Traits<HHH>::cast<A02&>(a03), Traits<HHH>::cast<A02&>(a04)); };
|
---|
1053 | static R trampoline(HHH& m00, HHH& a01, HHH& a02, A03& a03, HHH& a04) { return Traits<HHH>::cast<M00&>(m00)(Traits<HHH>::cast<A01&>(a01), Traits<HHH>::cast<A02&>(a02), a03, Traits<HHH>::cast<A02&>(a04)); };
|
---|
1054 | static R trampoline(HHH& m00, HHH& a01, HHH& a02, HHH& a03, A04& a04) { return Traits<HHH>::cast<M00&>(m00)(Traits<HHH>::cast<A01&>(a01), Traits<HHH>::cast<A02&>(a02), Traits<HHH>::cast<A02&>(a03), a04); };
|
---|
1055 | static R trampoline(M00& m00, A01& a01, HHH& a02, HHH& a03, HHH& a04) { return m00(a01, Traits<HHH>::cast<A02&>(a02), Traits<HHH>::cast<A02&>(a03), Traits<HHH>::cast<A02&>(a04)); };
|
---|
1056 | static R trampoline(M00& m00, HHH& a01, A02& a02, HHH& a03, HHH& a04) { return m00(Traits<HHH>::cast<A01&>(a01), a02, Traits<HHH>::cast<A02&>(a03), Traits<HHH>::cast<A02&>(a04)); };
|
---|
1057 | static R trampoline(M00& m00, HHH& a01, HHH& a02, A03& a03, HHH& a04) { return m00(Traits<HHH>::cast<A01&>(a01), Traits<HHH>::cast<A02&>(a02), a03, Traits<HHH>::cast<A02&>(a04)); };
|
---|
1058 | static R trampoline(M00& m00, HHH& a01, HHH& a02, HHH& a03, A04& a04) { return m00(Traits<HHH>::cast<A01&>(a01), Traits<HHH>::cast<A02&>(a02), Traits<HHH>::cast<A02&>(a03), a04); };
|
---|
1059 | static R trampoline(HHH& m00, A01& a01, A02& a02, HHH& a03, HHH& a04) { return Traits<HHH>::cast<M00&>(m00)(a01, a02, Traits<HHH>::cast<A02&>(a03), Traits<HHH>::cast<A02&>(a04)); };
|
---|
1060 | static R trampoline(HHH& m00, A01& a01, HHH& a02, A03& a03, HHH& a04) { return Traits<HHH>::cast<M00&>(m00)(a01, Traits<HHH>::cast<A02&>(a02), a03, Traits<HHH>::cast<A02&>(a04)); };
|
---|
1061 | static R trampoline(HHH& m00, A01& a01, HHH& a02, HHH& a03, A04& a04) { return Traits<HHH>::cast<M00&>(m00)(a01, Traits<HHH>::cast<A02&>(a02), Traits<HHH>::cast<A02&>(a03), a04); };
|
---|
1062 | static R trampoline(HHH& m00, HHH& a01, A02& a02, A03& a03, HHH& a04) { return Traits<HHH>::cast<M00&>(m00)(Traits<HHH>::cast<A01&>(a01), a02, a03, Traits<HHH>::cast<A02&>(a04)); };
|
---|
1063 | static R trampoline(HHH& m00, HHH& a01, A02& a02, HHH& a03, A04& a04) { return Traits<HHH>::cast<M00&>(m00)(Traits<HHH>::cast<A01&>(a01), a02, Traits<HHH>::cast<A02&>(a03), a04); };
|
---|
1064 | static R trampoline(HHH& m00, HHH& a01, HHH& a02, A03& a03, A04& a04) { return Traits<HHH>::cast<M00&>(m00)(Traits<HHH>::cast<A01&>(a01), Traits<HHH>::cast<A02&>(a02), a03, a04); };
|
---|
1065 | static R trampoline(M00& m00, A01& a01, A02& a02, HHH& a03, HHH& a04) { return m00(a01, a02, Traits<HHH>::cast<A02&>(a03), Traits<HHH>::cast<A02&>(a04)); };
|
---|
1066 | static R trampoline(M00& m00, A01& a01, HHH& a02, A03& a03, HHH& a04) { return m00(a01, Traits<HHH>::cast<A02&>(a02), a03, Traits<HHH>::cast<A02&>(a04)); };
|
---|
1067 | static R trampoline(M00& m00, A01& a01, HHH& a02, HHH& a03, A04& a04) { return m00(a01, Traits<HHH>::cast<A02&>(a02), Traits<HHH>::cast<A02&>(a03), a04); };
|
---|
1068 | static R trampoline(HHH& m00, A01& a01, A02& a02, A03& a03, HHH& a04) { return Traits<HHH>::cast<M00&>(m00)(a01, a02, a03, Traits<HHH>::cast<A02&>(a04)); };
|
---|
1069 | static R trampoline(HHH& m00, A01& a01, A02& a02, HHH& a03, A04& a04) { return Traits<HHH>::cast<M00&>(m00)(a01, a02, Traits<HHH>::cast<A02&>(a03), a04); };
|
---|
1070 | static R trampoline(HHH& m00, HHH& a01, A02& a02, A03& a03, A04& a04) { return Traits<HHH>::cast<M00&>(m00)(Traits<HHH>::cast<A01&>(a01), a02, a03, a04); };
|
---|
1071 | static R trampoline(HHH& m00, A01& a01, A02& a02, A03& a03, A04& a04) { return Traits<HHH>::cast<M00&>(m00)(a01, a02, a03, a04); };
|
---|
1072 | static R trampoline(M00& m00, HHH& a01, A02& a02, A03& a03, A04& a04) { return m00(Traits<HHH>::cast<A01&>(a01), a02, a03, a04); };
|
---|
1073 | static R trampoline(M00& m00, A01& a01, HHH& a02, A03& a03, A04& a04) { return m00(a01, Traits<HHH>::cast<A02&>(a02), a03, a04); };
|
---|
1074 | static R trampoline(M00& m00, A01& a01, A02& a02, HHH& a03, A04& a04) { return m00(a01, a02, Traits<HHH>::cast<A02&>(a03), a04); };
|
---|
1075 | static R trampoline(M00& m00, A01& a01, A02& a02, A03& a03, HHH& a04) { return m00(a01, a02, a03, Traits<HHH>::cast<A02&>(a04)); };
|
---|
1076 | };
|
---|
1077 | template<typename R, typename HHH, typename M00, typename A01, typename A02, typename A03, typename A04> struct filter04<R, false, HHH, M00, A01, A02, A03, A04> {
|
---|
1078 | static R trampoline(HHH& m00, HHH& a01, HHH& a02, HHH& a03, HHH& a04) { Traits<HHH>::cast<M00&>(m00)(Traits<HHH>::cast<A01&>(a01), Traits<HHH>::cast<A02&>(a02), Traits<HHH>::cast<A02&>(a03), Traits<HHH>::cast<A02&>(a04)); return R(); };
|
---|
1079 | static R trampoline(M00& m00, HHH& a01, HHH& a02, HHH& a03, HHH& a04) { m00(Traits<HHH>::cast<A01&>(a01), Traits<HHH>::cast<A02&>(a02), Traits<HHH>::cast<A02&>(a03), Traits<HHH>::cast<A02&>(a04)); return R(); };
|
---|
1080 | static R trampoline(HHH& m00, A01& a01, HHH& a02, HHH& a03, HHH& a04) { Traits<HHH>::cast<M00&>(m00)(a01, Traits<HHH>::cast<A02&>(a02), Traits<HHH>::cast<A02&>(a03), Traits<HHH>::cast<A02&>(a04)); return R(); };
|
---|
1081 | static R trampoline(HHH& m00, HHH& a01, A02& a02, HHH& a03, HHH& a04) { Traits<HHH>::cast<M00&>(m00)(Traits<HHH>::cast<A01&>(a01), a02, Traits<HHH>::cast<A02&>(a03), Traits<HHH>::cast<A02&>(a04)); return R(); };
|
---|
1082 | static R trampoline(HHH& m00, HHH& a01, HHH& a02, A03& a03, HHH& a04) { Traits<HHH>::cast<M00&>(m00)(Traits<HHH>::cast<A01&>(a01), Traits<HHH>::cast<A02&>(a02), a03, Traits<HHH>::cast<A02&>(a04)); return R(); };
|
---|
1083 | static R trampoline(HHH& m00, HHH& a01, HHH& a02, HHH& a03, A04& a04) { Traits<HHH>::cast<M00&>(m00)(Traits<HHH>::cast<A01&>(a01), Traits<HHH>::cast<A02&>(a02), Traits<HHH>::cast<A02&>(a03), a04); return R(); };
|
---|
1084 | static R trampoline(M00& m00, A01& a01, HHH& a02, HHH& a03, HHH& a04) { m00(a01, Traits<HHH>::cast<A02&>(a02), Traits<HHH>::cast<A02&>(a03), Traits<HHH>::cast<A02&>(a04)); return R(); };
|
---|
1085 | static R trampoline(M00& m00, HHH& a01, A02& a02, HHH& a03, HHH& a04) { m00(Traits<HHH>::cast<A01&>(a01), a02, Traits<HHH>::cast<A02&>(a03), Traits<HHH>::cast<A02&>(a04)); return R(); };
|
---|
1086 | static R trampoline(M00& m00, HHH& a01, HHH& a02, A03& a03, HHH& a04) { m00(Traits<HHH>::cast<A01&>(a01), Traits<HHH>::cast<A02&>(a02), a03, Traits<HHH>::cast<A02&>(a04)); return R(); };
|
---|
1087 | static R trampoline(M00& m00, HHH& a01, HHH& a02, HHH& a03, A04& a04) { m00(Traits<HHH>::cast<A01&>(a01), Traits<HHH>::cast<A02&>(a02), Traits<HHH>::cast<A02&>(a03), a04); return R(); };
|
---|
1088 | static R trampoline(HHH& m00, A01& a01, A02& a02, HHH& a03, HHH& a04) { Traits<HHH>::cast<M00&>(m00)(a01, a02, Traits<HHH>::cast<A02&>(a03), Traits<HHH>::cast<A02&>(a04)); return R(); };
|
---|
1089 | static R trampoline(HHH& m00, A01& a01, HHH& a02, A03& a03, HHH& a04) { Traits<HHH>::cast<M00&>(m00)(a01, Traits<HHH>::cast<A02&>(a02), a03, Traits<HHH>::cast<A02&>(a04)); return R(); };
|
---|
1090 | static R trampoline(HHH& m00, A01& a01, HHH& a02, HHH& a03, A04& a04) { Traits<HHH>::cast<M00&>(m00)(a01, Traits<HHH>::cast<A02&>(a02), Traits<HHH>::cast<A02&>(a03), a04); return R(); };
|
---|
1091 | static R trampoline(HHH& m00, HHH& a01, A02& a02, A03& a03, HHH& a04) { Traits<HHH>::cast<M00&>(m00)(Traits<HHH>::cast<A01&>(a01), a02, a03, Traits<HHH>::cast<A02&>(a04)); return R(); };
|
---|
1092 | static R trampoline(HHH& m00, HHH& a01, A02& a02, HHH& a03, A04& a04) { Traits<HHH>::cast<M00&>(m00)(Traits<HHH>::cast<A01&>(a01), a02, Traits<HHH>::cast<A02&>(a03), a04); return R(); };
|
---|
1093 | static R trampoline(HHH& m00, HHH& a01, HHH& a02, A03& a03, A04& a04) { Traits<HHH>::cast<M00&>(m00)(Traits<HHH>::cast<A01&>(a01), Traits<HHH>::cast<A02&>(a02), a03, a04); return R(); };
|
---|
1094 | static R trampoline(M00& m00, A01& a01, A02& a02, HHH& a03, HHH& a04) { m00(a01, a02, Traits<HHH>::cast<A02&>(a03), Traits<HHH>::cast<A02&>(a04)); return R(); };
|
---|
1095 | static R trampoline(M00& m00, A01& a01, HHH& a02, A03& a03, HHH& a04) { m00(a01, Traits<HHH>::cast<A02&>(a02), a03, Traits<HHH>::cast<A02&>(a04)); return R(); };
|
---|
1096 | static R trampoline(M00& m00, A01& a01, HHH& a02, HHH& a03, A04& a04) { m00(a01, Traits<HHH>::cast<A02&>(a02), Traits<HHH>::cast<A02&>(a03), a04); return R(); };
|
---|
1097 | static R trampoline(HHH& m00, A01& a01, A02& a02, A03& a03, HHH& a04) { Traits<HHH>::cast<M00&>(m00)(a01, a02, a03, Traits<HHH>::cast<A02&>(a04)); return R(); };
|
---|
1098 | static R trampoline(HHH& m00, A01& a01, A02& a02, HHH& a03, A04& a04) { Traits<HHH>::cast<M00&>(m00)(a01, a02, Traits<HHH>::cast<A02&>(a03), a04); return R(); };
|
---|
1099 | static R trampoline(HHH& m00, HHH& a01, A02& a02, A03& a03, A04& a04) { Traits<HHH>::cast<M00&>(m00)(Traits<HHH>::cast<A01&>(a01), a02, a03, a04); return R(); };
|
---|
1100 | static R trampoline(HHH& m00, A01& a01, A02& a02, A03& a03, A04& a04) { Traits<HHH>::cast<M00&>(m00)(a01, a02, a03, a04); return R(); };
|
---|
1101 | static R trampoline(M00& m00, HHH& a01, A02& a02, A03& a03, A04& a04) { m00(Traits<HHH>::cast<A01&>(a01), a02, a03, a04); return R(); };
|
---|
1102 | static R trampoline(M00& m00, A01& a01, HHH& a02, A03& a03, A04& a04) { m00(a01, Traits<HHH>::cast<A02&>(a02), a03, a04); return R(); };
|
---|
1103 | static R trampoline(M00& m00, A01& a01, A02& a02, HHH& a03, A04& a04) { m00(a01, a02, Traits<HHH>::cast<A02&>(a03), a04); return R(); };
|
---|
1104 | static R trampoline(M00& m00, A01& a01, A02& a02, A03& a03, HHH& a04) { m00(a01, a02, a03, Traits<HHH>::cast<A02&>(a04)); return R(); };
|
---|
1105 | };
|
---|
1106 | public:
|
---|
1107 | template<typename R, typename HHH, typename M00, typename A01, typename A02, typename A03, typename A04>
|
---|
1108 | static bool entry() {
|
---|
1109 | struct Local {
|
---|
1110 | static R trampoline(HHH& m00, HHH& a01, HHH& a02, HHH& a03) {
|
---|
1111 | return filter04<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02, A03, A04)>::value), HHH, M00, A01, A02, A03, A04>::trampoline(m00, a01, a02, a03, a04);
|
---|
1112 | };
|
---|
1113 | static R trampoline(M00& m00, HHH& a01, HHH& a02, HHH& a03) {
|
---|
1114 | return filter04<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02, A03, A04)>::value), HHH, M00, A01, A02, A03, A04>::trampoline(m00, a01, a02, a03, a04);
|
---|
1115 | };
|
---|
1116 | static R trampoline(HHH& m00, A01& a01, HHH& a02, HHH& a03) {
|
---|
1117 | return filter04<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02, A03, A04)>::value), HHH, M00, A01, A02, A03, A04>::trampoline(m00, a01, a02, a03, a04);
|
---|
1118 | };
|
---|
1119 | static R trampoline(HHH& m00, HHH& a01, A02& a02, HHH& a03) {
|
---|
1120 | return filter04<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02, A03, A04)>::value), HHH, M00, A01, A02, A03, A04>::trampoline(m00, a01, a02, a03, a04);
|
---|
1121 | };
|
---|
1122 | static R trampoline(HHH& m00, HHH& a01, HHH& a02, A03& a03) {
|
---|
1123 | return filter04<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02, A03, A04)>::value), HHH, M00, A01, A02, A03, A04>::trampoline(m00, a01, a02, a03, a04);
|
---|
1124 | };
|
---|
1125 | static R trampoline(M00& m00, A01& a01, HHH& a02, HHH& a03) {
|
---|
1126 | return filter04<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02, A03, A04)>::value), HHH, M00, A01, A02, A03, A04>::trampoline(m00, a01, a02, a03, a04);
|
---|
1127 | };
|
---|
1128 | static R trampoline(M00& m00, HHH& a01, A02& a02, HHH& a03) {
|
---|
1129 | return filter04<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02, A03, A04)>::value), HHH, M00, A01, A02, A03, A04>::trampoline(m00, a01, a02, a03, a04);
|
---|
1130 | };
|
---|
1131 | static R trampoline(M00& m00, HHH& a01, HHH& a02, A03& a03) {
|
---|
1132 | return filter04<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02, A03, A04)>::value), HHH, M00, A01, A02, A03, A04>::trampoline(m00, a01, a02, a03, a04);
|
---|
1133 | };
|
---|
1134 | static R trampoline(HHH& m00, A01& a01, A02& a02, HHH& a03) {
|
---|
1135 | return filter04<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02, A03, A04)>::value), HHH, M00, A01, A02, A03, A04>::trampoline(m00, a01, a02, a03, a04);
|
---|
1136 | };
|
---|
1137 | static R trampoline(HHH& m00, A01& a01, HHH& a02, A03& a03) {
|
---|
1138 | return filter04<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02, A03, A04)>::value), HHH, M00, A01, A02, A03, A04>::trampoline(m00, a01, a02, a03, a04);
|
---|
1139 | };
|
---|
1140 | static R trampoline(HHH& m00, HHH& a01, A02& a02, A03& a03) {
|
---|
1141 | return filter04<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02, A03, A04)>::value), HHH, M00, A01, A02, A03, A04>::trampoline(m00, a01, a02, a03, a04);
|
---|
1142 | };
|
---|
1143 | static R trampoline(HHH& m00, A01& a01, A02& a02, A03& a03) {
|
---|
1144 | return filter04<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02, A03, A04)>::value), HHH, M00, A01, A02, A03, A04>::trampoline(m00, a01, a02, a03, a04);
|
---|
1145 | };
|
---|
1146 | static R trampoline(M00& m00, HHH& a01, A02& a02, A03& a03) {
|
---|
1147 | return filter04<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02, A03, A04)>::value), HHH, M00, A01, A02, A03, A04>::trampoline(m00, a01, a02, a03, a04);
|
---|
1148 | };
|
---|
1149 | static R trampoline(M00& m00, A01& a01, HHH& a02, A03& a03) {
|
---|
1150 | return filter04<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02, A03, A04)>::value), HHH, M00, A01, A02, A03, A04>::trampoline(m00, a01, a02, a03, a04);
|
---|
1151 | };
|
---|
1152 | static R trampoline(M00& m00, A01& a01, A02& a02, HHH& a03) {
|
---|
1153 | return filter04<R, !(MemberFunctionChecker::is_call_possible<M00, void(A01, A02, A03, A04)>::value), HHH, M00, A01, A02, A03, A04>::trampoline(m00, a01, a02, a03, a04);
|
---|
1154 | };
|
---|
1155 | };
|
---|
1156 | typedef R (*T00)(HHH&, HHH&, HHH&, HHH&, HHH&); static bool t00((find<T00>(Traits<HHH>::id<M00>(), Traits<HHH>::id<A01>(), Traits<HHH>::id<A02>(), Traits<HHH>::id<A03>(), Traits<HHH>::id<A04>()) = &Local::trampoline) != 0);
|
---|
1157 | typedef R (*T01)(M00&, HHH&, HHH&, HHH&, HHH&); static bool t01((find<T00>(Traits<HHH>::id<A01>(), Traits<HHH>::id<A02>(), Traits<HHH>::id<A03>(), Traits<HHH>::id<A04>()) = &Local::trampoline) != 0);
|
---|
1158 | typedef R (*T02)(HHH&, A01&, HHH&, HHH&, HHH&); static bool t02((find<T00>(Traits<HHH>::id<M00>(), Traits<HHH>::id<A02>(), Traits<HHH>::id<A03>(), Traits<HHH>::id<A04>()) = &Local::trampoline) != 0);
|
---|
1159 | typedef R (*T03)(HHH&, HHH&, A02&, HHH&, HHH&); static bool t03((find<T00>(Traits<HHH>::id<M00>(), Traits<HHH>::id<A01>(), Traits<HHH>::id<A03>(), Traits<HHH>::id<A04>()) = &Local::trampoline) != 0);
|
---|
1160 | typedef R (*T04)(HHH&, HHH&, HHH&, A03&, HHH&); static bool t04((find<T00>(Traits<HHH>::id<M00>(), Traits<HHH>::id<A01>(), Traits<HHH>::id<A02>(), Traits<HHH>::id<A04>()) = &Local::trampoline) != 0);
|
---|
1161 | typedef R (*T05)(HHH&, HHH&, HHH&, HHH&, A04&); static bool t05((find<T00>(Traits<HHH>::id<M00>(), Traits<HHH>::id<A01>(), Traits<HHH>::id<A02>(), Traits<HHH>::id<A03>()) = &Local::trampoline) != 0);
|
---|
1162 | typedef R (*T06)(M00&, A01&, HHH&, HHH&, HHH&); static bool t06((find<T00>(Traits<HHH>::id<A02>(), Traits<HHH>::id<A03>(), Traits<HHH>::id<A04>()) = &Local::trampoline) != 0);
|
---|
1163 | typedef R (*T07)(M00&, HHH&, A02&, HHH&, HHH&); static bool t07((find<T00>(Traits<HHH>::id<A01>(), Traits<HHH>::id<A03>(), Traits<HHH>::id<A04>()) = &Local::trampoline) != 0);
|
---|
1164 | typedef R (*T08)(M00&, HHH&, HHH&, A03&, HHH&); static bool t08((find<T00>(Traits<HHH>::id<A01>(), Traits<HHH>::id<A02>(), Traits<HHH>::id<A04>()) = &Local::trampoline) != 0);
|
---|
1165 | typedef R (*T09)(M00&, HHH&, HHH&, HHH&, A04&); static bool t09((find<T00>(Traits<HHH>::id<A01>(), Traits<HHH>::id<A02>(), Traits<HHH>::id<A03>()) = &Local::trampoline) != 0);
|
---|
1166 | typedef R (*T0a)(HHH&, A01&, A02&, HHH&, HHH&); static bool t0a((find<T00>(Traits<HHH>::id<M00>(), Traits<HHH>::id<A03>(), Traits<HHH>::id<A04>()) = &Local::trampoline) != 0);
|
---|
1167 | typedef R (*T0b)(HHH&, A01&, HHH&, A03&, HHH&); static bool t0b((find<T00>(Traits<HHH>::id<M00>(), Traits<HHH>::id<A02>(), Traits<HHH>::id<A04>()) = &Local::trampoline) != 0);
|
---|
1168 | typedef R (*T0c)(HHH&, A01&, HHH&, HHH&, A04&); static bool t0c((find<T00>(Traits<HHH>::id<M00>(), Traits<HHH>::id<A02>(), Traits<HHH>::id<A03>()) = &Local::trampoline) != 0);
|
---|
1169 | typedef R (*T0d)(HHH&, HHH&, A02&, A03&, HHH&); static bool t0d((find<T00>(Traits<HHH>::id<M00>(), Traits<HHH>::id<A01>(), Traits<HHH>::id<A04>()) = &Local::trampoline) != 0);
|
---|
1170 | typedef R (*T0e)(HHH&, HHH&, A02&, HHH&, A04&); static bool t0e((find<T00>(Traits<HHH>::id<M00>(), Traits<HHH>::id<A01>(), Traits<HHH>::id<A03>()) = &Local::trampoline) != 0);
|
---|
1171 | typedef R (*T0f)(HHH&, HHH&, HHH&, A03&, A04&); static bool t0f((find<T00>(Traits<HHH>::id<M00>(), Traits<HHH>::id<A01>(), Traits<HHH>::id<A02>()) = &Local::trampoline) != 0);
|
---|
1172 | typedef R (*T0g)(M00&, A01&, A02&, HHH&, HHH&); static bool t0g((find<T00>(Traits<HHH>::id<A03>(), Traits<HHH>::id<A04>()) = &Local::trampoline) != 0);
|
---|
1173 | typedef R (*T0h)(M00&, A01&, HHH&, A03&, HHH&); static bool t0h((find<T00>(Traits<HHH>::id<A02>(), Traits<HHH>::id<A04>()) = &Local::trampoline) != 0);
|
---|
1174 | typedef R (*T0i)(M00&, A01&, HHH&, HHH&, A04&); static bool t0i((find<T00>(Traits<HHH>::id<A02>(), Traits<HHH>::id<A03>()) = &Local::trampoline) != 0);
|
---|
1175 | typedef R (*T0j)(M00&, HHH&, A02&, A03&, HHH&); static bool t0j((find<T00>(Traits<HHH>::id<A01>(), Traits<HHH>::id<A04>()) = &Local::trampoline) != 0);
|
---|
1176 | typedef R (*T0k)(M00&, HHH&, A02&, HHH&, A04&); static bool t0k((find<T00>(Traits<HHH>::id<A01>(), Traits<HHH>::id<A03>()) = &Local::trampoline) != 0);
|
---|
1177 | typedef R (*T0l)(M00&, HHH&, HHH&, A03&, A04&); static bool t0l((find<T00>(Traits<HHH>::id<A01>(), Traits<HHH>::id<A02>()) = &Local::trampoline) != 0);
|
---|
1178 | typedef R (*T0m)(HHH&, A01&, A02&, A03&, HHH&); static bool t0m((find<T00>(Traits<HHH>::id<M00>(), Traits<HHH>::id<A04>()) = &Local::trampoline) != 0);
|
---|
1179 | typedef R (*T0n)(HHH&, A01&, A02&, HHH&, A04&); static bool t0n((find<T00>(Traits<HHH>::id<M00>(), Traits<HHH>::id<A03>()) = &Local::trampoline) != 0);
|
---|
1180 | typedef R (*T0o)(HHH&, HHH&, A02&, A03&, A04&); static bool t0o((find<T00>(Traits<HHH>::id<M00>(), Traits<HHH>::id<A01>()) = &Local::trampoline) != 0);
|
---|
1181 | typedef R (*T0p)(M00&, A01&, A02&, A03&, HHH&); static bool t0p((find<T00>(Traits<HHH>::id<A04>()) = &Local::trampoline) != 0);
|
---|
1182 | typedef R (*T0q)(M00&, A01&, A02&, HHH&, A04&); static bool t0q((find<T00>(Traits<HHH>::id<A03>()) = &Local::trampoline) != 0);
|
---|
1183 | typedef R (*T0r)(M00&, A01&, HHH&, A03&, A04&); static bool t0r((find<T00>(Traits<HHH>::id<A02>()) = &Local::trampoline) != 0);
|
---|
1184 | typedef R (*T0s)(M00&, HHH&, A02&, A03&, A04&); static bool t0s((find<T00>(Traits<HHH>::id<A01>()) = &Local::trampoline) != 0);
|
---|
1185 | typedef R (*T0t)(HHH&, A01&, A02&, A03&, A04&); static bool t0t((find<T00>(Traits<HHH>::id<M00>()) = &Local::trampoline) != 0);
|
---|
1186 | return true;
|
---|
1187 | };
|
---|
1188 | template<typename R, typename HHH>
|
---|
1189 | static R apply(HHH& m00, HHH& a01, HHH& a02, HHH& a03, HHH& a04) {
|
---|
1190 | typedef R (*T)(HHH&, HHH&, HHH&, HHH&, HHH&);
|
---|
1191 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a01), Traits<HHH>::id(a02), Traits<HHH>::id(a03), Traits<HHH>::id(a04)));
|
---|
1192 | if (!t) throw BadMultimethod();
|
---|
1193 | return t(m00, a01, a02, a03, a04);
|
---|
1194 | };
|
---|
1195 | template<typename R, typename HHH, typename T00>
|
---|
1196 | static R apply(T00& m00, HHH& a01, HHH& a02, HHH& a03, HHH& a04) {
|
---|
1197 | typedef R (*T)(T00&, HHH&, HHH&, HHH&, HHH&);
|
---|
1198 | T t(find<T>(Traits<HHH>::id(a01), Traits<HHH>::id(a02), Traits<HHH>::id(a03), Traits<HHH>::id(a04)));
|
---|
1199 | if (!t) throw BadMultimethod();
|
---|
1200 | return t(m00, a01, a02, a03, a04);
|
---|
1201 | };
|
---|
1202 | template<typename R, typename HHH, typename T00>
|
---|
1203 | static R apply(const T00& m00, HHH& a01, HHH& a02, HHH& a03, HHH& a04) {
|
---|
1204 | typedef R (*T)(const T00&, HHH&, HHH&, HHH&, HHH&);
|
---|
1205 | T t(find<T>(Traits<HHH>::id(a01), Traits<HHH>::id(a02), Traits<HHH>::id(a03), Traits<HHH>::id(a04)));
|
---|
1206 | if (!t) throw BadMultimethod();
|
---|
1207 | return t(m00, a01, a02, a03, a04);
|
---|
1208 | };
|
---|
1209 | template<typename R, typename HHH, typename T00>
|
---|
1210 | static R apply(HHH& m00, T00& a01, HHH& a02, HHH& a03, HHH& a04) {
|
---|
1211 | typedef R (*T)(HHH&, T00&, HHH&, HHH&, HHH&);
|
---|
1212 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a02), Traits<HHH>::id(a03), Traits<HHH>::id(a04)));
|
---|
1213 | if (!t) throw BadMultimethod();
|
---|
1214 | return t(m00, a01, a02, a03, a04);
|
---|
1215 | };
|
---|
1216 | template<typename R, typename HHH, typename T00>
|
---|
1217 | static R apply(HHH& m00, const T00& a01, HHH& a02, HHH& a03, HHH& a04) {
|
---|
1218 | typedef R (*T)(HHH&, const T00&, HHH&, HHH&, HHH&);
|
---|
1219 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a02), Traits<HHH>::id(a03), Traits<HHH>::id(a04)));
|
---|
1220 | if (!t) throw BadMultimethod();
|
---|
1221 | return t(m00, a01, a02, a03, a04);
|
---|
1222 | };
|
---|
1223 |
|
---|
1224 | template<typename R, typename HHH, typename T00>
|
---|
1225 | static R apply(HHH& m00, HHH& a01, T00& a02, HHH& a03, HHH& a04) {
|
---|
1226 | typedef R (*T)(HHH&, HHH&, T00&, HHH&, HHH&);
|
---|
1227 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a01), Traits<HHH>::id(a03), Traits<HHH>::id(a04)));
|
---|
1228 | if (!t) throw BadMultimethod();
|
---|
1229 | return t(m00, a01, a02, a03, a04);
|
---|
1230 | };
|
---|
1231 | template<typename R, typename HHH, typename T00>
|
---|
1232 | static R apply(HHH& m00, HHH& a01, const T00& a02, HHH& a03, HHH& a04) {
|
---|
1233 | typedef R (*T)(HHH&, HHH&, const T00&, HHH&, HHH&);
|
---|
1234 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a01), Traits<HHH>::id(a03), Traits<HHH>::id(a04)));
|
---|
1235 | if (!t) throw BadMultimethod();
|
---|
1236 | return t(m00, a01, a02, a03, a04);
|
---|
1237 | };
|
---|
1238 |
|
---|
1239 | template<typename R, typename HHH, typename T00>
|
---|
1240 | static R apply(HHH& m00, HHH& a01, HHH& a02, T00& a03, HHH& a04) {
|
---|
1241 | typedef R (*T)(HHH&, HHH&, HHH&, T00&, HHH&);
|
---|
1242 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a01), Traits<HHH>::id(a02), Traits<HHH>::id(a04)));
|
---|
1243 | if (!t) throw BadMultimethod();
|
---|
1244 | return t(m00, a01, a02, a03, a04);
|
---|
1245 | };
|
---|
1246 | template<typename R, typename HHH, typename T00>
|
---|
1247 | static R apply(HHH& m00, HHH& a01, HHH& a02, const T00& a03, HHH& a04) {
|
---|
1248 | typedef R (*T)(HHH&, HHH&, HHH&, const T00&, HHH&);
|
---|
1249 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a01), Traits<HHH>::id(a02), Traits<HHH>::id(a04)));
|
---|
1250 | if (!t) throw BadMultimethod();
|
---|
1251 | return t(m00, a01, a02, a03, a04);
|
---|
1252 | };
|
---|
1253 |
|
---|
1254 | template<typename R, typename HHH, typename T00>
|
---|
1255 | static R apply(HHH& m00, HHH& a01, HHH& a02, HHH& a03, T00& a04) {
|
---|
1256 | typedef R (*T)(HHH&, HHH&, HHH&, HHH&, T00&);
|
---|
1257 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a01), Traits<HHH>::id(a02), Traits<HHH>::id(a03)));
|
---|
1258 | if (!t) throw BadMultimethod();
|
---|
1259 | return t(m00, a01, a02, a03, a04);
|
---|
1260 | };
|
---|
1261 | template<typename R, typename HHH, typename T00>
|
---|
1262 | static R apply(HHH& m00, HHH& a01, HHH& a02, HHH& a03, const T00& a04) {
|
---|
1263 | typedef R (*T)(HHH&, HHH&, HHH&, HHH&, const T00&);
|
---|
1264 | T t(find<T>(Traits<HHH>::id(m00), Traits<HHH>::id(a01), Traits<HHH>::id(a02), Traits<HHH>::id(a03)));
|
---|
1265 | if (!t) throw BadMultimethod();
|
---|
1266 | return t(m00, a01, a02, a03, a04);
|
---|
1267 | };
|
---|
1268 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
1269 | static R apply(T00& m00, T01& a01, HHH& a02, HHH& a03, HHH& a04) {
|
---|
1270 | typedef R (*T)(T00&, T01&, HHH&, HHH&, HHH&);
|
---|
1271 | T t(find<T>(Traits<HHH>::id(a02), Traits<HHH>::id(a03), Traits<HHH>::id(a04)));
|
---|
1272 | if (!t) throw BadMultimethod();
|
---|
1273 | return t(m00, a01, a02, a03, a04);
|
---|
1274 | };
|
---|
1275 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
1276 | static R apply(const T00& m00, T01& a01, HHH& a02, HHH& a03, HHH& a04) {
|
---|
1277 | typedef R (*T)(const T00&, T01&, HHH&, HHH&, HHH&);
|
---|
1278 | T t(find<T>(Traits<HHH>::id(a02), Traits<HHH>::id(a03), Traits<HHH>::id(a04)));
|
---|
1279 | if (!t) throw BadMultimethod();
|
---|
1280 | return t(m00, a01, a02, a03, a04);
|
---|
1281 | };
|
---|
1282 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
1283 | static R apply(T00& m00, const T01& a01, HHH& a02, HHH& a03, HHH& a04) {
|
---|
1284 | typedef R (*T)(T00&, const T01&, HHH&, HHH&, HHH&);
|
---|
1285 | T t(find<T>(Traits<HHH>::id(a02), Traits<HHH>::id(a03), Traits<HHH>::id(a04)));
|
---|
1286 | if (!t) throw BadMultimethod();
|
---|
1287 | return t(m00, a01, a02, a03, a04);
|
---|
1288 | };
|
---|
1289 | template<typename R, typename HHH, typename T00, typename T01>
|
---|
1290 | static R apply(const T00& m00, const T01& a01, HHH& a02, HHH& a03, HHH& a04) {
|
---|
1291 | typedef R (*T)(const T00&, const T01&, HHH&, HHH&, HHH&);
|
---|
1292 | T t(find<T>(Traits<HHH>::id(a02), Traits<HHH>::id(a03), Traits<HHH>::id(a04)));
|
---|
1293 | if (!t) throw BadMultimethod();
|
---|
1294 | return t(m00, a01, a02, a03, a04);
|
---|
1295 | };
|
---|
1296 | */
|
---|
1297 |
|
---|
1298 |
|
---|
1299 |
|
---|
1300 |
|
---|
1301 |
|
---|
1302 |
|
---|
1303 | };
|
---|
1304 |
|
---|
1305 |
|
---|
1306 | ///////////////////////////////////////////////////////////////////////////
|
---|
1307 | template<> struct Multimethod::Traits<boost::any> {
|
---|
1308 | typedef Loki::TypeInfo index_type;
|
---|
1309 | static Loki::TypeInfo id(boost::any& target) { return Loki::TypeInfo(target.type()); };
|
---|
1310 | template<typename target_t>
|
---|
1311 | static Loki::TypeInfo id() { return Loki::TypeInfo(typeid(target_t)); };
|
---|
1312 | template<typename type_t>
|
---|
1313 | static type_t cast(boost::any& operand) { return boost::any_cast<remove_reference<type_t>::type&>(operand); };
|
---|
1314 | };
|
---|
1315 |
|
---|
1316 | #endif
|
---|