bind_mf2_cc.hpp 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. //
  2. // bind/bind_mf2_cc.hpp - member functions, type<> syntax
  3. //
  4. // Do not include this header directly.
  5. //
  6. // Copyright (c) 2001 Peter Dimov and Multi Media Ltd.
  7. // Copyright (c) 2008 Peter Dimov
  8. //
  9. // Distributed under the Boost Software License, Version 1.0.
  10. // See accompanying file LICENSE_1_0.txt or copy at
  11. // http://www.boost.org/LICENSE_1_0.txt
  12. //
  13. // See http://www.boost.org/libs/bind/bind.html for documentation.
  14. //
  15. // 0
  16. template<class Rt2, class R, class T,
  17. class A1>
  18. _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf0)<R, T>, typename _bi::list_av_1<A1>::type>
  19. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (), A1 a1)
  20. {
  21. typedef _mfi::BOOST_BIND_MF_NAME(mf0)<R, T> F;
  22. typedef typename _bi::list_av_1<A1>::type list_type;
  23. return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1));
  24. }
  25. template<class Rt2, class R, class T,
  26. class A1>
  27. _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T>, typename _bi::list_av_1<A1>::type>
  28. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) () const, A1 a1)
  29. {
  30. typedef _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T> F;
  31. typedef typename _bi::list_av_1<A1>::type list_type;
  32. return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1));
  33. }
  34. // 1
  35. template<class Rt2, class R, class T,
  36. class B1,
  37. class A1, class A2>
  38. _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type>
  39. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1), A1 a1, A2 a2)
  40. {
  41. typedef _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1> F;
  42. typedef typename _bi::list_av_2<A1, A2>::type list_type;
  43. return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2));
  44. }
  45. template<class Rt2, class R, class T,
  46. class B1,
  47. class A1, class A2>
  48. _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type>
  49. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1) const, A1 a1, A2 a2)
  50. {
  51. typedef _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1> F;
  52. typedef typename _bi::list_av_2<A1, A2>::type list_type;
  53. return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2));
  54. }
  55. // 2
  56. template<class Rt2, class R, class T,
  57. class B1, class B2,
  58. class A1, class A2, class A3>
  59. _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type>
  60. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2), A1 a1, A2 a2, A3 a3)
  61. {
  62. typedef _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2> F;
  63. typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
  64. return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3));
  65. }
  66. template<class Rt2, class R, class T,
  67. class B1, class B2,
  68. class A1, class A2, class A3>
  69. _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type>
  70. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3)
  71. {
  72. typedef _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2> F;
  73. typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
  74. return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3));
  75. }
  76. // 3
  77. template<class Rt2, class R, class T,
  78. class B1, class B2, class B3,
  79. class A1, class A2, class A3, class A4>
  80. _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type>
  81. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3), A1 a1, A2 a2, A3 a3, A4 a4)
  82. {
  83. typedef _mfi::BOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3> F;
  84. typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
  85. return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4));
  86. }
  87. template<class Rt2, class R, class T,
  88. class B1, class B2, class B3,
  89. class A1, class A2, class A3, class A4>
  90. _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type>
  91. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const, A1 a1, A2 a2, A3 a3, A4 a4)
  92. {
  93. typedef _mfi::BOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3> F;
  94. typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
  95. return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4));
  96. }
  97. // 4
  98. template<class Rt2, class R, class T,
  99. class B1, class B2, class B3, class B4,
  100. class A1, class A2, class A3, class A4, class A5>
  101. _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
  102. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
  103. {
  104. typedef _mfi::BOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4> F;
  105. typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
  106. return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5));
  107. }
  108. template<class Rt2, class R, class T,
  109. class B1, class B2, class B3, class B4,
  110. class A1, class A2, class A3, class A4, class A5>
  111. _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
  112. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
  113. {
  114. typedef _mfi::BOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4> F;
  115. typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
  116. return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5));
  117. }
  118. // 5
  119. template<class Rt2, class R, class T,
  120. class B1, class B2, class B3, class B4, class B5,
  121. class A1, class A2, class A3, class A4, class A5, class A6>
  122. _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
  123. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
  124. {
  125. typedef _mfi::BOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5> F;
  126. typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
  127. return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6));
  128. }
  129. template<class Rt2, class R, class T,
  130. class B1, class B2, class B3, class B4, class B5,
  131. class A1, class A2, class A3, class A4, class A5, class A6>
  132. _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
  133. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
  134. {
  135. typedef _mfi::BOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5> F;
  136. typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
  137. return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6));
  138. }
  139. // 6
  140. template<class Rt2, class R, class T,
  141. class B1, class B2, class B3, class B4, class B5, class B6,
  142. class A1, class A2, class A3, class A4, class A5, class A6, class A7>
  143. _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
  144. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
  145. {
  146. typedef _mfi::BOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6> F;
  147. typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
  148. return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7));
  149. }
  150. template<class Rt2, class R, class T,
  151. class B1, class B2, class B3, class B4, class B5, class B6,
  152. class A1, class A2, class A3, class A4, class A5, class A6, class A7>
  153. _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
  154. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
  155. {
  156. typedef _mfi::BOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6> F;
  157. typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
  158. return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7));
  159. }
  160. // 7
  161. template<class Rt2, class R, class T,
  162. class B1, class B2, class B3, class B4, class B5, class B6, class B7,
  163. class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
  164. _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
  165. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
  166. {
  167. typedef _mfi::BOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F;
  168. typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
  169. return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8));
  170. }
  171. template<class Rt2, class R, class T,
  172. class B1, class B2, class B3, class B4, class B5, class B6, class B7,
  173. class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
  174. _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
  175. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
  176. {
  177. typedef _mfi::BOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F;
  178. typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
  179. return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8));
  180. }
  181. // 8
  182. template<class Rt2, class R, class T,
  183. class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
  184. class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
  185. _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
  186. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*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, A9 a9)
  187. {
  188. typedef _mfi::BOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F;
  189. typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
  190. return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
  191. }
  192. template<class Rt2, class R, class T,
  193. class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
  194. class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
  195. _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
  196. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
  197. {
  198. typedef _mfi::BOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F;
  199. typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
  200. return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
  201. }