blob: cb95e6aad75ec06bc98c7ec56996a8887e975a44 [file] [log] [blame]
Jeff Thompsonef2d5a42013-08-22 19:09:24 -07001//
2// bind/bind_cc.hpp - support for different calling conventions
3//
4// Do not include this header directly.
5//
6// Copyright (c) 2001 Peter Dimov and Multi Media Ltd.
7//
8// Distributed under the Boost Software License, Version 1.0. (See
9// accompanying file LICENSE_1_0.txt or copy at
10// http://www.boost.org/LICENSE_1_0.txt)
11//
12// See http://www.boost.org/libs/bind/bind.html for documentation.
13//
14
15template<class R>
Jeff Thompson3d613fd2013-10-15 15:39:04 -070016 _bi::bind_t<R, NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *) (), _bi::list0>
17 NDNBOOST_BIND(NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *f) ())
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070018{
Jeff Thompson3d613fd2013-10-15 15:39:04 -070019 typedef NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *F) ();
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070020 typedef _bi::list0 list_type;
21 return _bi::bind_t<R, F, list_type> (f, list_type());
22}
23
24template<class R, class B1, class A1>
Jeff Thompson3d613fd2013-10-15 15:39:04 -070025 _bi::bind_t<R, NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *) (B1), typename _bi::list_av_1<A1>::type>
26 NDNBOOST_BIND(NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *f) (B1), A1 a1)
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070027{
Jeff Thompson3d613fd2013-10-15 15:39:04 -070028 typedef NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *F) (B1);
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070029 typedef typename _bi::list_av_1<A1>::type list_type;
30 return _bi::bind_t<R, F, list_type> (f, list_type(a1));
31}
32
33template<class R, class B1, class B2, class A1, class A2>
Jeff Thompson3d613fd2013-10-15 15:39:04 -070034 _bi::bind_t<R, NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *) (B1, B2), typename _bi::list_av_2<A1, A2>::type>
35 NDNBOOST_BIND(NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *f) (B1, B2), A1 a1, A2 a2)
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070036{
Jeff Thompson3d613fd2013-10-15 15:39:04 -070037 typedef NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *F) (B1, B2);
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070038 typedef typename _bi::list_av_2<A1, A2>::type list_type;
39 return _bi::bind_t<R, F, list_type> (f, list_type(a1, a2));
40}
41
42template<class R,
43 class B1, class B2, class B3,
44 class A1, class A2, class A3>
Jeff Thompson3d613fd2013-10-15 15:39:04 -070045 _bi::bind_t<R, NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *) (B1, B2, B3), typename _bi::list_av_3<A1, A2, A3>::type>
46 NDNBOOST_BIND(NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *f) (B1, B2, B3), A1 a1, A2 a2, A3 a3)
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070047{
Jeff Thompson3d613fd2013-10-15 15:39:04 -070048 typedef NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *F) (B1, B2, B3);
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070049 typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
50 return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3));
51}
52
53template<class R,
54 class B1, class B2, class B3, class B4,
55 class A1, class A2, class A3, class A4>
Jeff Thompson3d613fd2013-10-15 15:39:04 -070056 _bi::bind_t<R, NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *) (B1, B2, B3, B4), typename _bi::list_av_4<A1, A2, A3, A4>::type>
57 NDNBOOST_BIND(NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4)
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070058{
Jeff Thompson3d613fd2013-10-15 15:39:04 -070059 typedef NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *F) (B1, B2, B3, B4);
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070060 typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
61 return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4));
62}
63
64template<class R,
65 class B1, class B2, class B3, class B4, class B5,
66 class A1, class A2, class A3, class A4, class A5>
Jeff Thompson3d613fd2013-10-15 15:39:04 -070067 _bi::bind_t<R, NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *) (B1, B2, B3, B4, B5), typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
68 NDNBOOST_BIND(NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070069{
Jeff Thompson3d613fd2013-10-15 15:39:04 -070070 typedef NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *F) (B1, B2, B3, B4, B5);
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070071 typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
72 return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5));
73}
74
75template<class R,
76 class B1, class B2, class B3, class B4, class B5, class B6,
77 class A1, class A2, class A3, class A4, class A5, class A6>
Jeff Thompson3d613fd2013-10-15 15:39:04 -070078 _bi::bind_t<R, NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6), typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
79 NDNBOOST_BIND(NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070080{
Jeff Thompson3d613fd2013-10-15 15:39:04 -070081 typedef NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6);
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070082 typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
83 return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6));
84}
85
86template<class R,
87 class B1, class B2, class B3, class B4, class B5, class B6, class B7,
88 class A1, class A2, class A3, class A4, class A5, class A6, class A7>
Jeff Thompson3d613fd2013-10-15 15:39:04 -070089 _bi::bind_t<R, NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6, B7), typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
90 NDNBOOST_BIND(NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070091{
Jeff Thompson3d613fd2013-10-15 15:39:04 -070092 typedef NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7);
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070093 typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
94 return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7));
95}
96
97template<class R,
98 class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
99 class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700100 _bi::bind_t<R, NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6, B7, B8), typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
101 NDNBOOST_BIND(NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
Jeff Thompsonef2d5a42013-08-22 19:09:24 -0700102{
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700103 typedef NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8);
Jeff Thompsonef2d5a42013-08-22 19:09:24 -0700104 typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
105 return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8));
106}
107
108template<class R,
109 class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8, class B9,
110 class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700111 _bi::bind_t<R, NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6, B7, B8, B9), typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
112 NDNBOOST_BIND(NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8, B9), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
Jeff Thompsonef2d5a42013-08-22 19:09:24 -0700113{
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700114 typedef NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8, B9);
Jeff Thompsonef2d5a42013-08-22 19:09:24 -0700115 typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
116 return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
117}