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

« back to all changes in this revision

Viewing changes to boost/boost/mpl/aux_/preprocessed/no_ttp/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 : apply0<U1> { };
 
21
 
 
22
};
 
23
 
 
24
template<
 
25
      typename F
 
26
    >
 
27
struct apply< F,void_,void_,void_,void_,void_ >
 
28
    : apply0<F>
 
29
{
 
30
};
 
31
 
 
32
template<
 
33
      typename F, typename T1
 
34
    >
 
35
struct apply1
 
36
    : F::template apply<
 
37
          T1
 
38
        >
 
39
{
 
40
    static int const arity = 2; typedef F arg1;
 
41
 typedef T1 arg2;
 
42
 friend class apply1_rebind;
 
43
 typedef apply1_rebind rebind;
 
44
 };
 
45
 class apply1_rebind { public: template< typename U1, typename U2 > struct apply : apply1< U1,U2 > { };
 
46
 
 
47
};
 
48
 
 
49
template<
 
50
      typename F, typename T1
 
51
    >
 
52
struct apply< F,T1,void_,void_,void_,void_ >
 
53
    : apply1< F,T1 >
 
54
{
 
55
};
 
56
 
 
57
template<
 
58
      typename F, typename T1, typename T2
 
59
    >
 
60
struct apply2
 
61
    : F::template apply<
 
62
          T1, T2
 
63
        >
 
64
{
 
65
    static int const arity = 3; typedef F arg1;
 
66
 typedef T1 arg2;
 
67
 typedef T2 arg3;
 
68
 friend class apply2_rebind;
 
69
 typedef apply2_rebind rebind;
 
70
 };
 
71
 class apply2_rebind { public: template< typename U1, typename U2, typename U3 > struct apply : apply2< U1,U2,U3 > { };
 
72
 
 
73
};
 
74
 
 
75
template<
 
76
      typename F, typename T1, typename T2
 
77
    >
 
78
struct apply< F,T1,T2,void_,void_,void_ >
 
79
    : apply2< F,T1,T2 >
 
80
{
 
81
};
 
82
 
 
83
template<
 
84
      typename F, typename T1, typename T2, typename T3
 
85
    >
 
86
struct apply3
 
87
    : F::template apply<
 
88
          T1, T2, T3
 
89
        >
 
90
{
 
91
    static int const arity = 4; typedef F arg1;
 
92
 typedef T1 arg2;
 
93
 typedef T2 arg3;
 
94
 typedef T3 arg4;
 
95
 friend class apply3_rebind;
 
96
 typedef apply3_rebind rebind;
 
97
 };
 
98
 class apply3_rebind { public: template< typename U1, typename U2, typename U3, typename U4 > struct apply : apply3< U1,U2,U3,U4 > { };
 
99
 
 
100
};
 
101
 
 
102
template<
 
103
      typename F, typename T1, typename T2, typename T3
 
104
    >
 
105
struct apply< F,T1,T2,T3,void_,void_ >
 
106
    : apply3< F,T1,T2,T3 >
 
107
{
 
108
};
 
109
 
 
110
template<
 
111
      typename F, typename T1, typename T2, typename T3, typename T4
 
112
    >
 
113
struct apply4
 
114
    : F::template apply<
 
115
          T1, T2, T3, T4
 
116
        >
 
117
{
 
118
    static int const arity = 5; typedef F arg1;
 
119
 typedef T1 arg2;
 
120
 typedef T2 arg3;
 
121
 typedef T3 arg4;
 
122
 typedef T4 arg5;
 
123
 friend class apply4_rebind;
 
124
 typedef apply4_rebind rebind;
 
125
 };
 
126
 class apply4_rebind { public: template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply : apply4< U1,U2,U3,U4,U5 > { };
 
127
 
 
128
};
 
129
 
 
130
template<
 
131
      typename F, typename T1, typename T2, typename T3, typename T4
 
132
    >
 
133
struct apply< F,T1,T2,T3,T4,void_ >
 
134
    : apply4< F,T1,T2,T3,T4 >
 
135
{
 
136
};
 
137
 
 
138
template<
 
139
      typename F, typename T1, typename T2, typename T3, typename T4
 
140
    , typename T5
 
141
    >
 
142
struct apply5
 
143
    : F::template apply<
 
144
          T1, T2, T3, T4, T5
 
145
        >
 
146
{
 
147
    static int const arity = 6; typedef F arg1;
 
148
 typedef T1 arg2;
 
149
 typedef T2 arg3;
 
150
 typedef T3 arg4;
 
151
 typedef T4 arg5;
 
152
 typedef T5 arg6;
 
153
 friend class apply5_rebind;
 
154
 typedef apply5_rebind rebind;
 
155
 };
 
156
 class apply5_rebind { public: template< typename U1, typename U2, typename U3, typename U4, typename U5, typename U6 > struct apply : apply5< U1,U2,U3,U4,U5,U6 > { };
 
157
 
 
158
};
 
159
 
 
160
// primary template (not a specialization!)
 
161
template<
 
162
      typename F, typename T1, typename T2, typename T3, typename T4
 
163
    , typename T5
 
164
    >
 
165
struct apply
 
166
    : apply5< F,T1,T2,T3,T4,T5 >
 
167
{
 
168
};
 
169
 
 
170
} // namespace mpl
 
171
} // namespace boost
 
172