bind_mf2_cc.hpp 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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. auto
  19. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) () BOOST_BIND_MF_NOEXCEPT, A1 a1)
  20. -> decltype( boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1 ) )
  21. {
  22. return boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1 );
  23. }
  24. template<class Rt2, class R, class T,
  25. class A1>
  26. auto
  27. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) () const BOOST_BIND_MF_NOEXCEPT, A1 a1)
  28. -> decltype( boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1 ) )
  29. {
  30. return boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1 );
  31. }
  32. // 1
  33. template<class Rt2, class R, class T,
  34. class B1,
  35. class A1, class A2>
  36. auto
  37. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2)
  38. -> decltype( boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2 ) )
  39. {
  40. return boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2 );
  41. }
  42. template<class Rt2, class R, class T,
  43. class B1,
  44. class A1, class A2>
  45. auto
  46. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2)
  47. -> decltype( boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2 ) )
  48. {
  49. return boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2 );
  50. }
  51. // 2
  52. template<class Rt2, class R, class T,
  53. class B1, class B2,
  54. class A1, class A2, class A3>
  55. auto
  56. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3)
  57. -> decltype( boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2, a3 ) )
  58. {
  59. return boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2, a3 );
  60. }
  61. template<class Rt2, class R, class T,
  62. class B1, class B2,
  63. class A1, class A2, class A3>
  64. auto
  65. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3)
  66. -> decltype( boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2, a3 ) )
  67. {
  68. return boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2, a3 );
  69. }
  70. // 3
  71. template<class Rt2, class R, class T,
  72. class B1, class B2, class B3,
  73. class A1, class A2, class A3, class A4>
  74. auto
  75. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4)
  76. -> decltype( boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2, a3, a4 ) )
  77. {
  78. return boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2, a3, a4 );
  79. }
  80. template<class Rt2, class R, class T,
  81. class B1, class B2, class B3,
  82. class A1, class A2, class A3, class A4>
  83. auto
  84. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4)
  85. -> decltype( boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2, a3, a4 ) )
  86. {
  87. return boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2, a3, a4 );
  88. }
  89. // 4
  90. template<class Rt2, class R, class T,
  91. class B1, class B2, class B3, class B4,
  92. class A1, class A2, class A3, class A4, class A5>
  93. auto
  94. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
  95. -> decltype( boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2, a3, a4, a5 ) )
  96. {
  97. return boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2, a3, a4, a5 );
  98. }
  99. template<class Rt2, class R, class T,
  100. class B1, class B2, class B3, class B4,
  101. class A1, class A2, class A3, class A4, class A5>
  102. auto
  103. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
  104. -> decltype( boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2, a3, a4, a5 ) )
  105. {
  106. return boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2, a3, a4, a5 );
  107. }
  108. // 5
  109. template<class Rt2, class R, class T,
  110. class B1, class B2, class B3, class B4, class B5,
  111. class A1, class A2, class A3, class A4, class A5, class A6>
  112. auto
  113. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
  114. -> decltype( boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2, a3, a4, a5, a6 ) )
  115. {
  116. return boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2, a3, a4, a5, a6 );
  117. }
  118. template<class Rt2, class R, class T,
  119. class B1, class B2, class B3, class B4, class B5,
  120. class A1, class A2, class A3, class A4, class A5, class A6>
  121. auto
  122. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
  123. -> decltype( boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2, a3, a4, a5, a6 ) )
  124. {
  125. return boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2, a3, a4, a5, a6 );
  126. }
  127. // 6
  128. template<class Rt2, class R, class T,
  129. class B1, class B2, class B3, class B4, class B5, class B6,
  130. class A1, class A2, class A3, class A4, class A5, class A6, class A7>
  131. auto
  132. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
  133. -> decltype( boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2, a3, a4, a5, a6, a7 ) )
  134. {
  135. return boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2, a3, a4, a5, a6, a7 );
  136. }
  137. template<class Rt2, class R, class T,
  138. class B1, class B2, class B3, class B4, class B5, class B6,
  139. class A1, class A2, class A3, class A4, class A5, class A6, class A7>
  140. auto
  141. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
  142. -> decltype( boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2, a3, a4, a5, a6, a7 ) )
  143. {
  144. return boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2, a3, a4, a5, a6, a7 );
  145. }
  146. // 7
  147. template<class Rt2, class R, class T,
  148. class B1, class B2, class B3, class B4, class B5, class B6, class B7,
  149. class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
  150. auto
  151. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
  152. -> decltype( boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2, a3, a4, a5, a6, a7, a8 ) )
  153. {
  154. return boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2, a3, a4, a5, a6, a7, a8 );
  155. }
  156. template<class Rt2, class R, class T,
  157. class B1, class B2, class B3, class B4, class B5, class B6, class B7,
  158. class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
  159. auto
  160. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
  161. -> decltype( boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2, a3, a4, a5, a6, a7, a8 ) )
  162. {
  163. return boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2, a3, a4, a5, a6, a7, a8 );
  164. }
  165. // 8
  166. template<class Rt2, class R, class T,
  167. class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
  168. class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
  169. auto
  170. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
  171. -> decltype( boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2, a3, a4, a5, a6, a7, a8, a9 ) )
  172. {
  173. return boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2, a3, a4, a5, a6, a7, a8, a9 );
  174. }
  175. template<class Rt2, class R, class T,
  176. class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
  177. class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
  178. auto
  179. BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
  180. -> decltype( boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2, a3, a4, a5, a6, a7, a8, a9 ) )
  181. {
  182. return boost::BOOST_BIND( boost::type<Rt2>(), boost::mem_fn( f ), a1, a2, a3, a4, a5, a6, a7, a8, a9 );
  183. }