arity10_0.hpp 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. // (C) Copyright Tobias Schwinger
  2. //
  3. // Use modification and distribution are subject to the boost Software License,
  4. // Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt).
  5. //------------------------------------------------------------------------------
  6. // no include guards, this file is intended for multiple inclusion
  7. // input: BOOST_FT_syntax type macro to use
  8. // input: BOOST_FT_cc empty or cc specifier
  9. // input: BOOST_FT_ell empty or "..."
  10. // input: BOOST_FT_cv empty or cv qualifiers
  11. // input: BOOST_FT_flags single decimal integer encoding the flags
  12. // output: BOOST_FT_n number of component types (arity+1)
  13. // output: BOOST_FT_arity current arity
  14. // output: BOOST_FT_type macro that expands to the type
  15. // output: BOOST_FT_tplargs(p) template arguments with given prefix
  16. // output: BOOST_FT_params(p) parameters with given prefix
  17. # define BOOST_FT_make_type(flags,cc,arity) BOOST_FT_make_type_impl(flags,cc,arity)
  18. # define BOOST_FT_make_type_impl(flags,cc,arity) make_type_ ## flags ## _ ## cc ## _ ## arity
  19. template< typename R >
  20. struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,0)
  21. {
  22. typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (BOOST_FT_nullary_param BOOST_FT_ell) BOOST_FT_cv ;
  23. };
  24. template< >
  25. struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 1 >
  26. {
  27. template<typename S> struct synthesize_impl_i
  28. {
  29. private:
  30. typedef typename mpl::begin<S> ::type iter_0;
  31. public:
  32. typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,0)
  33. < typename mpl::deref< iter_0 > ::type
  34. > ::type type;
  35. };
  36. };
  37. template< typename R , typename T0 >
  38. struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,1)
  39. {
  40. typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 BOOST_FT_ell) BOOST_FT_cv ;
  41. };
  42. template< >
  43. struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 2 >
  44. {
  45. template<typename S> struct synthesize_impl_i
  46. {
  47. private:
  48. typedef typename mpl::begin<S> ::type iter_0;
  49. typedef typename mpl::next< iter_0 > ::type iter_1;
  50. public:
  51. typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,1)
  52. < typename mpl::deref< iter_0 > ::type
  53. , typename mpl::deref< iter_1 > ::type
  54. > ::type type;
  55. };
  56. };
  57. template< typename R , typename T0 , typename T1 >
  58. struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,2)
  59. {
  60. typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 BOOST_FT_ell) BOOST_FT_cv ;
  61. };
  62. template< >
  63. struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 3 >
  64. {
  65. template<typename S> struct synthesize_impl_i
  66. {
  67. private:
  68. typedef typename mpl::begin<S> ::type iter_0;
  69. typedef typename mpl::next< iter_0 > ::type iter_1;
  70. typedef typename mpl::next< iter_1 > ::type iter_2;
  71. public:
  72. typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,2)
  73. < typename mpl::deref< iter_0 > ::type
  74. , typename mpl::deref< iter_1 > ::type
  75. , typename mpl::deref< iter_2 > ::type
  76. > ::type type;
  77. };
  78. };
  79. template< typename R , typename T0 , typename T1 , typename T2 >
  80. struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,3)
  81. {
  82. typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 BOOST_FT_ell) BOOST_FT_cv ;
  83. };
  84. template< >
  85. struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 4 >
  86. {
  87. template<typename S> struct synthesize_impl_i
  88. {
  89. private:
  90. typedef typename mpl::begin<S> ::type iter_0;
  91. typedef typename mpl::next< iter_0 > ::type iter_1;
  92. typedef typename mpl::next< iter_1 > ::type iter_2;
  93. typedef typename mpl::next< iter_2 > ::type iter_3;
  94. public:
  95. typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,3)
  96. < typename mpl::deref< iter_0 > ::type
  97. , typename mpl::deref< iter_1 > ::type
  98. , typename mpl::deref< iter_2 > ::type
  99. , typename mpl::deref< iter_3 > ::type
  100. > ::type type;
  101. };
  102. };
  103. template< typename R , typename T0 , typename T1 , typename T2 , typename T3 >
  104. struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,4)
  105. {
  106. typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 BOOST_FT_ell) BOOST_FT_cv ;
  107. };
  108. template< >
  109. struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 5 >
  110. {
  111. template<typename S> struct synthesize_impl_i
  112. {
  113. private:
  114. typedef typename mpl::begin<S> ::type iter_0;
  115. typedef typename mpl::next< iter_0 > ::type iter_1;
  116. typedef typename mpl::next< iter_1 > ::type iter_2;
  117. typedef typename mpl::next< iter_2 > ::type iter_3;
  118. typedef typename mpl::next< iter_3 > ::type iter_4;
  119. public:
  120. typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,4)
  121. < typename mpl::deref< iter_0 > ::type
  122. , typename mpl::deref< iter_1 > ::type
  123. , typename mpl::deref< iter_2 > ::type
  124. , typename mpl::deref< iter_3 > ::type
  125. , typename mpl::deref< iter_4 > ::type
  126. > ::type type;
  127. };
  128. };
  129. template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 >
  130. struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,5)
  131. {
  132. typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 BOOST_FT_ell) BOOST_FT_cv ;
  133. };
  134. template< >
  135. struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 6 >
  136. {
  137. template<typename S> struct synthesize_impl_i
  138. {
  139. private:
  140. typedef typename mpl::begin<S> ::type iter_0;
  141. typedef typename mpl::next< iter_0 > ::type iter_1;
  142. typedef typename mpl::next< iter_1 > ::type iter_2;
  143. typedef typename mpl::next< iter_2 > ::type iter_3;
  144. typedef typename mpl::next< iter_3 > ::type iter_4;
  145. typedef typename mpl::next< iter_4 > ::type iter_5;
  146. public:
  147. typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,5)
  148. < typename mpl::deref< iter_0 > ::type
  149. , typename mpl::deref< iter_1 > ::type
  150. , typename mpl::deref< iter_2 > ::type
  151. , typename mpl::deref< iter_3 > ::type
  152. , typename mpl::deref< iter_4 > ::type
  153. , typename mpl::deref< iter_5 > ::type
  154. > ::type type;
  155. };
  156. };
  157. template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
  158. struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,6)
  159. {
  160. typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 BOOST_FT_ell) BOOST_FT_cv ;
  161. };
  162. template< >
  163. struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 7 >
  164. {
  165. template<typename S> struct synthesize_impl_i
  166. {
  167. private:
  168. typedef typename mpl::begin<S> ::type iter_0;
  169. typedef typename mpl::next< iter_0 > ::type iter_1;
  170. typedef typename mpl::next< iter_1 > ::type iter_2;
  171. typedef typename mpl::next< iter_2 > ::type iter_3;
  172. typedef typename mpl::next< iter_3 > ::type iter_4;
  173. typedef typename mpl::next< iter_4 > ::type iter_5;
  174. typedef typename mpl::next< iter_5 > ::type iter_6;
  175. public:
  176. typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,6)
  177. < typename mpl::deref< iter_0 > ::type
  178. , typename mpl::deref< iter_1 > ::type
  179. , typename mpl::deref< iter_2 > ::type
  180. , typename mpl::deref< iter_3 > ::type
  181. , typename mpl::deref< iter_4 > ::type
  182. , typename mpl::deref< iter_5 > ::type
  183. , typename mpl::deref< iter_6 > ::type
  184. > ::type type;
  185. };
  186. };
  187. template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 >
  188. struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,7)
  189. {
  190. typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 BOOST_FT_ell) BOOST_FT_cv ;
  191. };
  192. template< >
  193. struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 8 >
  194. {
  195. template<typename S> struct synthesize_impl_i
  196. {
  197. private:
  198. typedef typename mpl::begin<S> ::type iter_0;
  199. typedef typename mpl::next< iter_0 > ::type iter_1;
  200. typedef typename mpl::next< iter_1 > ::type iter_2;
  201. typedef typename mpl::next< iter_2 > ::type iter_3;
  202. typedef typename mpl::next< iter_3 > ::type iter_4;
  203. typedef typename mpl::next< iter_4 > ::type iter_5;
  204. typedef typename mpl::next< iter_5 > ::type iter_6;
  205. typedef typename mpl::next< iter_6 > ::type iter_7;
  206. public:
  207. typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,7)
  208. < typename mpl::deref< iter_0 > ::type
  209. , typename mpl::deref< iter_1 > ::type
  210. , typename mpl::deref< iter_2 > ::type
  211. , typename mpl::deref< iter_3 > ::type
  212. , typename mpl::deref< iter_4 > ::type
  213. , typename mpl::deref< iter_5 > ::type
  214. , typename mpl::deref< iter_6 > ::type
  215. , typename mpl::deref< iter_7 > ::type
  216. > ::type type;
  217. };
  218. };
  219. template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 >
  220. struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,8)
  221. {
  222. typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 BOOST_FT_ell) BOOST_FT_cv ;
  223. };
  224. template< >
  225. struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 9 >
  226. {
  227. template<typename S> struct synthesize_impl_i
  228. {
  229. private:
  230. typedef typename mpl::begin<S> ::type iter_0;
  231. typedef typename mpl::next< iter_0 > ::type iter_1;
  232. typedef typename mpl::next< iter_1 > ::type iter_2;
  233. typedef typename mpl::next< iter_2 > ::type iter_3;
  234. typedef typename mpl::next< iter_3 > ::type iter_4;
  235. typedef typename mpl::next< iter_4 > ::type iter_5;
  236. typedef typename mpl::next< iter_5 > ::type iter_6;
  237. typedef typename mpl::next< iter_6 > ::type iter_7;
  238. typedef typename mpl::next< iter_7 > ::type iter_8;
  239. public:
  240. typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,8)
  241. < typename mpl::deref< iter_0 > ::type
  242. , typename mpl::deref< iter_1 > ::type
  243. , typename mpl::deref< iter_2 > ::type
  244. , typename mpl::deref< iter_3 > ::type
  245. , typename mpl::deref< iter_4 > ::type
  246. , typename mpl::deref< iter_5 > ::type
  247. , typename mpl::deref< iter_6 > ::type
  248. , typename mpl::deref< iter_7 > ::type
  249. , typename mpl::deref< iter_8 > ::type
  250. > ::type type;
  251. };
  252. };
  253. template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 >
  254. struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,9)
  255. {
  256. typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 BOOST_FT_ell) BOOST_FT_cv ;
  257. };
  258. template< >
  259. struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 10 >
  260. {
  261. template<typename S> struct synthesize_impl_i
  262. {
  263. private:
  264. typedef typename mpl::begin<S> ::type iter_0;
  265. typedef typename mpl::next< iter_0 > ::type iter_1;
  266. typedef typename mpl::next< iter_1 > ::type iter_2;
  267. typedef typename mpl::next< iter_2 > ::type iter_3;
  268. typedef typename mpl::next< iter_3 > ::type iter_4;
  269. typedef typename mpl::next< iter_4 > ::type iter_5;
  270. typedef typename mpl::next< iter_5 > ::type iter_6;
  271. typedef typename mpl::next< iter_6 > ::type iter_7;
  272. typedef typename mpl::next< iter_7 > ::type iter_8;
  273. typedef typename mpl::next< iter_8 > ::type iter_9;
  274. public:
  275. typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,9)
  276. < typename mpl::deref< iter_0 > ::type
  277. , typename mpl::deref< iter_1 > ::type
  278. , typename mpl::deref< iter_2 > ::type
  279. , typename mpl::deref< iter_3 > ::type
  280. , typename mpl::deref< iter_4 > ::type
  281. , typename mpl::deref< iter_5 > ::type
  282. , typename mpl::deref< iter_6 > ::type
  283. , typename mpl::deref< iter_7 > ::type
  284. , typename mpl::deref< iter_8 > ::type
  285. , typename mpl::deref< iter_9 > ::type
  286. > ::type type;
  287. };
  288. };
  289. template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 >
  290. struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,10)
  291. {
  292. typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 BOOST_FT_ell) BOOST_FT_cv ;
  293. };
  294. template< >
  295. struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 11 >
  296. {
  297. template<typename S> struct synthesize_impl_i
  298. {
  299. private:
  300. typedef typename mpl::begin<S> ::type iter_0;
  301. typedef typename mpl::next< iter_0 > ::type iter_1;
  302. typedef typename mpl::next< iter_1 > ::type iter_2;
  303. typedef typename mpl::next< iter_2 > ::type iter_3;
  304. typedef typename mpl::next< iter_3 > ::type iter_4;
  305. typedef typename mpl::next< iter_4 > ::type iter_5;
  306. typedef typename mpl::next< iter_5 > ::type iter_6;
  307. typedef typename mpl::next< iter_6 > ::type iter_7;
  308. typedef typename mpl::next< iter_7 > ::type iter_8;
  309. typedef typename mpl::next< iter_8 > ::type iter_9;
  310. typedef typename mpl::next< iter_9 > ::type iter_10;
  311. public:
  312. typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,10)
  313. < typename mpl::deref< iter_0 > ::type
  314. , typename mpl::deref< iter_1 > ::type
  315. , typename mpl::deref< iter_2 > ::type
  316. , typename mpl::deref< iter_3 > ::type
  317. , typename mpl::deref< iter_4 > ::type
  318. , typename mpl::deref< iter_5 > ::type
  319. , typename mpl::deref< iter_6 > ::type
  320. , typename mpl::deref< iter_7 > ::type
  321. , typename mpl::deref< iter_8 > ::type
  322. , typename mpl::deref< iter_9 > ::type
  323. , typename mpl::deref< iter_10 > ::type
  324. > ::type type;
  325. };
  326. };
  327. # undef BOOST_FT_make_type
  328. # undef BOOST_FT_make_type_impl