blob: 9b68023a3b632727f8c91394940211366f317374 [file] [log] [blame]
Jeff Thompsona28eed82013-08-22 16:21:10 -07001
2// Copyright Peter Dimov 2001
3// Copyright Aleksey Gurtovoy 2001-2004
4//
5// Distributed under the Boost Software License, Version 1.0.
6// (See accompanying file LICENSE_1_0.txt or copy at
7// http://www.boost.org/LICENSE_1_0.txt)
8//
9
10// Preprocessed version of "ndnboost/mpl/aux_/basic_bind.hpp" header
11// -- DO NOT modify by hand!
12
13namespace ndnboost { namespace mpl {
14
15namespace aux {
16template< bool >
17struct resolve_arg_impl
18{
19 template<
20 typename T, typename U1, typename U2, typename U3
21 , typename U4, typename U5
22 >
23 struct result_
24 {
25 typedef T type;
26 };
27};
28
29template<>
30struct resolve_arg_impl<true>
31{
32 template<
33 typename T, typename U1, typename U2, typename U3
34 , typename U4, typename U5
35 >
36 struct result_
37 {
38 typedef typename apply_wrap5<
39 T
40 , U1, U2, U3, U4, U5
41 >::type type;
42 };
43};
44
45template< typename T > struct is_bind_template;
46
47template<
48 typename T, typename U1, typename U2, typename U3, typename U4
49 , typename U5
50 >
51struct resolve_bind_arg
52 : resolve_arg_impl< is_bind_template<T>::value >
53 ::template result_< T,U1,U2,U3,U4,U5 >
54{
55};
56
57template< int arity_ > struct bind_chooser;
58
59aux::no_tag is_bind_helper(...);
60template< typename T > aux::no_tag is_bind_helper(protect<T>*);
61
62template< int N >
63aux::yes_tag is_bind_helper(arg<N>*);
64
65template< bool is_ref_ = true >
66struct is_bind_template_impl
67{
68 template< typename T > struct result_
69 {
70 BOOST_STATIC_CONSTANT(bool, value = false);
71 };
72};
73
74template<>
75struct is_bind_template_impl<false>
76{
77 template< typename T > struct result_
78 {
79 BOOST_STATIC_CONSTANT(bool, value =
80 sizeof(aux::is_bind_helper(static_cast<T*>(0)))
81 == sizeof(aux::yes_tag)
82 );
83 };
84};
85
86template< typename T > struct is_bind_template
87 : is_bind_template_impl< ::ndnboost::detail::is_reference_impl<T>::value >
88 ::template result_<T>
89{
90};
91
92} // namespace aux
93
94template<
95 typename F
96 >
97struct bind0
98{
99 template<
100 typename U1 = na, typename U2 = na, typename U3 = na
101 , typename U4 = na, typename U5 = na
102 >
103 struct apply
104 {
105 private:
106 typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
107
108 public:
109 typedef typename apply_wrap0<
110 f_
111 >::type type;
112
113 };
114};
115
116namespace aux {
117
118template<
119 typename F
120 >
121aux::yes_tag
122is_bind_helper(bind0<F>*);
123
124} // namespace aux
125
126BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
127BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
128
129template<
130 typename F, typename T1
131 >
132struct bind1
133{
134 template<
135 typename U1 = na, typename U2 = na, typename U3 = na
136 , typename U4 = na, typename U5 = na
137 >
138 struct apply
139 {
140 private:
141 typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
142 typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
143
144 public:
145 typedef typename apply_wrap1<
146 f_
147 , typename t1::type
148 >::type type;
149
150 };
151};
152
153namespace aux {
154
155template<
156 typename F, typename T1
157 >
158aux::yes_tag
159is_bind_helper(bind1< F,T1 >*);
160
161} // namespace aux
162
163BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
164BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
165
166template<
167 typename F, typename T1, typename T2
168 >
169struct bind2
170{
171 template<
172 typename U1 = na, typename U2 = na, typename U3 = na
173 , typename U4 = na, typename U5 = na
174 >
175 struct apply
176 {
177 private:
178 typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
179 typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
180 typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
181
182 public:
183 typedef typename apply_wrap2<
184 f_
185 , typename t1::type, typename t2::type
186 >::type type;
187
188 };
189};
190
191namespace aux {
192
193template<
194 typename F, typename T1, typename T2
195 >
196aux::yes_tag
197is_bind_helper(bind2< F,T1,T2 >*);
198
199} // namespace aux
200
201BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
202BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
203
204template<
205 typename F, typename T1, typename T2, typename T3
206 >
207struct bind3
208{
209 template<
210 typename U1 = na, typename U2 = na, typename U3 = na
211 , typename U4 = na, typename U5 = na
212 >
213 struct apply
214 {
215 private:
216 typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
217 typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
218 typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
219 typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
220
221 public:
222 typedef typename apply_wrap3<
223 f_
224 , typename t1::type, typename t2::type, typename t3::type
225 >::type type;
226
227 };
228};
229
230namespace aux {
231
232template<
233 typename F, typename T1, typename T2, typename T3
234 >
235aux::yes_tag
236is_bind_helper(bind3< F,T1,T2,T3 >*);
237
238} // namespace aux
239
240BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
241BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
242
243template<
244 typename F, typename T1, typename T2, typename T3, typename T4
245 >
246struct bind4
247{
248 template<
249 typename U1 = na, typename U2 = na, typename U3 = na
250 , typename U4 = na, typename U5 = na
251 >
252 struct apply
253 {
254 private:
255 typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
256 typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
257 typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
258 typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
259 typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
260
261 public:
262 typedef typename apply_wrap4<
263 f_
264 , typename t1::type, typename t2::type, typename t3::type
265 , typename t4::type
266 >::type type;
267
268 };
269};
270
271namespace aux {
272
273template<
274 typename F, typename T1, typename T2, typename T3, typename T4
275 >
276aux::yes_tag
277is_bind_helper(bind4< F,T1,T2,T3,T4 >*);
278
279} // namespace aux
280
281BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
282BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
283
284template<
285 typename F, typename T1, typename T2, typename T3, typename T4
286 , typename T5
287 >
288struct bind5
289{
290 template<
291 typename U1 = na, typename U2 = na, typename U3 = na
292 , typename U4 = na, typename U5 = na
293 >
294 struct apply
295 {
296 private:
297 typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
298 typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
299 typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
300 typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
301 typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
302 typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5;
303
304 public:
305 typedef typename apply_wrap5<
306 f_
307 , typename t1::type, typename t2::type, typename t3::type
308 , typename t4::type, typename t5::type
309 >::type type;
310
311 };
312};
313
314namespace aux {
315
316template<
317 typename F, typename T1, typename T2, typename T3, typename T4
318 , typename T5
319 >
320aux::yes_tag
321is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*);
322
323} // namespace aux
324
325BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
326BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
327}}
328