bind.hpp 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  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/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. typename T
  22. , typename Arg
  23. >
  24. struct replace_unnamed_arg
  25. {
  26. typedef Arg next;
  27. typedef T type;
  28. };
  29. template<
  30. typename Arg
  31. >
  32. struct replace_unnamed_arg< arg< -1 >, Arg >
  33. {
  34. typedef typename Arg::next next;
  35. typedef Arg type;
  36. };
  37. template<
  38. int N, typename U1, typename U2, typename U3, typename U4, typename U5
  39. >
  40. struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 >
  41. {
  42. typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type;
  43. };
  44. } // namespace aux
  45. template<
  46. typename F
  47. >
  48. struct bind0
  49. {
  50. template<
  51. typename U1 = na, typename U2 = na, typename U3 = na
  52. , typename U4 = na, typename U5 = na
  53. >
  54. struct apply
  55. {
  56. private:
  57. typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
  58. typedef typename r0::type a0;
  59. typedef typename r0::next n1;
  60. typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
  61. ///
  62. public:
  63. typedef typename apply_wrap0<
  64. f_
  65. >::type type;
  66. };
  67. };
  68. namespace aux {
  69. template<
  70. typename F, typename U1, typename U2, typename U3, typename U4
  71. , typename U5
  72. >
  73. struct resolve_bind_arg<
  74. bind0<F>, U1, U2, U3, U4, U5
  75. >
  76. {
  77. typedef bind0<F> f_;
  78. typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
  79. };
  80. } // namespace aux
  81. BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
  82. BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
  83. template<
  84. typename F, typename T1
  85. >
  86. struct bind1
  87. {
  88. template<
  89. typename U1 = na, typename U2 = na, typename U3 = na
  90. , typename U4 = na, typename U5 = na
  91. >
  92. struct apply
  93. {
  94. private:
  95. typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
  96. typedef typename r0::type a0;
  97. typedef typename r0::next n1;
  98. typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
  99. ///
  100. typedef aux::replace_unnamed_arg< T1,n1 > r1;
  101. typedef typename r1::type a1;
  102. typedef typename r1::next n2;
  103. typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
  104. ///
  105. public:
  106. typedef typename apply_wrap1<
  107. f_
  108. , typename t1::type
  109. >::type type;
  110. };
  111. };
  112. namespace aux {
  113. template<
  114. typename F, typename T1, typename U1, typename U2, typename U3
  115. , typename U4, typename U5
  116. >
  117. struct resolve_bind_arg<
  118. bind1< F,T1 >, U1, U2, U3, U4, U5
  119. >
  120. {
  121. typedef bind1< F,T1 > f_;
  122. typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
  123. };
  124. } // namespace aux
  125. BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
  126. BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
  127. template<
  128. typename F, typename T1, typename T2
  129. >
  130. struct bind2
  131. {
  132. template<
  133. typename U1 = na, typename U2 = na, typename U3 = na
  134. , typename U4 = na, typename U5 = na
  135. >
  136. struct apply
  137. {
  138. private:
  139. typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
  140. typedef typename r0::type a0;
  141. typedef typename r0::next n1;
  142. typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
  143. ///
  144. typedef aux::replace_unnamed_arg< T1,n1 > r1;
  145. typedef typename r1::type a1;
  146. typedef typename r1::next n2;
  147. typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
  148. ///
  149. typedef aux::replace_unnamed_arg< T2,n2 > r2;
  150. typedef typename r2::type a2;
  151. typedef typename r2::next n3;
  152. typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
  153. ///
  154. public:
  155. typedef typename apply_wrap2<
  156. f_
  157. , typename t1::type, typename t2::type
  158. >::type type;
  159. };
  160. };
  161. namespace aux {
  162. template<
  163. typename F, typename T1, typename T2, typename U1, typename U2
  164. , typename U3, typename U4, typename U5
  165. >
  166. struct resolve_bind_arg<
  167. bind2< F,T1,T2 >, U1, U2, U3, U4, U5
  168. >
  169. {
  170. typedef bind2< F,T1,T2 > f_;
  171. typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
  172. };
  173. } // namespace aux
  174. BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
  175. BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
  176. template<
  177. typename F, typename T1, typename T2, typename T3
  178. >
  179. struct bind3
  180. {
  181. template<
  182. typename U1 = na, typename U2 = na, typename U3 = na
  183. , typename U4 = na, typename U5 = na
  184. >
  185. struct apply
  186. {
  187. private:
  188. typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
  189. typedef typename r0::type a0;
  190. typedef typename r0::next n1;
  191. typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
  192. ///
  193. typedef aux::replace_unnamed_arg< T1,n1 > r1;
  194. typedef typename r1::type a1;
  195. typedef typename r1::next n2;
  196. typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
  197. ///
  198. typedef aux::replace_unnamed_arg< T2,n2 > r2;
  199. typedef typename r2::type a2;
  200. typedef typename r2::next n3;
  201. typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
  202. ///
  203. typedef aux::replace_unnamed_arg< T3,n3 > r3;
  204. typedef typename r3::type a3;
  205. typedef typename r3::next n4;
  206. typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
  207. ///
  208. public:
  209. typedef typename apply_wrap3<
  210. f_
  211. , typename t1::type, typename t2::type, typename t3::type
  212. >::type type;
  213. };
  214. };
  215. namespace aux {
  216. template<
  217. typename F, typename T1, typename T2, typename T3, typename U1
  218. , typename U2, typename U3, typename U4, typename U5
  219. >
  220. struct resolve_bind_arg<
  221. bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5
  222. >
  223. {
  224. typedef bind3< F,T1,T2,T3 > f_;
  225. typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
  226. };
  227. } // namespace aux
  228. BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
  229. BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
  230. template<
  231. typename F, typename T1, typename T2, typename T3, typename T4
  232. >
  233. struct bind4
  234. {
  235. template<
  236. typename U1 = na, typename U2 = na, typename U3 = na
  237. , typename U4 = na, typename U5 = na
  238. >
  239. struct apply
  240. {
  241. private:
  242. typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
  243. typedef typename r0::type a0;
  244. typedef typename r0::next n1;
  245. typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
  246. ///
  247. typedef aux::replace_unnamed_arg< T1,n1 > r1;
  248. typedef typename r1::type a1;
  249. typedef typename r1::next n2;
  250. typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
  251. ///
  252. typedef aux::replace_unnamed_arg< T2,n2 > r2;
  253. typedef typename r2::type a2;
  254. typedef typename r2::next n3;
  255. typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
  256. ///
  257. typedef aux::replace_unnamed_arg< T3,n3 > r3;
  258. typedef typename r3::type a3;
  259. typedef typename r3::next n4;
  260. typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
  261. ///
  262. typedef aux::replace_unnamed_arg< T4,n4 > r4;
  263. typedef typename r4::type a4;
  264. typedef typename r4::next n5;
  265. typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
  266. ///
  267. public:
  268. typedef typename apply_wrap4<
  269. f_
  270. , typename t1::type, typename t2::type, typename t3::type
  271. , typename t4::type
  272. >::type type;
  273. };
  274. };
  275. namespace aux {
  276. template<
  277. typename F, typename T1, typename T2, typename T3, typename T4
  278. , typename U1, typename U2, typename U3, typename U4, typename U5
  279. >
  280. struct resolve_bind_arg<
  281. bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5
  282. >
  283. {
  284. typedef bind4< F,T1,T2,T3,T4 > f_;
  285. typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
  286. };
  287. } // namespace aux
  288. BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
  289. BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
  290. template<
  291. typename F, typename T1, typename T2, typename T3, typename T4
  292. , typename T5
  293. >
  294. struct bind5
  295. {
  296. template<
  297. typename U1 = na, typename U2 = na, typename U3 = na
  298. , typename U4 = na, typename U5 = na
  299. >
  300. struct apply
  301. {
  302. private:
  303. typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
  304. typedef typename r0::type a0;
  305. typedef typename r0::next n1;
  306. typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
  307. ///
  308. typedef aux::replace_unnamed_arg< T1,n1 > r1;
  309. typedef typename r1::type a1;
  310. typedef typename r1::next n2;
  311. typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
  312. ///
  313. typedef aux::replace_unnamed_arg< T2,n2 > r2;
  314. typedef typename r2::type a2;
  315. typedef typename r2::next n3;
  316. typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
  317. ///
  318. typedef aux::replace_unnamed_arg< T3,n3 > r3;
  319. typedef typename r3::type a3;
  320. typedef typename r3::next n4;
  321. typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
  322. ///
  323. typedef aux::replace_unnamed_arg< T4,n4 > r4;
  324. typedef typename r4::type a4;
  325. typedef typename r4::next n5;
  326. typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
  327. ///
  328. typedef aux::replace_unnamed_arg< T5,n5 > r5;
  329. typedef typename r5::type a5;
  330. typedef typename r5::next n6;
  331. typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5;
  332. ///
  333. public:
  334. typedef typename apply_wrap5<
  335. f_
  336. , typename t1::type, typename t2::type, typename t3::type
  337. , typename t4::type, typename t5::type
  338. >::type type;
  339. };
  340. };
  341. namespace aux {
  342. template<
  343. typename F, typename T1, typename T2, typename T3, typename T4
  344. , typename T5, typename U1, typename U2, typename U3, typename U4
  345. , typename U5
  346. >
  347. struct resolve_bind_arg<
  348. bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5
  349. >
  350. {
  351. typedef bind5< F,T1,T2,T3,T4,T5 > f_;
  352. typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
  353. };
  354. } // namespace aux
  355. BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
  356. BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
  357. }}