1 | |
---|
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 "boost/mpl/aux_/basic_bind.hpp" header |
---|
11 | // -- DO NOT modify by hand! |
---|
12 | |
---|
13 | namespace boost { namespace mpl { |
---|
14 | |
---|
15 | namespace aux { |
---|
16 | template< bool > |
---|
17 | struct 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 | |
---|
29 | template<> |
---|
30 | struct 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 | |
---|
45 | template< typename T > struct is_bind_template; |
---|
46 | |
---|
47 | template< |
---|
48 | typename T, typename U1, typename U2, typename U3, typename U4 |
---|
49 | , typename U5 |
---|
50 | > |
---|
51 | struct resolve_bind_arg |
---|
52 | : resolve_arg_impl< is_bind_template<T>::value > |
---|
53 | ::template result_< T,U1,U2,U3,U4,U5 > |
---|
54 | { |
---|
55 | }; |
---|
56 | |
---|
57 | template< int arity_ > struct bind_chooser; |
---|
58 | |
---|
59 | aux::no_tag is_bind_helper(...); |
---|
60 | template< typename T > aux::no_tag is_bind_helper(protect<T>*); |
---|
61 | |
---|
62 | template< int N > |
---|
63 | aux::yes_tag is_bind_helper(arg<N>*); |
---|
64 | |
---|
65 | template< bool is_ref_ = true > |
---|
66 | struct is_bind_template_impl |
---|
67 | { |
---|
68 | template< typename T > struct result_ |
---|
69 | { |
---|
70 | BOOST_STATIC_CONSTANT(bool, value = false); |
---|
71 | }; |
---|
72 | }; |
---|
73 | |
---|
74 | template<> |
---|
75 | struct 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 | |
---|
86 | template< typename T > struct is_bind_template |
---|
87 | : is_bind_template_impl< ::boost::detail::is_reference_impl<T>::value > |
---|
88 | ::template result_<T> |
---|
89 | { |
---|
90 | }; |
---|
91 | |
---|
92 | } // namespace aux |
---|
93 | |
---|
94 | template< |
---|
95 | typename F |
---|
96 | > |
---|
97 | struct 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 | |
---|
116 | namespace aux { |
---|
117 | |
---|
118 | template< |
---|
119 | typename F |
---|
120 | > |
---|
121 | aux::yes_tag |
---|
122 | is_bind_helper(bind0<F>*); |
---|
123 | |
---|
124 | } // namespace aux |
---|
125 | |
---|
126 | BOOST_MPL_AUX_ARITY_SPEC(1, bind0) |
---|
127 | BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) |
---|
128 | |
---|
129 | template< |
---|
130 | typename F, typename T1 |
---|
131 | > |
---|
132 | struct 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 | |
---|
153 | namespace aux { |
---|
154 | |
---|
155 | template< |
---|
156 | typename F, typename T1 |
---|
157 | > |
---|
158 | aux::yes_tag |
---|
159 | is_bind_helper(bind1< F,T1 >*); |
---|
160 | |
---|
161 | } // namespace aux |
---|
162 | |
---|
163 | BOOST_MPL_AUX_ARITY_SPEC(2, bind1) |
---|
164 | BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) |
---|
165 | |
---|
166 | template< |
---|
167 | typename F, typename T1, typename T2 |
---|
168 | > |
---|
169 | struct 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 | |
---|
191 | namespace aux { |
---|
192 | |
---|
193 | template< |
---|
194 | typename F, typename T1, typename T2 |
---|
195 | > |
---|
196 | aux::yes_tag |
---|
197 | is_bind_helper(bind2< F,T1,T2 >*); |
---|
198 | |
---|
199 | } // namespace aux |
---|
200 | |
---|
201 | BOOST_MPL_AUX_ARITY_SPEC(3, bind2) |
---|
202 | BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) |
---|
203 | |
---|
204 | template< |
---|
205 | typename F, typename T1, typename T2, typename T3 |
---|
206 | > |
---|
207 | struct 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 | |
---|
230 | namespace aux { |
---|
231 | |
---|
232 | template< |
---|
233 | typename F, typename T1, typename T2, typename T3 |
---|
234 | > |
---|
235 | aux::yes_tag |
---|
236 | is_bind_helper(bind3< F,T1,T2,T3 >*); |
---|
237 | |
---|
238 | } // namespace aux |
---|
239 | |
---|
240 | BOOST_MPL_AUX_ARITY_SPEC(4, bind3) |
---|
241 | BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) |
---|
242 | |
---|
243 | template< |
---|
244 | typename F, typename T1, typename T2, typename T3, typename T4 |
---|
245 | > |
---|
246 | struct 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 | |
---|
271 | namespace aux { |
---|
272 | |
---|
273 | template< |
---|
274 | typename F, typename T1, typename T2, typename T3, typename T4 |
---|
275 | > |
---|
276 | aux::yes_tag |
---|
277 | is_bind_helper(bind4< F,T1,T2,T3,T4 >*); |
---|
278 | |
---|
279 | } // namespace aux |
---|
280 | |
---|
281 | BOOST_MPL_AUX_ARITY_SPEC(5, bind4) |
---|
282 | BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) |
---|
283 | |
---|
284 | template< |
---|
285 | typename F, typename T1, typename T2, typename T3, typename T4 |
---|
286 | , typename T5 |
---|
287 | > |
---|
288 | struct 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 | |
---|
314 | namespace aux { |
---|
315 | |
---|
316 | template< |
---|
317 | typename F, typename T1, typename T2, typename T3, typename T4 |
---|
318 | , typename T5 |
---|
319 | > |
---|
320 | aux::yes_tag |
---|
321 | is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*); |
---|
322 | |
---|
323 | } // namespace aux |
---|
324 | |
---|
325 | BOOST_MPL_AUX_ARITY_SPEC(6, bind5) |
---|
326 | BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) |
---|
327 | }} |
---|
328 | |
---|