apply_wrap.hpp 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462
  1. // Copyright Aleksey Gurtovoy 2000-2008
  2. //
  3. // Distributed under the Boost Software License, Version 1.0.
  4. // (See accompanying file LICENSE_1_0.txt or copy at
  5. // http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. // *Preprocessed* version of the main "apply_wrap.hpp" header
  8. // -- DO NOT modify by hand!
  9. namespace boost { namespace mpl {
  10. template<
  11. int N, typename F
  12. >
  13. struct apply_wrap_impl0;
  14. template< typename F, bool F_has_apply >
  15. struct apply_wrap_impl0_bcb {
  16. typedef typename F::template apply<na> type;
  17. };
  18. template< typename F >
  19. struct apply_wrap_impl0_bcb< F,true > {
  20. typedef typename F::apply type;
  21. };
  22. template<
  23. typename F
  24. >
  25. struct apply_wrap_impl0<
  26. 0
  27. , F
  28. >
  29. {
  30. typedef apply_wrap_impl0_bcb< F, aux::has_apply<F>::value >::type type;
  31. };
  32. template<
  33. typename F
  34. >
  35. struct apply_wrap_impl0<
  36. 1
  37. , F
  38. >
  39. {
  40. typedef typename F::template apply<
  41. na
  42. > type;
  43. };
  44. template<
  45. typename F
  46. >
  47. struct apply_wrap_impl0<
  48. 2
  49. , F
  50. >
  51. {
  52. typedef typename F::template apply<
  53. na, na
  54. > type;
  55. };
  56. template<
  57. typename F
  58. >
  59. struct apply_wrap_impl0<
  60. 3
  61. , F
  62. >
  63. {
  64. typedef typename F::template apply<
  65. na, na, na
  66. > type;
  67. };
  68. template<
  69. typename F
  70. >
  71. struct apply_wrap_impl0<
  72. 4
  73. , F
  74. >
  75. {
  76. typedef typename F::template apply<
  77. na, na, na, na
  78. > type;
  79. };
  80. template<
  81. typename F
  82. >
  83. struct apply_wrap_impl0<
  84. 5
  85. , F
  86. >
  87. {
  88. typedef typename F::template apply<
  89. na, na, na, na, na
  90. > type;
  91. };
  92. template<
  93. typename F
  94. >
  95. struct apply_wrap0
  96. : apply_wrap_impl0<
  97. ::boost::mpl::aux::arity< F,0 >::value
  98. , F
  99. >::type
  100. {
  101. };
  102. template<
  103. int N, typename F, typename T1
  104. >
  105. struct apply_wrap_impl1;
  106. template<
  107. typename F, typename T1
  108. >
  109. struct apply_wrap_impl1<
  110. 1
  111. , F
  112. , T1
  113. >
  114. {
  115. typedef typename F::template apply<
  116. T1
  117. > type;
  118. };
  119. template<
  120. typename F, typename T1
  121. >
  122. struct apply_wrap_impl1<
  123. 2
  124. , F
  125. , T1
  126. >
  127. {
  128. typedef typename F::template apply<
  129. T1
  130. , na
  131. > type;
  132. };
  133. template<
  134. typename F, typename T1
  135. >
  136. struct apply_wrap_impl1<
  137. 3
  138. , F
  139. , T1
  140. >
  141. {
  142. typedef typename F::template apply<
  143. T1
  144. , na, na
  145. > type;
  146. };
  147. template<
  148. typename F, typename T1
  149. >
  150. struct apply_wrap_impl1<
  151. 4
  152. , F
  153. , T1
  154. >
  155. {
  156. typedef typename F::template apply<
  157. T1
  158. , na, na, na
  159. > type;
  160. };
  161. template<
  162. typename F, typename T1
  163. >
  164. struct apply_wrap_impl1<
  165. 5
  166. , F
  167. , T1
  168. >
  169. {
  170. typedef typename F::template apply<
  171. T1
  172. , na, na, na, na
  173. > type;
  174. };
  175. template<
  176. typename F, typename T1
  177. >
  178. struct apply_wrap1
  179. : apply_wrap_impl1<
  180. ::boost::mpl::aux::arity< F,1 >::value
  181. , F
  182. , T1
  183. >::type
  184. {
  185. };
  186. template<
  187. int N, typename F, typename T1, typename T2
  188. >
  189. struct apply_wrap_impl2;
  190. template<
  191. typename F, typename T1, typename T2
  192. >
  193. struct apply_wrap_impl2<
  194. 2
  195. , F
  196. , T1, T2
  197. >
  198. {
  199. typedef typename F::template apply<
  200. T1, T2
  201. > type;
  202. };
  203. template<
  204. typename F, typename T1, typename T2
  205. >
  206. struct apply_wrap_impl2<
  207. 3
  208. , F
  209. , T1, T2
  210. >
  211. {
  212. typedef typename F::template apply<
  213. T1, T2
  214. , na
  215. > type;
  216. };
  217. template<
  218. typename F, typename T1, typename T2
  219. >
  220. struct apply_wrap_impl2<
  221. 4
  222. , F
  223. , T1, T2
  224. >
  225. {
  226. typedef typename F::template apply<
  227. T1, T2
  228. , na, na
  229. > type;
  230. };
  231. template<
  232. typename F, typename T1, typename T2
  233. >
  234. struct apply_wrap_impl2<
  235. 5
  236. , F
  237. , T1, T2
  238. >
  239. {
  240. typedef typename F::template apply<
  241. T1, T2
  242. , na, na, na
  243. > type;
  244. };
  245. template<
  246. typename F, typename T1, typename T2
  247. >
  248. struct apply_wrap2
  249. : apply_wrap_impl2<
  250. ::boost::mpl::aux::arity< F,2 >::value
  251. , F
  252. , T1, T2
  253. >::type
  254. {
  255. };
  256. template<
  257. int N, typename F, typename T1, typename T2, typename T3
  258. >
  259. struct apply_wrap_impl3;
  260. template<
  261. typename F, typename T1, typename T2, typename T3
  262. >
  263. struct apply_wrap_impl3<
  264. 3
  265. , F
  266. , T1, T2, T3
  267. >
  268. {
  269. typedef typename F::template apply<
  270. T1, T2, T3
  271. > type;
  272. };
  273. template<
  274. typename F, typename T1, typename T2, typename T3
  275. >
  276. struct apply_wrap_impl3<
  277. 4
  278. , F
  279. , T1, T2, T3
  280. >
  281. {
  282. typedef typename F::template apply<
  283. T1, T2, T3
  284. , na
  285. > type;
  286. };
  287. template<
  288. typename F, typename T1, typename T2, typename T3
  289. >
  290. struct apply_wrap_impl3<
  291. 5
  292. , F
  293. , T1, T2, T3
  294. >
  295. {
  296. typedef typename F::template apply<
  297. T1, T2, T3
  298. , na, na
  299. > type;
  300. };
  301. template<
  302. typename F, typename T1, typename T2, typename T3
  303. >
  304. struct apply_wrap3
  305. : apply_wrap_impl3<
  306. ::boost::mpl::aux::arity< F,3 >::value
  307. , F
  308. , T1, T2, T3
  309. >::type
  310. {
  311. };
  312. template<
  313. int N, typename F, typename T1, typename T2, typename T3, typename T4
  314. >
  315. struct apply_wrap_impl4;
  316. template<
  317. typename F, typename T1, typename T2, typename T3, typename T4
  318. >
  319. struct apply_wrap_impl4<
  320. 4
  321. , F
  322. , T1, T2, T3, T4
  323. >
  324. {
  325. typedef typename F::template apply<
  326. T1, T2, T3, T4
  327. > type;
  328. };
  329. template<
  330. typename F, typename T1, typename T2, typename T3, typename T4
  331. >
  332. struct apply_wrap_impl4<
  333. 5
  334. , F
  335. , T1, T2, T3, T4
  336. >
  337. {
  338. typedef typename F::template apply<
  339. T1, T2, T3, T4
  340. , na
  341. > type;
  342. };
  343. template<
  344. typename F, typename T1, typename T2, typename T3, typename T4
  345. >
  346. struct apply_wrap4
  347. : apply_wrap_impl4<
  348. ::boost::mpl::aux::arity< F,4 >::value
  349. , F
  350. , T1, T2, T3, T4
  351. >::type
  352. {
  353. };
  354. template<
  355. int N, typename F, typename T1, typename T2, typename T3, typename T4
  356. , typename T5
  357. >
  358. struct apply_wrap_impl5;
  359. template<
  360. typename F, typename T1, typename T2, typename T3, typename T4
  361. , typename T5
  362. >
  363. struct apply_wrap_impl5<
  364. 5
  365. , F
  366. , T1, T2, T3, T4, T5
  367. >
  368. {
  369. typedef typename F::template apply<
  370. T1, T2, T3, T4, T5
  371. > type;
  372. };
  373. template<
  374. typename F, typename T1, typename T2, typename T3, typename T4
  375. , typename T5
  376. >
  377. struct apply_wrap5
  378. : apply_wrap_impl5<
  379. ::boost::mpl::aux::arity< F,5 >::value
  380. , F
  381. , T1, T2, T3, T4, T5
  382. >::type
  383. {
  384. };
  385. }}