New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
bind.hpp in vendors/XIOS/current/extern/boost/include/boost/mpl/aux_/preprocessed/msvc60 – NEMO

source: vendors/XIOS/current/extern/boost/include/boost/mpl/aux_/preprocessed/msvc60/bind.hpp @ 3428

Last change on this file since 3428 was 3428, checked in by rblod, 12 years ago

importing initial XIOS vendor drop

File size: 10.6 KB
Line 
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/bind.hpp" header
11// -- DO NOT modify by hand!
12
13namespace boost { 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< typename T >
58struct replace_unnamed_arg_impl
59{
60    template< typename Arg > struct result_
61    {
62        typedef Arg next;
63        typedef T type;
64    };
65};
66
67template<>
68struct replace_unnamed_arg_impl< arg< -1 > >
69{
70    template< typename Arg > struct result_
71    {
72        typedef typename next<Arg>::type next;
73        typedef Arg type;
74    };
75};
76
77template< typename T, typename Arg >
78struct replace_unnamed_arg
79    : replace_unnamed_arg_impl<T>::template result_<Arg>
80{
81};
82
83template< int arity_ > struct bind_chooser;
84
85aux::no_tag is_bind_helper(...);
86template< typename T > aux::no_tag is_bind_helper(protect<T>*);
87
88template< int N >
89aux::yes_tag is_bind_helper(arg<N>*);
90
91template< bool is_ref_  = true >
92struct is_bind_template_impl
93{
94    template< typename T > struct result_
95    {
96        BOOST_STATIC_CONSTANT(bool, value  = false);
97    };
98};
99
100template<>
101struct is_bind_template_impl<false>
102{
103    template< typename T > struct result_
104    {
105        BOOST_STATIC_CONSTANT(bool, value =
106              sizeof(aux::is_bind_helper(static_cast<T*>(0)))
107                == sizeof(aux::yes_tag)
108            );
109    };
110};
111
112template< typename T > struct is_bind_template
113    : is_bind_template_impl< ::boost::detail::is_reference_impl<T>::value >
114        ::template result_<T>
115{
116};
117
118} // namespace aux
119
120template<
121      typename F
122    >
123struct bind0
124{
125    template<
126          typename U1 = na, typename U2 = na, typename U3 = na
127        , typename U4 = na, typename U5 = na
128        >
129    struct apply
130    {
131     private:
132        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
133        typedef typename r0::type a0;
134        typedef typename r0::next n1;
135        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
136        ///
137     public:
138        typedef typename apply_wrap0<
139              f_
140            >::type type;
141
142    };
143};
144
145namespace aux {
146
147template<
148      typename F
149    >
150aux::yes_tag
151is_bind_helper(bind0<F>*);
152
153} // namespace aux
154
155BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
156BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
157
158template<
159      typename F, typename T1
160    >
161struct bind1
162{
163    template<
164          typename U1 = na, typename U2 = na, typename U3 = na
165        , typename U4 = na, typename U5 = na
166        >
167    struct apply
168    {
169     private:
170        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
171        typedef typename r0::type a0;
172        typedef typename r0::next n1;
173        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
174        ///
175        typedef aux::replace_unnamed_arg< T1,n1 > r1;
176        typedef typename r1::type a1;
177        typedef typename r1::next n2;
178        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
179        ///
180     public:
181        typedef typename apply_wrap1<
182              f_
183            , typename t1::type
184            >::type type;
185
186    };
187};
188
189namespace aux {
190
191template<
192      typename F, typename T1
193    >
194aux::yes_tag
195is_bind_helper(bind1< F,T1 >*);
196
197} // namespace aux
198
199BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
200BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
201
202template<
203      typename F, typename T1, typename T2
204    >
205struct bind2
206{
207    template<
208          typename U1 = na, typename U2 = na, typename U3 = na
209        , typename U4 = na, typename U5 = na
210        >
211    struct apply
212    {
213     private:
214        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
215        typedef typename r0::type a0;
216        typedef typename r0::next n1;
217        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
218        ///
219        typedef aux::replace_unnamed_arg< T1,n1 > r1;
220        typedef typename r1::type a1;
221        typedef typename r1::next n2;
222        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
223        ///
224        typedef aux::replace_unnamed_arg< T2,n2 > r2;
225        typedef typename r2::type a2;
226        typedef typename r2::next n3;
227        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
228        ///
229     public:
230        typedef typename apply_wrap2<
231              f_
232            , typename t1::type, typename t2::type
233            >::type type;
234
235    };
236};
237
238namespace aux {
239
240template<
241      typename F, typename T1, typename T2
242    >
243aux::yes_tag
244is_bind_helper(bind2< F,T1,T2 >*);
245
246} // namespace aux
247
248BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
249BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
250
251template<
252      typename F, typename T1, typename T2, typename T3
253    >
254struct bind3
255{
256    template<
257          typename U1 = na, typename U2 = na, typename U3 = na
258        , typename U4 = na, typename U5 = na
259        >
260    struct apply
261    {
262     private:
263        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
264        typedef typename r0::type a0;
265        typedef typename r0::next n1;
266        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
267        ///
268        typedef aux::replace_unnamed_arg< T1,n1 > r1;
269        typedef typename r1::type a1;
270        typedef typename r1::next n2;
271        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
272        ///
273        typedef aux::replace_unnamed_arg< T2,n2 > r2;
274        typedef typename r2::type a2;
275        typedef typename r2::next n3;
276        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
277        ///
278        typedef aux::replace_unnamed_arg< T3,n3 > r3;
279        typedef typename r3::type a3;
280        typedef typename r3::next n4;
281        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
282        ///
283     public:
284        typedef typename apply_wrap3<
285              f_
286            , typename t1::type, typename t2::type, typename t3::type
287            >::type type;
288
289    };
290};
291
292namespace aux {
293
294template<
295      typename F, typename T1, typename T2, typename T3
296    >
297aux::yes_tag
298is_bind_helper(bind3< F,T1,T2,T3 >*);
299
300} // namespace aux
301
302BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
303BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
304
305template<
306      typename F, typename T1, typename T2, typename T3, typename T4
307    >
308struct bind4
309{
310    template<
311          typename U1 = na, typename U2 = na, typename U3 = na
312        , typename U4 = na, typename U5 = na
313        >
314    struct apply
315    {
316     private:
317        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
318        typedef typename r0::type a0;
319        typedef typename r0::next n1;
320        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
321        ///
322        typedef aux::replace_unnamed_arg< T1,n1 > r1;
323        typedef typename r1::type a1;
324        typedef typename r1::next n2;
325        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
326        ///
327        typedef aux::replace_unnamed_arg< T2,n2 > r2;
328        typedef typename r2::type a2;
329        typedef typename r2::next n3;
330        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
331        ///
332        typedef aux::replace_unnamed_arg< T3,n3 > r3;
333        typedef typename r3::type a3;
334        typedef typename r3::next n4;
335        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
336        ///
337        typedef aux::replace_unnamed_arg< T4,n4 > r4;
338        typedef typename r4::type a4;
339        typedef typename r4::next n5;
340        typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
341        ///
342     public:
343        typedef typename apply_wrap4<
344              f_
345            , typename t1::type, typename t2::type, typename t3::type
346            , typename t4::type
347            >::type type;
348
349    };
350};
351
352namespace aux {
353
354template<
355      typename F, typename T1, typename T2, typename T3, typename T4
356    >
357aux::yes_tag
358is_bind_helper(bind4< F,T1,T2,T3,T4 >*);
359
360} // namespace aux
361
362BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
363BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
364
365template<
366      typename F, typename T1, typename T2, typename T3, typename T4
367    , typename T5
368    >
369struct bind5
370{
371    template<
372          typename U1 = na, typename U2 = na, typename U3 = na
373        , typename U4 = na, typename U5 = na
374        >
375    struct apply
376    {
377     private:
378        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
379        typedef typename r0::type a0;
380        typedef typename r0::next n1;
381        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
382        ///
383        typedef aux::replace_unnamed_arg< T1,n1 > r1;
384        typedef typename r1::type a1;
385        typedef typename r1::next n2;
386        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
387        ///
388        typedef aux::replace_unnamed_arg< T2,n2 > r2;
389        typedef typename r2::type a2;
390        typedef typename r2::next n3;
391        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
392        ///
393        typedef aux::replace_unnamed_arg< T3,n3 > r3;
394        typedef typename r3::type a3;
395        typedef typename r3::next n4;
396        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
397        ///
398        typedef aux::replace_unnamed_arg< T4,n4 > r4;
399        typedef typename r4::type a4;
400        typedef typename r4::next n5;
401        typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
402        ///
403        typedef aux::replace_unnamed_arg< T5,n5 > r5;
404        typedef typename r5::type a5;
405        typedef typename r5::next n6;
406        typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5;
407        ///
408     public:
409        typedef typename apply_wrap5<
410              f_
411            , typename t1::type, typename t2::type, typename t3::type
412            , typename t4::type, typename t5::type
413            >::type type;
414
415    };
416};
417
418namespace aux {
419
420template<
421      typename F, typename T1, typename T2, typename T3, typename T4
422    , typename T5
423    >
424aux::yes_tag
425is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*);
426
427} // namespace aux
428
429BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
430BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
431}}
432
Note: See TracBrowser for help on using the repository browser.