basic_bind.hpp 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. // Copyright Peter Dimov 2001
  2. // Copyright Aleksey Gurtovoy 2001-2004
  3. //
  4. // Distributed under the Boost Software License, Version 1.0.
  5. // (See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt)
  7. //
  8. // Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header
  9. // -- DO NOT modify by hand!
  10. namespace boost { namespace mpl {
  11. namespace aux {
  12. template<
  13. typename T, typename U1, typename U2, typename U3, typename U4
  14. , typename U5
  15. >
  16. struct resolve_bind_arg
  17. {
  18. typedef T type;
  19. };
  20. template<
  21. int N, typename U1, typename U2, typename U3, typename U4, typename U5
  22. >
  23. struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 >
  24. {
  25. typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type;
  26. };
  27. } // namespace aux
  28. template<
  29. typename F
  30. >
  31. struct bind0
  32. {
  33. template<
  34. typename U1 = na, typename U2 = na, typename U3 = na
  35. , typename U4 = na, typename U5 = na
  36. >
  37. struct apply
  38. {
  39. private:
  40. typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
  41. public:
  42. typedef typename apply_wrap0<
  43. f_
  44. >::type type;
  45. };
  46. };
  47. namespace aux {
  48. template<
  49. typename F, typename U1, typename U2, typename U3, typename U4
  50. , typename U5
  51. >
  52. struct resolve_bind_arg<
  53. bind0<F>, U1, U2, U3, U4, U5
  54. >
  55. {
  56. typedef bind0<F> f_;
  57. typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
  58. };
  59. } // namespace aux
  60. BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
  61. BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
  62. template<
  63. typename F, typename T1
  64. >
  65. struct bind1
  66. {
  67. template<
  68. typename U1 = na, typename U2 = na, typename U3 = na
  69. , typename U4 = na, typename U5 = na
  70. >
  71. struct apply
  72. {
  73. private:
  74. typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
  75. typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
  76. public:
  77. typedef typename apply_wrap1<
  78. f_
  79. , typename t1::type
  80. >::type type;
  81. };
  82. };
  83. namespace aux {
  84. template<
  85. typename F, typename T1, typename U1, typename U2, typename U3
  86. , typename U4, typename U5
  87. >
  88. struct resolve_bind_arg<
  89. bind1< F,T1 >, U1, U2, U3, U4, U5
  90. >
  91. {
  92. typedef bind1< F,T1 > f_;
  93. typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
  94. };
  95. } // namespace aux
  96. BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
  97. BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
  98. template<
  99. typename F, typename T1, typename T2
  100. >
  101. struct bind2
  102. {
  103. template<
  104. typename U1 = na, typename U2 = na, typename U3 = na
  105. , typename U4 = na, typename U5 = na
  106. >
  107. struct apply
  108. {
  109. private:
  110. typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
  111. typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
  112. typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
  113. public:
  114. typedef typename apply_wrap2<
  115. f_
  116. , typename t1::type, typename t2::type
  117. >::type type;
  118. };
  119. };
  120. namespace aux {
  121. template<
  122. typename F, typename T1, typename T2, typename U1, typename U2
  123. , typename U3, typename U4, typename U5
  124. >
  125. struct resolve_bind_arg<
  126. bind2< F,T1,T2 >, U1, U2, U3, U4, U5
  127. >
  128. {
  129. typedef bind2< F,T1,T2 > f_;
  130. typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
  131. };
  132. } // namespace aux
  133. BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
  134. BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
  135. template<
  136. typename F, typename T1, typename T2, typename T3
  137. >
  138. struct bind3
  139. {
  140. template<
  141. typename U1 = na, typename U2 = na, typename U3 = na
  142. , typename U4 = na, typename U5 = na
  143. >
  144. struct apply
  145. {
  146. private:
  147. typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
  148. typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
  149. typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
  150. typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
  151. public:
  152. typedef typename apply_wrap3<
  153. f_
  154. , typename t1::type, typename t2::type, typename t3::type
  155. >::type type;
  156. };
  157. };
  158. namespace aux {
  159. template<
  160. typename F, typename T1, typename T2, typename T3, typename U1
  161. , typename U2, typename U3, typename U4, typename U5
  162. >
  163. struct resolve_bind_arg<
  164. bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5
  165. >
  166. {
  167. typedef bind3< F,T1,T2,T3 > f_;
  168. typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
  169. };
  170. } // namespace aux
  171. BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
  172. BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
  173. template<
  174. typename F, typename T1, typename T2, typename T3, typename T4
  175. >
  176. struct bind4
  177. {
  178. template<
  179. typename U1 = na, typename U2 = na, typename U3 = na
  180. , typename U4 = na, typename U5 = na
  181. >
  182. struct apply
  183. {
  184. private:
  185. typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
  186. typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
  187. typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
  188. typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
  189. typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
  190. public:
  191. typedef typename apply_wrap4<
  192. f_
  193. , typename t1::type, typename t2::type, typename t3::type
  194. , typename t4::type
  195. >::type type;
  196. };
  197. };
  198. namespace aux {
  199. template<
  200. typename F, typename T1, typename T2, typename T3, typename T4
  201. , typename U1, typename U2, typename U3, typename U4, typename U5
  202. >
  203. struct resolve_bind_arg<
  204. bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5
  205. >
  206. {
  207. typedef bind4< F,T1,T2,T3,T4 > f_;
  208. typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
  209. };
  210. } // namespace aux
  211. BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
  212. BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
  213. template<
  214. typename F, typename T1, typename T2, typename T3, typename T4
  215. , typename T5
  216. >
  217. struct bind5
  218. {
  219. template<
  220. typename U1 = na, typename U2 = na, typename U3 = na
  221. , typename U4 = na, typename U5 = na
  222. >
  223. struct apply
  224. {
  225. private:
  226. typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
  227. typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
  228. typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
  229. typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
  230. typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
  231. typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5;
  232. public:
  233. typedef typename apply_wrap5<
  234. f_
  235. , typename t1::type, typename t2::type, typename t3::type
  236. , typename t4::type, typename t5::type
  237. >::type type;
  238. };
  239. };
  240. namespace aux {
  241. template<
  242. typename F, typename T1, typename T2, typename T3, typename T4
  243. , typename T5, typename U1, typename U2, typename U3, typename U4
  244. , typename U5
  245. >
  246. struct resolve_bind_arg<
  247. bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5
  248. >
  249. {
  250. typedef bind5< F,T1,T2,T3,T4,T5 > f_;
  251. typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
  252. };
  253. } // namespace aux
  254. BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
  255. BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
  256. }}