~ubuntu-branches/ubuntu/warty/aqsis/warty

« back to all changes in this revision

Viewing changes to boost/boost/mpl/aux_/preprocessed/bcc/apply.hpp

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2004-08-24 07:25:04 UTC
  • Revision ID: james.westby@ubuntu.com-20040824072504-zf993vnevvisdsvb
Tags: upstream-0.9.1
ImportĀ upstreamĀ versionĀ 0.9.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// preprocessed version of 'boost/mpl/apply.hpp' header
 
2
// see the original for copyright information
 
3
 
 
4
namespace boost {
 
5
namespace mpl {
 
6
 
 
7
template<
 
8
      typename F, typename T1 = void_, typename T2 = void_
 
9
    , typename T3 = void_, typename T4 = void_, typename T5 = void_
 
10
    >
 
11
struct apply;
 
12
 
 
13
template< typename F >
 
14
struct apply0 : F
 
15
{
 
16
    static int const arity = 1; typedef F arg1;
 
17
 friend class apply0_rebind;
 
18
 typedef apply0_rebind rebind;
 
19
 };
 
20
 class apply0_rebind { public: template< typename U1 > struct apply { typedef typename apply0<U1>::type type;
 
21
 };
 
22
 
 
23
};
 
24
 
 
25
template<
 
26
      typename F
 
27
    >
 
28
struct apply< F,void_,void_,void_,void_,void_ >
 
29
    : apply0<F>
 
30
{
 
31
};
 
32
 
 
33
namespace aux {
 
34
template<
 
35
      int N, typename F, typename T1
 
36
    >
 
37
struct apply_impl1;
 
38
}
 
39
 
 
40
namespace aux {
 
41
 
 
42
template<
 
43
      typename F, typename T1
 
44
    >
 
45
struct apply_impl1<
 
46
          1
 
47
        , F
 
48
        , T1
 
49
        >
 
50
{
 
51
    typedef typename F::template apply<
 
52
          T1
 
53
        > type;
 
54
};
 
55
 
 
56
} // namespace aux
 
57
 
 
58
namespace aux {
 
59
 
 
60
template<
 
61
      typename F, typename T1
 
62
    >
 
63
struct apply_impl1<
 
64
          2
 
65
        , F
 
66
        , T1
 
67
        >
 
68
{
 
69
    typedef typename F::template apply<
 
70
          T1
 
71
        , void_
 
72
        > type;
 
73
};
 
74
 
 
75
} // namespace aux
 
76
 
 
77
namespace aux {
 
78
 
 
79
template<
 
80
      typename F, typename T1
 
81
    >
 
82
struct apply_impl1<
 
83
          3
 
84
        , F
 
85
        , T1
 
86
        >
 
87
{
 
88
    typedef typename F::template apply<
 
89
          T1
 
90
        , void_, void_
 
91
        > type;
 
92
};
 
93
 
 
94
} // namespace aux
 
95
 
 
96
namespace aux {
 
97
 
 
98
template<
 
99
      typename F, typename T1
 
100
    >
 
101
struct apply_impl1<
 
102
          4
 
103
        , F
 
104
        , T1
 
105
        >
 
106
{
 
107
    typedef typename F::template apply<
 
108
          T1
 
109
        , void_, void_, void_
 
110
        > type;
 
111
};
 
112
 
 
113
} // namespace aux
 
114
 
 
115
namespace aux {
 
116
 
 
117
template<
 
118
      typename F, typename T1
 
119
    >
 
120
struct apply_impl1<
 
121
          5
 
122
        , F
 
123
        , T1
 
124
        >
 
125
{
 
126
    typedef typename F::template apply<
 
127
          T1
 
128
        , void_, void_, void_, void_
 
129
        > type;
 
130
};
 
131
 
 
132
} // namespace aux
 
133
 
 
134
template<
 
135
      typename F, typename T1
 
136
    >
 
137
struct apply1
 
138
    : aux::apply_impl1<
 
139
          ::boost::mpl::aux::arity< F,1 >::value
 
140
        , F
 
141
        , T1
 
142
        >::type
 
143
{
 
144
    static int const arity = 2; typedef F arg1;
 
145
 typedef T1 arg2;
 
146
 friend class apply1_rebind;
 
147
 typedef apply1_rebind rebind;
 
148
 };
 
149
 class apply1_rebind { public: template< typename U1, typename U2 > struct apply { typedef typename apply1< U1,U2 >::type type;
 
150
 };
 
151
 
 
152
};
 
153
 
 
154
template<
 
155
      typename F, typename T1
 
156
    >
 
157
struct apply< F,T1,void_,void_,void_,void_ >
 
158
    : apply1< F,T1 >
 
159
{
 
160
};
 
161
 
 
162
namespace aux {
 
163
template<
 
164
      int N, typename F, typename T1, typename T2
 
165
    >
 
166
struct apply_impl2;
 
167
}
 
168
 
 
169
namespace aux {
 
170
 
 
171
template<
 
172
      typename F, typename T1, typename T2
 
173
    >
 
174
struct apply_impl2<
 
175
          2
 
176
        , F
 
177
        , T1, T2
 
178
        >
 
179
{
 
180
    typedef typename F::template apply<
 
181
          T1, T2
 
182
         
 
183
        > type;
 
184
};
 
185
 
 
186
} // namespace aux
 
187
 
 
188
namespace aux {
 
189
 
 
190
template<
 
191
      typename F, typename T1, typename T2
 
192
    >
 
193
struct apply_impl2<
 
194
          3
 
195
        , F
 
196
        , T1, T2
 
197
        >
 
198
{
 
199
    typedef typename F::template apply<
 
200
          T1, T2
 
201
        , void_
 
202
        > type;
 
203
};
 
204
 
 
205
} // namespace aux
 
206
 
 
207
namespace aux {
 
208
 
 
209
template<
 
210
      typename F, typename T1, typename T2
 
211
    >
 
212
struct apply_impl2<
 
213
          4
 
214
        , F
 
215
        , T1, T2
 
216
        >
 
217
{
 
218
    typedef typename F::template apply<
 
219
          T1, T2
 
220
        , void_, void_
 
221
        > type;
 
222
};
 
223
 
 
224
} // namespace aux
 
225
 
 
226
namespace aux {
 
227
 
 
228
template<
 
229
      typename F, typename T1, typename T2
 
230
    >
 
231
struct apply_impl2<
 
232
          5
 
233
        , F
 
234
        , T1, T2
 
235
        >
 
236
{
 
237
    typedef typename F::template apply<
 
238
          T1, T2
 
239
        , void_, void_, void_
 
240
        > type;
 
241
};
 
242
 
 
243
} // namespace aux
 
244
 
 
245
template<
 
246
      typename F, typename T1, typename T2
 
247
    >
 
248
struct apply2
 
249
    : aux::apply_impl2<
 
250
          ::boost::mpl::aux::arity< F,2 >::value
 
251
        , F
 
252
        , T1, T2
 
253
        >::type
 
254
{
 
255
    static int const arity = 3; typedef F arg1;
 
256
 typedef T1 arg2;
 
257
 typedef T2 arg3;
 
258
 friend class apply2_rebind;
 
259
 typedef apply2_rebind rebind;
 
260
 };
 
261
 class apply2_rebind { public: template< typename U1, typename U2, typename U3 > struct apply { typedef typename apply2< U1,U2,U3 >::type type;
 
262
 };
 
263
 
 
264
};
 
265
 
 
266
template<
 
267
      typename F, typename T1, typename T2
 
268
    >
 
269
struct apply< F,T1,T2,void_,void_,void_ >
 
270
    : apply2< F,T1,T2 >
 
271
{
 
272
};
 
273
 
 
274
namespace aux {
 
275
template<
 
276
      int N, typename F, typename T1, typename T2, typename T3
 
277
    >
 
278
struct apply_impl3;
 
279
}
 
280
 
 
281
namespace aux {
 
282
 
 
283
template<
 
284
      typename F, typename T1, typename T2, typename T3
 
285
    >
 
286
struct apply_impl3<
 
287
          3
 
288
        , F
 
289
        , T1, T2, T3
 
290
        >
 
291
{
 
292
    typedef typename F::template apply<
 
293
          T1, T2, T3
 
294
         
 
295
        > type;
 
296
};
 
297
 
 
298
} // namespace aux
 
299
 
 
300
namespace aux {
 
301
 
 
302
template<
 
303
      typename F, typename T1, typename T2, typename T3
 
304
    >
 
305
struct apply_impl3<
 
306
          4
 
307
        , F
 
308
        , T1, T2, T3
 
309
        >
 
310
{
 
311
    typedef typename F::template apply<
 
312
          T1, T2, T3
 
313
        , void_
 
314
        > type;
 
315
};
 
316
 
 
317
} // namespace aux
 
318
 
 
319
namespace aux {
 
320
 
 
321
template<
 
322
      typename F, typename T1, typename T2, typename T3
 
323
    >
 
324
struct apply_impl3<
 
325
          5
 
326
        , F
 
327
        , T1, T2, T3
 
328
        >
 
329
{
 
330
    typedef typename F::template apply<
 
331
          T1, T2, T3
 
332
        , void_, void_
 
333
        > type;
 
334
};
 
335
 
 
336
} // namespace aux
 
337
 
 
338
template<
 
339
      typename F, typename T1, typename T2, typename T3
 
340
    >
 
341
struct apply3
 
342
    : aux::apply_impl3<
 
343
          ::boost::mpl::aux::arity< F,3 >::value
 
344
        , F
 
345
        , T1, T2, T3
 
346
        >::type
 
347
{
 
348
    static int const arity = 4; typedef F arg1;
 
349
 typedef T1 arg2;
 
350
 typedef T2 arg3;
 
351
 typedef T3 arg4;
 
352
 friend class apply3_rebind;
 
353
 typedef apply3_rebind rebind;
 
354
 };
 
355
 class apply3_rebind { public: template< typename U1, typename U2, typename U3, typename U4 > struct apply { typedef typename apply3< U1,U2,U3,U4 >::type type;
 
356
 };
 
357
 
 
358
};
 
359
 
 
360
template<
 
361
      typename F, typename T1, typename T2, typename T3
 
362
    >
 
363
struct apply< F,T1,T2,T3,void_,void_ >
 
364
    : apply3< F,T1,T2,T3 >
 
365
{
 
366
};
 
367
 
 
368
namespace aux {
 
369
template<
 
370
      int N, typename F, typename T1, typename T2, typename T3, typename T4
 
371
    >
 
372
struct apply_impl4;
 
373
}
 
374
 
 
375
namespace aux {
 
376
 
 
377
template<
 
378
      typename F, typename T1, typename T2, typename T3, typename T4
 
379
    >
 
380
struct apply_impl4<
 
381
          4
 
382
        , F
 
383
        , T1, T2, T3, T4
 
384
        >
 
385
{
 
386
    typedef typename F::template apply<
 
387
          T1, T2, T3, T4
 
388
         
 
389
        > type;
 
390
};
 
391
 
 
392
} // namespace aux
 
393
 
 
394
namespace aux {
 
395
 
 
396
template<
 
397
      typename F, typename T1, typename T2, typename T3, typename T4
 
398
    >
 
399
struct apply_impl4<
 
400
          5
 
401
        , F
 
402
        , T1, T2, T3, T4
 
403
        >
 
404
{
 
405
    typedef typename F::template apply<
 
406
          T1, T2, T3, T4
 
407
        , void_
 
408
        > type;
 
409
};
 
410
 
 
411
} // namespace aux
 
412
 
 
413
template<
 
414
      typename F, typename T1, typename T2, typename T3, typename T4
 
415
    >
 
416
struct apply4
 
417
    : aux::apply_impl4<
 
418
          ::boost::mpl::aux::arity< F,4 >::value
 
419
        , F
 
420
        , T1, T2, T3, T4
 
421
        >::type
 
422
{
 
423
    static int const arity = 5; typedef F arg1;
 
424
 typedef T1 arg2;
 
425
 typedef T2 arg3;
 
426
 typedef T3 arg4;
 
427
 typedef T4 arg5;
 
428
 friend class apply4_rebind;
 
429
 typedef apply4_rebind rebind;
 
430
 };
 
431
 class apply4_rebind { public: template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { typedef typename apply4< U1,U2,U3,U4,U5 >::type type;
 
432
 };
 
433
 
 
434
};
 
435
 
 
436
template<
 
437
      typename F, typename T1, typename T2, typename T3, typename T4
 
438
    >
 
439
struct apply< F,T1,T2,T3,T4,void_ >
 
440
    : apply4< F,T1,T2,T3,T4 >
 
441
{
 
442
};
 
443
 
 
444
namespace aux {
 
445
template<
 
446
      int N, typename F, typename T1, typename T2, typename T3, typename T4
 
447
    , typename T5
 
448
    >
 
449
struct apply_impl5;
 
450
}
 
451
 
 
452
namespace aux {
 
453
 
 
454
template<
 
455
      typename F, typename T1, typename T2, typename T3, typename T4
 
456
    , typename T5
 
457
    >
 
458
struct apply_impl5<
 
459
          5
 
460
        , F
 
461
        , T1, T2, T3, T4, T5
 
462
        >
 
463
{
 
464
    typedef typename F::template apply<
 
465
          T1, T2, T3, T4, T5
 
466
         
 
467
        > type;
 
468
};
 
469
 
 
470
} // namespace aux
 
471
 
 
472
template<
 
473
      typename F, typename T1, typename T2, typename T3, typename T4
 
474
    , typename T5
 
475
    >
 
476
struct apply5
 
477
    : aux::apply_impl5<
 
478
          ::boost::mpl::aux::arity< F,5 >::value
 
479
        , F
 
480
        , T1, T2, T3, T4, T5
 
481
        >::type
 
482
{
 
483
    static int const arity = 6; typedef F arg1;
 
484
 typedef T1 arg2;
 
485
 typedef T2 arg3;
 
486
 typedef T3 arg4;
 
487
 typedef T4 arg5;
 
488
 typedef T5 arg6;
 
489
 friend class apply5_rebind;
 
490
 typedef apply5_rebind rebind;
 
491
 };
 
492
 class apply5_rebind { public: template< typename U1, typename U2, typename U3, typename U4, typename U5, typename U6 > struct apply { typedef typename apply5< U1,U2,U3,U4,U5,U6 >::type type;
 
493
 };
 
494
 
 
495
};
 
496
 
 
497
// primary template (not a specialization!)
 
498
template<
 
499
      typename F, typename T1, typename T2, typename T3, typename T4
 
500
    , typename T5
 
501
    >
 
502
struct apply
 
503
    : apply5< F,T1,T2,T3,T4,T5 >
 
504
{
 
505
};
 
506
 
 
507
} // namespace mpl
 
508
} // namespace boost
 
509