vector_c.hpp 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534
  1. // Copyright Aleksey Gurtovoy 2000-2004
  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 "boost/mpl/vector_c.hpp" header
  8. // -- DO NOT modify by hand!
  9. namespace boost { namespace mpl {
  10. namespace aux {
  11. template< int N >
  12. struct vector_c_chooser;
  13. }
  14. namespace aux {
  15. template<>
  16. struct vector_c_chooser<0>
  17. {
  18. template<
  19. typename T, long C0, long C1, long C2, long C3, long C4, long C5
  20. , long C6, long C7, long C8, long C9, long C10, long C11, long C12
  21. , long C13, long C14, long C15, long C16, long C17, long C18, long C19
  22. >
  23. struct result_
  24. {
  25. typedef typename vector0_c<
  26. T
  27. >::type type;
  28. };
  29. };
  30. } // namespace aux
  31. namespace aux {
  32. template<>
  33. struct vector_c_chooser<1>
  34. {
  35. template<
  36. typename T, long C0, long C1, long C2, long C3, long C4, long C5
  37. , long C6, long C7, long C8, long C9, long C10, long C11, long C12
  38. , long C13, long C14, long C15, long C16, long C17, long C18, long C19
  39. >
  40. struct result_
  41. {
  42. typedef typename vector1_c<
  43. T, T(C0)
  44. >::type type;
  45. };
  46. };
  47. } // namespace aux
  48. namespace aux {
  49. template<>
  50. struct vector_c_chooser<2>
  51. {
  52. template<
  53. typename T, long C0, long C1, long C2, long C3, long C4, long C5
  54. , long C6, long C7, long C8, long C9, long C10, long C11, long C12
  55. , long C13, long C14, long C15, long C16, long C17, long C18, long C19
  56. >
  57. struct result_
  58. {
  59. typedef typename vector2_c<
  60. T, T(C0), T(C1)
  61. >::type type;
  62. };
  63. };
  64. } // namespace aux
  65. namespace aux {
  66. template<>
  67. struct vector_c_chooser<3>
  68. {
  69. template<
  70. typename T, long C0, long C1, long C2, long C3, long C4, long C5
  71. , long C6, long C7, long C8, long C9, long C10, long C11, long C12
  72. , long C13, long C14, long C15, long C16, long C17, long C18, long C19
  73. >
  74. struct result_
  75. {
  76. typedef typename vector3_c<
  77. T, T(C0), T(C1), T(C2)
  78. >::type type;
  79. };
  80. };
  81. } // namespace aux
  82. namespace aux {
  83. template<>
  84. struct vector_c_chooser<4>
  85. {
  86. template<
  87. typename T, long C0, long C1, long C2, long C3, long C4, long C5
  88. , long C6, long C7, long C8, long C9, long C10, long C11, long C12
  89. , long C13, long C14, long C15, long C16, long C17, long C18, long C19
  90. >
  91. struct result_
  92. {
  93. typedef typename vector4_c<
  94. T, T(C0), T(C1), T(C2), T(C3)
  95. >::type type;
  96. };
  97. };
  98. } // namespace aux
  99. namespace aux {
  100. template<>
  101. struct vector_c_chooser<5>
  102. {
  103. template<
  104. typename T, long C0, long C1, long C2, long C3, long C4, long C5
  105. , long C6, long C7, long C8, long C9, long C10, long C11, long C12
  106. , long C13, long C14, long C15, long C16, long C17, long C18, long C19
  107. >
  108. struct result_
  109. {
  110. typedef typename vector5_c<
  111. T, T(C0), T(C1), T(C2), T(C3), T(C4)
  112. >::type type;
  113. };
  114. };
  115. } // namespace aux
  116. namespace aux {
  117. template<>
  118. struct vector_c_chooser<6>
  119. {
  120. template<
  121. typename T, long C0, long C1, long C2, long C3, long C4, long C5
  122. , long C6, long C7, long C8, long C9, long C10, long C11, long C12
  123. , long C13, long C14, long C15, long C16, long C17, long C18, long C19
  124. >
  125. struct result_
  126. {
  127. typedef typename vector6_c<
  128. T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5)
  129. >::type type;
  130. };
  131. };
  132. } // namespace aux
  133. namespace aux {
  134. template<>
  135. struct vector_c_chooser<7>
  136. {
  137. template<
  138. typename T, long C0, long C1, long C2, long C3, long C4, long C5
  139. , long C6, long C7, long C8, long C9, long C10, long C11, long C12
  140. , long C13, long C14, long C15, long C16, long C17, long C18, long C19
  141. >
  142. struct result_
  143. {
  144. typedef typename vector7_c<
  145. T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6)
  146. >::type type;
  147. };
  148. };
  149. } // namespace aux
  150. namespace aux {
  151. template<>
  152. struct vector_c_chooser<8>
  153. {
  154. template<
  155. typename T, long C0, long C1, long C2, long C3, long C4, long C5
  156. , long C6, long C7, long C8, long C9, long C10, long C11, long C12
  157. , long C13, long C14, long C15, long C16, long C17, long C18, long C19
  158. >
  159. struct result_
  160. {
  161. typedef typename vector8_c<
  162. T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7)
  163. >::type type;
  164. };
  165. };
  166. } // namespace aux
  167. namespace aux {
  168. template<>
  169. struct vector_c_chooser<9>
  170. {
  171. template<
  172. typename T, long C0, long C1, long C2, long C3, long C4, long C5
  173. , long C6, long C7, long C8, long C9, long C10, long C11, long C12
  174. , long C13, long C14, long C15, long C16, long C17, long C18, long C19
  175. >
  176. struct result_
  177. {
  178. typedef typename vector9_c<
  179. T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8)
  180. >::type type;
  181. };
  182. };
  183. } // namespace aux
  184. namespace aux {
  185. template<>
  186. struct vector_c_chooser<10>
  187. {
  188. template<
  189. typename T, long C0, long C1, long C2, long C3, long C4, long C5
  190. , long C6, long C7, long C8, long C9, long C10, long C11, long C12
  191. , long C13, long C14, long C15, long C16, long C17, long C18, long C19
  192. >
  193. struct result_
  194. {
  195. typedef typename vector10_c<
  196. T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9)
  197. >::type type;
  198. };
  199. };
  200. } // namespace aux
  201. namespace aux {
  202. template<>
  203. struct vector_c_chooser<11>
  204. {
  205. template<
  206. typename T, long C0, long C1, long C2, long C3, long C4, long C5
  207. , long C6, long C7, long C8, long C9, long C10, long C11, long C12
  208. , long C13, long C14, long C15, long C16, long C17, long C18, long C19
  209. >
  210. struct result_
  211. {
  212. typedef typename vector11_c<
  213. T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10)
  214. >::type type;
  215. };
  216. };
  217. } // namespace aux
  218. namespace aux {
  219. template<>
  220. struct vector_c_chooser<12>
  221. {
  222. template<
  223. typename T, long C0, long C1, long C2, long C3, long C4, long C5
  224. , long C6, long C7, long C8, long C9, long C10, long C11, long C12
  225. , long C13, long C14, long C15, long C16, long C17, long C18, long C19
  226. >
  227. struct result_
  228. {
  229. typedef typename vector12_c<
  230. T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11)
  231. >::type type;
  232. };
  233. };
  234. } // namespace aux
  235. namespace aux {
  236. template<>
  237. struct vector_c_chooser<13>
  238. {
  239. template<
  240. typename T, long C0, long C1, long C2, long C3, long C4, long C5
  241. , long C6, long C7, long C8, long C9, long C10, long C11, long C12
  242. , long C13, long C14, long C15, long C16, long C17, long C18, long C19
  243. >
  244. struct result_
  245. {
  246. typedef typename vector13_c<
  247. T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12)
  248. >::type type;
  249. };
  250. };
  251. } // namespace aux
  252. namespace aux {
  253. template<>
  254. struct vector_c_chooser<14>
  255. {
  256. template<
  257. typename T, long C0, long C1, long C2, long C3, long C4, long C5
  258. , long C6, long C7, long C8, long C9, long C10, long C11, long C12
  259. , long C13, long C14, long C15, long C16, long C17, long C18, long C19
  260. >
  261. struct result_
  262. {
  263. typedef typename vector14_c<
  264. T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13)
  265. >::type type;
  266. };
  267. };
  268. } // namespace aux
  269. namespace aux {
  270. template<>
  271. struct vector_c_chooser<15>
  272. {
  273. template<
  274. typename T, long C0, long C1, long C2, long C3, long C4, long C5
  275. , long C6, long C7, long C8, long C9, long C10, long C11, long C12
  276. , long C13, long C14, long C15, long C16, long C17, long C18, long C19
  277. >
  278. struct result_
  279. {
  280. typedef typename vector15_c<
  281. T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14)
  282. >::type type;
  283. };
  284. };
  285. } // namespace aux
  286. namespace aux {
  287. template<>
  288. struct vector_c_chooser<16>
  289. {
  290. template<
  291. typename T, long C0, long C1, long C2, long C3, long C4, long C5
  292. , long C6, long C7, long C8, long C9, long C10, long C11, long C12
  293. , long C13, long C14, long C15, long C16, long C17, long C18, long C19
  294. >
  295. struct result_
  296. {
  297. typedef typename vector16_c<
  298. T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15)
  299. >::type type;
  300. };
  301. };
  302. } // namespace aux
  303. namespace aux {
  304. template<>
  305. struct vector_c_chooser<17>
  306. {
  307. template<
  308. typename T, long C0, long C1, long C2, long C3, long C4, long C5
  309. , long C6, long C7, long C8, long C9, long C10, long C11, long C12
  310. , long C13, long C14, long C15, long C16, long C17, long C18, long C19
  311. >
  312. struct result_
  313. {
  314. typedef typename vector17_c<
  315. T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16)
  316. >::type type;
  317. };
  318. };
  319. } // namespace aux
  320. namespace aux {
  321. template<>
  322. struct vector_c_chooser<18>
  323. {
  324. template<
  325. typename T, long C0, long C1, long C2, long C3, long C4, long C5
  326. , long C6, long C7, long C8, long C9, long C10, long C11, long C12
  327. , long C13, long C14, long C15, long C16, long C17, long C18, long C19
  328. >
  329. struct result_
  330. {
  331. typedef typename vector18_c<
  332. T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17)
  333. >::type type;
  334. };
  335. };
  336. } // namespace aux
  337. namespace aux {
  338. template<>
  339. struct vector_c_chooser<19>
  340. {
  341. template<
  342. typename T, long C0, long C1, long C2, long C3, long C4, long C5
  343. , long C6, long C7, long C8, long C9, long C10, long C11, long C12
  344. , long C13, long C14, long C15, long C16, long C17, long C18, long C19
  345. >
  346. struct result_
  347. {
  348. typedef typename vector19_c<
  349. T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18)
  350. >::type type;
  351. };
  352. };
  353. } // namespace aux
  354. namespace aux {
  355. template<>
  356. struct vector_c_chooser<20>
  357. {
  358. template<
  359. typename T, long C0, long C1, long C2, long C3, long C4, long C5
  360. , long C6, long C7, long C8, long C9, long C10, long C11, long C12
  361. , long C13, long C14, long C15, long C16, long C17, long C18, long C19
  362. >
  363. struct result_
  364. {
  365. typedef typename vector20_c<
  366. T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19)
  367. >::type type;
  368. };
  369. };
  370. } // namespace aux
  371. namespace aux {
  372. template< long C >
  373. struct is_vector_c_arg
  374. {
  375. BOOST_STATIC_CONSTANT(bool, value = true);
  376. };
  377. template<>
  378. struct is_vector_c_arg<LONG_MAX>
  379. {
  380. BOOST_STATIC_CONSTANT(bool, value = false);
  381. };
  382. template<
  383. long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8
  384. , long C9, long C10, long C11, long C12, long C13, long C14, long C15
  385. , long C16, long C17, long C18, long C19, long C20
  386. >
  387. struct vector_c_count_args
  388. {
  389. BOOST_STATIC_CONSTANT(int, value =
  390. is_vector_c_arg<C1>::value + is_vector_c_arg<C2>::value
  391. + is_vector_c_arg<C3>::value + is_vector_c_arg<C4>::value
  392. + is_vector_c_arg<C5>::value + is_vector_c_arg<C6>::value
  393. + is_vector_c_arg<C7>::value + is_vector_c_arg<C8>::value
  394. + is_vector_c_arg<C9>::value + is_vector_c_arg<C10>::value
  395. + is_vector_c_arg<C11>::value + is_vector_c_arg<C12>::value
  396. + is_vector_c_arg<C13>::value + is_vector_c_arg<C14>::value
  397. + is_vector_c_arg<C15>::value + is_vector_c_arg<C16>::value
  398. + is_vector_c_arg<C17>::value + is_vector_c_arg<C18>::value
  399. + is_vector_c_arg<C19>::value + is_vector_c_arg<C20>::value
  400. );
  401. };
  402. template<
  403. typename T, long C0, long C1, long C2, long C3, long C4, long C5
  404. , long C6, long C7, long C8, long C9, long C10, long C11, long C12
  405. , long C13, long C14, long C15, long C16, long C17, long C18, long C19
  406. >
  407. struct vector_c_impl
  408. {
  409. typedef aux::vector_c_count_args<
  410. C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
  411. > arg_num_;
  412. typedef typename aux::vector_c_chooser< arg_num_::value >
  413. ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type;
  414. };
  415. } // namespace aux
  416. template<
  417. typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
  418. , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
  419. , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
  420. , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
  421. , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
  422. , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
  423. , long C18 = LONG_MAX, long C19 = LONG_MAX
  424. >
  425. struct vector_c
  426. : aux::vector_c_impl<
  427. T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
  428. >::type
  429. {
  430. typedef typename aux::vector_c_impl<
  431. T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
  432. >::type type;
  433. };
  434. }}