apply_wrap.hpp 6.8 KB

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