sequence_elem.hpp 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985
  1. // (C) Copyright Edward Diener 2011-2015
  2. // Use, modification and distribution are subject to the Boost Software License,
  3. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt).
  5. #if !defined(BOOST_VMD_DETAIL_SEQUENCE_ELEM_HPP)
  6. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_HPP
  7. #include <boost/preprocessor/arithmetic/dec.hpp>
  8. #include <boost/preprocessor/comparison/greater.hpp>
  9. #include <boost/preprocessor/control/expr_if.hpp>
  10. #include <boost/preprocessor/control/expr_iif.hpp>
  11. #include <boost/preprocessor/control/if.hpp>
  12. #include <boost/preprocessor/control/iif.hpp>
  13. #include <boost/preprocessor/logical/bitand.hpp>
  14. #include <boost/preprocessor/logical/bitor.hpp>
  15. #include <boost/preprocessor/logical/compl.hpp>
  16. #include <boost/preprocessor/seq/elem.hpp>
  17. #include <boost/preprocessor/seq/size.hpp>
  18. #include <boost/preprocessor/tuple/elem.hpp>
  19. #include <boost/preprocessor/tuple/push_back.hpp>
  20. #include <boost/preprocessor/tuple/replace.hpp>
  21. #include <boost/preprocessor/variadic/elem.hpp>
  22. #include <boost/vmd/empty.hpp>
  23. #include <boost/vmd/identity.hpp>
  24. #include <boost/vmd/is_empty.hpp>
  25. #include <boost/vmd/is_identifier.hpp>
  26. #include <boost/vmd/detail/empty_result.hpp>
  27. #include <boost/vmd/detail/equal_type.hpp>
  28. #include <boost/vmd/detail/match_identifier.hpp>
  29. #include <boost/vmd/detail/mods.hpp>
  30. #include <boost/vmd/detail/not_empty.hpp>
  31. #include <boost/vmd/detail/only_after.hpp>
  32. #include <boost/vmd/detail/sequence_common.hpp>
  33. /*
  34. Given modifications and the requested type,
  35. determine whether or not we should be checking for specific identifiers
  36. 1 = check for specific identifiers
  37. 0 = do no check for specific identifiers
  38. */
  39. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_CHECK_FOR_IDENTIFIERS(nm,type) \
  40. BOOST_PP_BITAND \
  41. ( \
  42. BOOST_VMD_DETAIL_EQUAL_TYPE \
  43. ( \
  44. type, \
  45. BOOST_VMD_TYPE_IDENTIFIER \
  46. ), \
  47. BOOST_VMD_DETAIL_NOT_EMPTY \
  48. ( \
  49. BOOST_VMD_DETAIL_MODS_RESULT_OTHER(nm) \
  50. ) \
  51. ) \
  52. /**/
  53. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_CHECK_FOR_IDENTIFIERS_D(d,nm,type) \
  54. BOOST_PP_BITAND \
  55. ( \
  56. BOOST_VMD_DETAIL_EQUAL_TYPE_D \
  57. ( \
  58. d, \
  59. type, \
  60. BOOST_VMD_TYPE_IDENTIFIER \
  61. ), \
  62. BOOST_VMD_DETAIL_NOT_EMPTY \
  63. ( \
  64. BOOST_VMD_DETAIL_MODS_RESULT_OTHER(nm) \
  65. ) \
  66. ) \
  67. /**/
  68. /*
  69. Given modifications, determine whether or not an index should be part of the result
  70. 1 = index should be part of the result
  71. 0 = index should not be part of the result
  72. */
  73. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_IS_INDEX_RESULT(nm) \
  74. BOOST_PP_BITAND \
  75. ( \
  76. BOOST_VMD_DETAIL_MODS_IS_RESULT_INDEX(nm), \
  77. BOOST_PP_BITAND \
  78. ( \
  79. BOOST_VMD_DETAIL_EQUAL_TYPE \
  80. ( \
  81. BOOST_VMD_DETAIL_MODS_RESULT_TYPE(nm), \
  82. BOOST_VMD_TYPE_IDENTIFIER \
  83. ), \
  84. BOOST_VMD_DETAIL_NOT_EMPTY \
  85. ( \
  86. BOOST_VMD_DETAIL_MODS_RESULT_OTHER(nm) \
  87. ) \
  88. ) \
  89. ) \
  90. /**/
  91. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_IS_INDEX_RESULT_D(d,nm) \
  92. BOOST_PP_BITAND \
  93. ( \
  94. BOOST_VMD_DETAIL_MODS_IS_RESULT_INDEX(nm), \
  95. BOOST_PP_BITAND \
  96. ( \
  97. BOOST_VMD_DETAIL_EQUAL_TYPE_D \
  98. ( \
  99. d, \
  100. BOOST_VMD_DETAIL_MODS_RESULT_TYPE(nm), \
  101. BOOST_VMD_TYPE_IDENTIFIER \
  102. ), \
  103. BOOST_VMD_DETAIL_NOT_EMPTY \
  104. ( \
  105. BOOST_VMD_DETAIL_MODS_RESULT_OTHER(nm) \
  106. ) \
  107. ) \
  108. ) \
  109. /**/
  110. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_FAILURE_RESULT_INDEX(nm) \
  111. BOOST_PP_IIF \
  112. ( \
  113. BOOST_VMD_DETAIL_MODS_IS_RESULT_AFTER(nm), \
  114. (,,), \
  115. (,) \
  116. ) \
  117. /**/
  118. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_FAILURE_RESULT_NO_INDEX(nm) \
  119. BOOST_PP_EXPR_IIF \
  120. ( \
  121. BOOST_VMD_DETAIL_MODS_IS_RESULT_AFTER(nm), \
  122. (,) \
  123. ) \
  124. /**/
  125. /*
  126. Returns a failure result given the modifications
  127. */
  128. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_FAILURE_RESULT(nm) \
  129. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_FIN \
  130. ( \
  131. BOOST_PP_IIF \
  132. ( \
  133. BOOST_VMD_DETAIL_SEQUENCE_ELEM_IS_INDEX_RESULT(nm), \
  134. BOOST_VMD_DETAIL_SEQUENCE_ELEM_FAILURE_RESULT_INDEX, \
  135. BOOST_VMD_DETAIL_SEQUENCE_ELEM_FAILURE_RESULT_NO_INDEX \
  136. ) \
  137. (nm),nm, \
  138. ) \
  139. /**/
  140. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_FAILURE_RESULT_D(d,nm) \
  141. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_FIN \
  142. ( \
  143. BOOST_PP_IIF \
  144. ( \
  145. BOOST_VMD_DETAIL_SEQUENCE_ELEM_IS_INDEX_RESULT_D(d,nm), \
  146. BOOST_VMD_DETAIL_SEQUENCE_ELEM_FAILURE_RESULT_INDEX, \
  147. BOOST_VMD_DETAIL_SEQUENCE_ELEM_FAILURE_RESULT_NO_INDEX \
  148. ) \
  149. (nm),nm, \
  150. ) \
  151. /**/
  152. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_RESULT_TYPE_TUPLE(res) \
  153. BOOST_PP_TUPLE_ELEM \
  154. ( \
  155. 0, \
  156. BOOST_PP_TUPLE_ELEM(0,res) \
  157. ) \
  158. /**/
  159. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_RESULT_TYPE_ONLY(res) \
  160. BOOST_PP_TUPLE_ELEM(0,res) \
  161. /**/
  162. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_RESULT_DATA_TUPLE(res) \
  163. BOOST_PP_TUPLE_ELEM \
  164. ( \
  165. 1, \
  166. BOOST_PP_TUPLE_ELEM(0,res) \
  167. ) \
  168. /**/
  169. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_RESULT_DATA_ONLY(res) \
  170. BOOST_PP_TUPLE_ELEM(1,res) \
  171. /**/
  172. /*
  173. Gets the 'data' of the result given the result and modifications
  174. */
  175. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_RESULT_DATA(res,nm) \
  176. BOOST_PP_IIF \
  177. ( \
  178. BOOST_VMD_DETAIL_SEQUENCE_STATE_IS_AFTER(nm), \
  179. BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_RESULT_DATA_TUPLE, \
  180. BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_RESULT_DATA_ONLY \
  181. ) \
  182. (res) \
  183. /**/
  184. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_RESULT_DATA_D(d,res,nm) \
  185. BOOST_PP_IIF \
  186. ( \
  187. BOOST_VMD_DETAIL_SEQUENCE_STATE_IS_AFTER_D(d,nm), \
  188. BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_RESULT_DATA_TUPLE, \
  189. BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_RESULT_DATA_ONLY \
  190. ) \
  191. (res) \
  192. /**/
  193. /*
  194. Gets the 'type' of the result given the result and modifications
  195. */
  196. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_RESULT_TYPE(res,nm) \
  197. BOOST_PP_IIF \
  198. ( \
  199. BOOST_VMD_DETAIL_SEQUENCE_STATE_IS_AFTER(nm), \
  200. BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_RESULT_TYPE_TUPLE, \
  201. BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_RESULT_TYPE_ONLY \
  202. ) \
  203. (res) \
  204. /**/
  205. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_RESULT_TYPE_D(d,res,nm) \
  206. BOOST_PP_IIF \
  207. ( \
  208. BOOST_VMD_DETAIL_SEQUENCE_STATE_IS_AFTER_D(d,nm), \
  209. BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_RESULT_TYPE_TUPLE, \
  210. BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_RESULT_TYPE_ONLY \
  211. ) \
  212. (res) \
  213. /**/
  214. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_HAS_FAILED_TUPLE(res) \
  215. BOOST_VMD_IS_EMPTY \
  216. ( \
  217. BOOST_PP_TUPLE_ELEM(0,res) \
  218. ) \
  219. /**/
  220. /*
  221. Determines whether the result from the element access has failed or not
  222. returns 1 if it has failed, otherwise 0.
  223. */
  224. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_HAS_FAILED(res,nm) \
  225. BOOST_PP_IIF \
  226. ( \
  227. BOOST_VMD_DETAIL_SEQUENCE_STATE_IS_AFTER(nm), \
  228. BOOST_VMD_DETAIL_SEQUENCE_ELEM_HAS_FAILED_TUPLE, \
  229. BOOST_VMD_IS_EMPTY \
  230. ) \
  231. (res) \
  232. /**/
  233. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_HAS_FAILED_D(d,res,nm) \
  234. BOOST_PP_IIF \
  235. ( \
  236. BOOST_VMD_DETAIL_SEQUENCE_STATE_IS_AFTER_D(d,nm), \
  237. BOOST_VMD_DETAIL_SEQUENCE_ELEM_HAS_FAILED_TUPLE, \
  238. BOOST_VMD_IS_EMPTY \
  239. ) \
  240. (res) \
  241. /**/
  242. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_FSEQ_ONLY_CHELM(seq,elem) \
  243. BOOST_PP_IIF \
  244. ( \
  245. BOOST_PP_GREATER(BOOST_PP_SEQ_SIZE(seq),elem), \
  246. BOOST_PP_SEQ_ELEM, \
  247. BOOST_VMD_EMPTY \
  248. ) \
  249. (elem,seq) \
  250. /**/
  251. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_FSEQ_ONLY_CHELM_D(d,seq,elem) \
  252. BOOST_PP_IIF \
  253. ( \
  254. BOOST_PP_GREATER_D(d,BOOST_PP_SEQ_SIZE(seq),elem), \
  255. BOOST_PP_SEQ_ELEM, \
  256. BOOST_VMD_EMPTY \
  257. ) \
  258. (elem,seq) \
  259. /**/
  260. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_FSEQ_AFTER_CHELM_RES(data,elem) \
  261. ( \
  262. BOOST_PP_SEQ_ELEM(elem,BOOST_PP_TUPLE_ELEM(0,data)), \
  263. BOOST_PP_TUPLE_ELEM(1,data) \
  264. ) \
  265. /**/
  266. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_FSEQ_AFTER_CHELM(data,elem) \
  267. BOOST_PP_IIF \
  268. ( \
  269. BOOST_PP_GREATER(BOOST_PP_SEQ_SIZE(BOOST_PP_TUPLE_ELEM(0,data)),elem), \
  270. BOOST_VMD_DETAIL_SEQUENCE_ELEM_FSEQ_AFTER_CHELM_RES, \
  271. BOOST_VMD_DETAIL_EMPTY_RESULT \
  272. ) \
  273. (data,elem) \
  274. /**/
  275. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_FSEQ_AFTER_CHELM_D(d,data,elem) \
  276. BOOST_PP_IIF \
  277. ( \
  278. BOOST_PP_GREATER_D(d,BOOST_PP_SEQ_SIZE(BOOST_PP_TUPLE_ELEM(0,data)),elem), \
  279. BOOST_VMD_DETAIL_SEQUENCE_ELEM_FSEQ_AFTER_CHELM_RES, \
  280. BOOST_VMD_DETAIL_EMPTY_RESULT \
  281. ) \
  282. (data,elem) \
  283. /**/
  284. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_FSEQ_ONLY(seq,elem) \
  285. BOOST_PP_IIF \
  286. ( \
  287. BOOST_VMD_IS_EMPTY(seq), \
  288. BOOST_VMD_EMPTY, \
  289. BOOST_VMD_DETAIL_SEQUENCE_ELEM_FSEQ_ONLY_CHELM \
  290. ) \
  291. (seq,elem) \
  292. /**/
  293. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_FSEQ_ONLY_D(d,seq,elem) \
  294. BOOST_PP_IIF \
  295. ( \
  296. BOOST_VMD_IS_EMPTY(seq), \
  297. BOOST_VMD_EMPTY, \
  298. BOOST_VMD_DETAIL_SEQUENCE_ELEM_FSEQ_ONLY_CHELM_D \
  299. ) \
  300. (d,seq,elem) \
  301. /**/
  302. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_FSEQ_AFTER(data,elem) \
  303. BOOST_PP_IIF \
  304. ( \
  305. BOOST_VMD_IS_EMPTY(BOOST_PP_TUPLE_ELEM(0,data)), \
  306. BOOST_VMD_DETAIL_EMPTY_RESULT, \
  307. BOOST_VMD_DETAIL_SEQUENCE_ELEM_FSEQ_AFTER_CHELM \
  308. ) \
  309. (data,elem) \
  310. /**/
  311. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_FSEQ_AFTER_D(d,data,elem) \
  312. BOOST_PP_IIF \
  313. ( \
  314. BOOST_VMD_IS_EMPTY(BOOST_PP_TUPLE_ELEM(0,data)), \
  315. BOOST_VMD_DETAIL_EMPTY_RESULT, \
  316. BOOST_VMD_DETAIL_SEQUENCE_ELEM_FSEQ_AFTER_CHELM_D \
  317. ) \
  318. (d,data,elem) \
  319. /**/
  320. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_FSEQ(seq,elem,nm) \
  321. BOOST_PP_IIF \
  322. ( \
  323. BOOST_VMD_DETAIL_SEQUENCE_STATE_IS_AFTER(nm), \
  324. BOOST_VMD_DETAIL_SEQUENCE_ELEM_FSEQ_AFTER, \
  325. BOOST_VMD_DETAIL_SEQUENCE_ELEM_FSEQ_ONLY \
  326. ) \
  327. (seq,elem) \
  328. /**/
  329. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_FSEQ_D(d,seq,elem,nm) \
  330. BOOST_PP_IIF \
  331. ( \
  332. BOOST_VMD_DETAIL_SEQUENCE_STATE_IS_AFTER_D(d,nm), \
  333. BOOST_VMD_DETAIL_SEQUENCE_ELEM_FSEQ_AFTER_D, \
  334. BOOST_VMD_DETAIL_SEQUENCE_ELEM_FSEQ_ONLY_D \
  335. ) \
  336. (d,seq,elem) \
  337. /**/
  338. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_VSEQ(...) \
  339. BOOST_PP_VARIADIC_ELEM(0,__VA_ARGS__) \
  340. /**/
  341. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PROCESS(elem,vseq,nm) \
  342. BOOST_VMD_DETAIL_SEQUENCE_ELEM_FSEQ \
  343. ( \
  344. BOOST_VMD_DETAIL_SEQUENCE_ELEM_PROCESS_TUPLE \
  345. ( \
  346. vseq, \
  347. elem, \
  348. BOOST_VMD_TYPE_SEQ, \
  349. nm \
  350. ), \
  351. elem, \
  352. nm \
  353. ) \
  354. /**/
  355. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PROCESS_D(d,elem,vseq,nm) \
  356. BOOST_VMD_DETAIL_SEQUENCE_ELEM_FSEQ_D \
  357. ( \
  358. d, \
  359. BOOST_VMD_DETAIL_SEQUENCE_ELEM_PROCESS_TUPLE_D \
  360. ( \
  361. d, \
  362. vseq, \
  363. elem, \
  364. BOOST_VMD_TYPE_SEQ, \
  365. nm \
  366. ), \
  367. elem, \
  368. nm \
  369. ) \
  370. /**/
  371. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_EMPTY(elem,vseq,nm) \
  372. BOOST_PP_EXPR_IIF \
  373. ( \
  374. BOOST_VMD_DETAIL_SEQUENCE_STATE_IS_AFTER(nm), \
  375. (,) \
  376. ) \
  377. /**/
  378. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_EMPTY_D(d,elem,vseq,nm) \
  379. BOOST_PP_EXPR_IIF \
  380. ( \
  381. BOOST_VMD_DETAIL_SEQUENCE_STATE_IS_AFTER_D(d,nm), \
  382. (,) \
  383. ) \
  384. /**/
  385. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_CE(elem,vseq,nm) \
  386. BOOST_PP_IIF \
  387. ( \
  388. BOOST_VMD_DETAIL_NOT_EMPTY(vseq), \
  389. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PROCESS, \
  390. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_EMPTY \
  391. ) \
  392. (elem,vseq,nm) \
  393. /**/
  394. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_CE_D(d,elem,vseq,nm) \
  395. BOOST_PP_IIF \
  396. ( \
  397. BOOST_VMD_DETAIL_NOT_EMPTY(vseq), \
  398. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PROCESS_D, \
  399. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_EMPTY_D \
  400. ) \
  401. (d,elem,vseq,nm) \
  402. /**/
  403. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_FIN_D(d,res,nm,type) \
  404. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_FIN(res,nm,type) \
  405. /**/
  406. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_FIN(res,nm,type) \
  407. BOOST_VMD_IDENTITY_RESULT \
  408. ( \
  409. BOOST_PP_IIF \
  410. ( \
  411. BOOST_VMD_DETAIL_MODS_IS_RESULT_ONLY_AFTER(nm), \
  412. BOOST_PP_TUPLE_ELEM, \
  413. BOOST_VMD_IDENTITY(res) \
  414. ) \
  415. (1,res) \
  416. ) \
  417. /**/
  418. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_INDEX_JRES(data,index) \
  419. BOOST_PP_IF \
  420. ( \
  421. index, \
  422. (data,BOOST_PP_DEC(index)), \
  423. (,) \
  424. ) \
  425. /**/
  426. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_JRES(data,index) \
  427. BOOST_PP_EXPR_IF \
  428. ( \
  429. index, \
  430. data \
  431. ) \
  432. /**/
  433. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_MATCH(data,nm,index) \
  434. BOOST_PP_IIF \
  435. ( \
  436. BOOST_VMD_DETAIL_MODS_IS_RESULT_INDEX(nm), \
  437. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_INDEX_JRES, \
  438. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_JRES \
  439. ) \
  440. (data,index) \
  441. /**/
  442. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_ONLY_ID_TUP(data,nm) \
  443. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_MATCH \
  444. ( \
  445. data, \
  446. nm, \
  447. BOOST_VMD_DETAIL_MATCH_IDENTIFIER \
  448. ( \
  449. data, \
  450. BOOST_VMD_DETAIL_MODS_RESULT_OTHER(nm) \
  451. ) \
  452. ) \
  453. /**/
  454. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_ONLY_ID_TUP_D(d,data,nm) \
  455. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_MATCH \
  456. ( \
  457. data, \
  458. nm, \
  459. BOOST_VMD_DETAIL_MATCH_IDENTIFIER_D \
  460. ( \
  461. d, \
  462. data, \
  463. BOOST_VMD_DETAIL_MODS_RESULT_OTHER(nm) \
  464. ) \
  465. ) \
  466. /**/
  467. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_ONLY_ID(data,nm,type) \
  468. BOOST_VMD_IDENTITY_RESULT \
  469. ( \
  470. BOOST_PP_IIF \
  471. ( \
  472. BOOST_VMD_DETAIL_SEQUENCE_ELEM_CHECK_FOR_IDENTIFIERS(nm,type), \
  473. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_ONLY_ID_TUP, \
  474. BOOST_VMD_IDENTITY(data) \
  475. ) \
  476. (data,nm) \
  477. ) \
  478. /**/
  479. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_ONLY_ID_D(d,data,nm,type) \
  480. BOOST_VMD_IDENTITY_RESULT \
  481. ( \
  482. BOOST_PP_IIF \
  483. ( \
  484. BOOST_VMD_DETAIL_SEQUENCE_ELEM_CHECK_FOR_IDENTIFIERS_D(d,nm,type), \
  485. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_ONLY_ID_TUP_D, \
  486. BOOST_VMD_IDENTITY(data) \
  487. ) \
  488. (d,data,nm) \
  489. ) \
  490. /**/
  491. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_ONLY(res,nm,type) \
  492. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_ONLY_ID \
  493. ( \
  494. BOOST_PP_TUPLE_ELEM(1,res), \
  495. nm, \
  496. type \
  497. ) \
  498. /**/
  499. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_ONLY_D(d,res,nm,type) \
  500. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_ONLY_ID_D \
  501. ( \
  502. d, \
  503. BOOST_PP_TUPLE_ELEM(1,res), \
  504. nm, \
  505. type \
  506. ) \
  507. /**/
  508. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_CHANGE(res,nm,type) \
  509. BOOST_PP_TUPLE_REPLACE \
  510. ( \
  511. res, \
  512. 0, \
  513. BOOST_PP_TUPLE_ELEM \
  514. ( \
  515. 1, \
  516. BOOST_PP_TUPLE_ELEM(0,res) \
  517. ) \
  518. ) \
  519. /**/
  520. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_CHANGE_D(d,res,nm,type) \
  521. BOOST_PP_TUPLE_REPLACE_D \
  522. ( \
  523. d, \
  524. res, \
  525. 0, \
  526. BOOST_PP_TUPLE_ELEM \
  527. ( \
  528. 1, \
  529. BOOST_PP_TUPLE_ELEM(0,res) \
  530. ) \
  531. ) \
  532. /**/
  533. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_ONLY_CAFTER(res,nm,type) \
  534. BOOST_PP_IIF \
  535. ( \
  536. BOOST_VMD_DETAIL_MODS_IS_RESULT_ONLY_AFTER(nm), \
  537. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_FIN, \
  538. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_CHANGE \
  539. ) \
  540. (res,nm,type) \
  541. /**/
  542. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_ONLY_CAFTER_D(d,res,nm,type) \
  543. BOOST_PP_IIF \
  544. ( \
  545. BOOST_VMD_DETAIL_MODS_IS_RESULT_ONLY_AFTER(nm), \
  546. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_FIN_D, \
  547. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_CHANGE_D \
  548. ) \
  549. (d,res,nm,type) \
  550. /**/
  551. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_SUCCESS(res,nm,type,index) \
  552. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_ONLY_CAFTER \
  553. ( \
  554. BOOST_PP_TUPLE_PUSH_BACK(res,BOOST_PP_DEC(index)), \
  555. nm, \
  556. type \
  557. ) \
  558. /**/
  559. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_SUCCESS_D(d,res,nm,type,index) \
  560. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_ONLY_CAFTER_D \
  561. ( \
  562. d, \
  563. BOOST_PP_TUPLE_PUSH_BACK(res,BOOST_PP_DEC(index)), \
  564. nm, \
  565. type \
  566. ) \
  567. /**/
  568. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_FAILURE(res,nm,type,index) \
  569. BOOST_VMD_DETAIL_SEQUENCE_ELEM_FAILURE_RESULT(nm) \
  570. /**/
  571. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_FAILURE_D(d,res,nm,type,index) \
  572. BOOST_VMD_DETAIL_SEQUENCE_ELEM_FAILURE_RESULT_D(d,nm) \
  573. /**/
  574. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_INDEX_JRES(res,nm,type,index) \
  575. BOOST_PP_IF \
  576. ( \
  577. index, \
  578. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_SUCCESS, \
  579. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_FAILURE \
  580. ) \
  581. (res,nm,type,index) \
  582. /**/
  583. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_INDEX_JRES_D(d,res,nm,type,index) \
  584. BOOST_PP_IF \
  585. ( \
  586. index, \
  587. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_SUCCESS_D, \
  588. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_FAILURE_D \
  589. ) \
  590. (d,res,nm,type,index) \
  591. /**/
  592. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_JRES_FAILURE(res,nm,type) \
  593. BOOST_VMD_DETAIL_SEQUENCE_ELEM_FAILURE_RESULT(nm) \
  594. /**/
  595. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_JRES_FAILURE_D(d,res,nm,type) \
  596. BOOST_VMD_DETAIL_SEQUENCE_ELEM_FAILURE_RESULT_D(d,nm) \
  597. /**/
  598. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_JRES(res,nm,type,index) \
  599. BOOST_PP_IF \
  600. ( \
  601. index, \
  602. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_ONLY_CAFTER, \
  603. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_JRES_FAILURE \
  604. ) \
  605. (res,nm,type) \
  606. /**/
  607. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_JRES_D(d,res,nm,type,index) \
  608. BOOST_PP_IF \
  609. ( \
  610. index, \
  611. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_ONLY_CAFTER_D, \
  612. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_JRES_FAILURE_D \
  613. ) \
  614. (d,res,nm,type) \
  615. /**/
  616. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_ID_RES(res,nm,type,index) \
  617. BOOST_PP_IIF \
  618. ( \
  619. BOOST_VMD_DETAIL_MODS_IS_RESULT_INDEX(nm), \
  620. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_INDEX_JRES, \
  621. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_JRES \
  622. ) \
  623. (res,nm,type,index) \
  624. /**/
  625. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_ID_RES_D(d,res,nm,type,index) \
  626. BOOST_PP_IIF \
  627. ( \
  628. BOOST_VMD_DETAIL_MODS_IS_RESULT_INDEX(nm), \
  629. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_INDEX_JRES_D, \
  630. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_JRES_D \
  631. ) \
  632. (d,res,nm,type,index) \
  633. /**/
  634. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_ID(res,nm,type) \
  635. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_ID_RES \
  636. ( \
  637. res, \
  638. nm, \
  639. type, \
  640. BOOST_VMD_DETAIL_MATCH_IDENTIFIER \
  641. ( \
  642. BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_RESULT_DATA(res,nm), \
  643. BOOST_VMD_DETAIL_MODS_RESULT_OTHER(nm) \
  644. ) \
  645. ) \
  646. /**/
  647. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_ID_D(d,res,nm,type) \
  648. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_ID_RES_D \
  649. ( \
  650. d, \
  651. res, \
  652. nm, \
  653. type, \
  654. BOOST_VMD_DETAIL_MATCH_IDENTIFIER_D \
  655. ( \
  656. d, \
  657. BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_RESULT_DATA_D(d,res,nm), \
  658. BOOST_VMD_DETAIL_MODS_RESULT_OTHER(nm) \
  659. ) \
  660. ) \
  661. /**/
  662. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT(res,nm,type) \
  663. BOOST_PP_IIF \
  664. ( \
  665. BOOST_VMD_DETAIL_SEQUENCE_ELEM_CHECK_FOR_IDENTIFIERS(nm,type), \
  666. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_ID, \
  667. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_ONLY_CAFTER \
  668. ) \
  669. (res,nm,type) \
  670. /**/
  671. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_D(d,res,nm,type) \
  672. BOOST_PP_IIF \
  673. ( \
  674. BOOST_VMD_DETAIL_SEQUENCE_ELEM_CHECK_FOR_IDENTIFIERS_D(d,nm,type), \
  675. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_ID_D, \
  676. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_ONLY_CAFTER_D \
  677. ) \
  678. (d,res,nm,type) \
  679. /**/
  680. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK(res,nm,type) \
  681. BOOST_PP_IIF \
  682. ( \
  683. BOOST_VMD_DETAIL_SEQUENCE_STATE_IS_AFTER(nm), \
  684. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT, \
  685. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_ONLY \
  686. ) \
  687. (res,nm,type) \
  688. /**/
  689. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_D(d,res,nm,type) \
  690. BOOST_PP_IIF \
  691. ( \
  692. BOOST_VMD_DETAIL_SEQUENCE_STATE_IS_AFTER_D(d,nm), \
  693. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_SPLIT_D, \
  694. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_ONLY_D \
  695. ) \
  696. (d,res,nm,type) \
  697. /**/
  698. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_FAILED(res,nm,type) \
  699. BOOST_VMD_DETAIL_SEQUENCE_ELEM_FAILURE_RESULT(nm) \
  700. /**/
  701. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_FAILED_D(d,res,nm,type) \
  702. BOOST_VMD_DETAIL_SEQUENCE_ELEM_FAILURE_RESULT_D(d,nm) \
  703. /**/
  704. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_MATCHING_TYPE_ID(res,nm,type) \
  705. BOOST_VMD_IS_IDENTIFIER \
  706. ( \
  707. BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_RESULT_DATA(res,nm) \
  708. ) \
  709. /**/
  710. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_MATCHING_TYPE_ID_D(d,res,nm,type) \
  711. BOOST_VMD_IS_IDENTIFIER_D \
  712. ( \
  713. d, \
  714. BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_RESULT_DATA_D(d,res,nm) \
  715. ) \
  716. /**/
  717. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_MATCHING_TYPE_OTHER(res,nm,type) \
  718. BOOST_VMD_DETAIL_EQUAL_TYPE \
  719. ( \
  720. BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_RESULT_TYPE(res,nm), \
  721. type \
  722. ) \
  723. /**/
  724. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_MATCHING_TYPE_OTHER_D(d,res,nm,type) \
  725. BOOST_VMD_DETAIL_EQUAL_TYPE_D \
  726. ( \
  727. d, \
  728. BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_RESULT_TYPE_D(d,res,nm), \
  729. type \
  730. ) \
  731. /**/
  732. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_MATCHING_TYPE(res,nm,type) \
  733. BOOST_PP_IIF \
  734. ( \
  735. BOOST_VMD_DETAIL_EQUAL_TYPE \
  736. ( \
  737. BOOST_VMD_TYPE_IDENTIFIER, \
  738. type \
  739. ), \
  740. BOOST_VMD_DETAIL_SEQUENCE_ELEM_MATCHING_TYPE_ID, \
  741. BOOST_VMD_DETAIL_SEQUENCE_ELEM_MATCHING_TYPE_OTHER \
  742. ) \
  743. (res,nm,type) \
  744. /**/
  745. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_MATCHING_TYPE_D(d,res,nm,type) \
  746. BOOST_PP_IIF \
  747. ( \
  748. BOOST_VMD_DETAIL_EQUAL_TYPE_D \
  749. ( \
  750. d, \
  751. BOOST_VMD_TYPE_IDENTIFIER, \
  752. type \
  753. ), \
  754. BOOST_VMD_DETAIL_SEQUENCE_ELEM_MATCHING_TYPE_ID_D, \
  755. BOOST_VMD_DETAIL_SEQUENCE_ELEM_MATCHING_TYPE_OTHER_D \
  756. ) \
  757. (d,res,nm,type) \
  758. /**/
  759. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT(res,nm,type) \
  760. BOOST_PP_IIF \
  761. ( \
  762. BOOST_VMD_DETAIL_SEQUENCE_ELEM_MATCHING_TYPE(res,nm,type), \
  763. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK, \
  764. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_FAILED \
  765. ) \
  766. (res,nm,type) \
  767. /**/
  768. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_D(d,res,nm,type) \
  769. BOOST_PP_IIF \
  770. ( \
  771. BOOST_VMD_DETAIL_SEQUENCE_ELEM_MATCHING_TYPE_D(d,res,nm,type), \
  772. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_CHECK_D, \
  773. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_FAILED_D \
  774. ) \
  775. (d,res,nm,type) \
  776. /**/
  777. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_TYPE_NF(res,nm,type) \
  778. BOOST_PP_IIF \
  779. ( \
  780. BOOST_VMD_IS_EMPTY(type), \
  781. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_FIN, \
  782. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT \
  783. ) \
  784. (res,nm,type) \
  785. /**/
  786. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_TYPE_NF_D(d,res,nm,type) \
  787. BOOST_PP_IIF \
  788. ( \
  789. BOOST_VMD_IS_EMPTY(type), \
  790. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_FIN_D, \
  791. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_PT_D \
  792. ) \
  793. (d,res,nm,type) \
  794. /**/
  795. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_TYPE_FAILED(res,nm,type) \
  796. BOOST_VMD_DETAIL_SEQUENCE_ELEM_FAILURE_RESULT(nm) \
  797. /**/
  798. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_TYPE_FAILED_D(d,res,nm,type) \
  799. BOOST_VMD_DETAIL_SEQUENCE_ELEM_FAILURE_RESULT_D(d,nm) \
  800. /**/
  801. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_TYPE(res,nm,type) \
  802. BOOST_PP_IIF \
  803. ( \
  804. BOOST_VMD_DETAIL_SEQUENCE_ELEM_HAS_FAILED(res,nm), \
  805. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_TYPE_FAILED, \
  806. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_TYPE_NF \
  807. ) \
  808. (res,nm,type) \
  809. /**/
  810. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_TYPE_D(d,res,nm,type) \
  811. BOOST_PP_IIF \
  812. ( \
  813. BOOST_VMD_DETAIL_SEQUENCE_ELEM_HAS_FAILED_D(d,res,nm), \
  814. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_TYPE_FAILED_D, \
  815. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_TYPE_NF_D \
  816. ) \
  817. (d,res,nm,type) \
  818. /**/
  819. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_COA(res,nm) \
  820. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_TYPE \
  821. ( \
  822. res, \
  823. nm, \
  824. BOOST_VMD_DETAIL_MODS_RESULT_TYPE(nm) \
  825. ) \
  826. /**/
  827. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_COA_D(d,res,nm) \
  828. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_TYPE_D \
  829. ( \
  830. d, \
  831. res, \
  832. nm, \
  833. BOOST_VMD_DETAIL_MODS_RESULT_TYPE(nm) \
  834. ) \
  835. /**/
  836. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM(elem,vseq,nm) \
  837. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_COA \
  838. ( \
  839. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_CE(elem,vseq,nm), \
  840. nm \
  841. ) \
  842. /**/
  843. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_D(d,elem,vseq,nm) \
  844. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_COA_D \
  845. ( \
  846. d, \
  847. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_CE_D(d,elem,vseq,nm), \
  848. nm \
  849. ) \
  850. /**/
  851. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM(allow,elem,...) \
  852. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM \
  853. ( \
  854. elem, \
  855. BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_VSEQ(__VA_ARGS__), \
  856. BOOST_VMD_DETAIL_NEW_MODS(allow,__VA_ARGS__) \
  857. ) \
  858. /**/
  859. #define BOOST_VMD_DETAIL_SEQUENCE_ELEM_D(d,allow,elem,...) \
  860. BOOST_VMD_DETAIL_SEQUENCE_ELEM_NM_D \
  861. ( \
  862. d, \
  863. elem, \
  864. BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_VSEQ(__VA_ARGS__), \
  865. BOOST_VMD_DETAIL_NEW_MODS_D(d,allow,__VA_ARGS__) \
  866. ) \
  867. /**/
  868. #endif /* BOOST_VMD_DETAIL_SEQUENCE_ELEM_HPP */