to_list_msvc.hpp 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # /* **************************************************************************
  2. # * *
  3. # * (C) Copyright Edward Diener 2016. *
  4. # * Distributed under the Boost Software License, Version 1.0. (See *
  5. # * accompanying file LICENSE_1_0.txt or copy at *
  6. # * http://www.boost.org/LICENSE_1_0.txt) *
  7. # * *
  8. # ************************************************************************** */
  9. #
  10. # /* See http://www.boost.org for most recent version. */
  11. #
  12. # ifndef BOOST_PREPROCESSOR_SEQ_DETAIL_TO_LIST_MSVC_HPP
  13. # define BOOST_PREPROCESSOR_SEQ_DETAIL_TO_LIST_MSVC_HPP
  14. #
  15. # include <boost/preprocessor/config/config.hpp>
  16. #
  17. # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
  18. #
  19. # include <boost/preprocessor/cat.hpp>
  20. # include <boost/preprocessor/arithmetic/dec.hpp>
  21. # include <boost/preprocessor/control/while.hpp>
  22. # include <boost/preprocessor/tuple/elem.hpp>
  23. #
  24. # define BOOST_PP_SEQ_DETAIL_TO_LIST_MSVC_STATE_RESULT(state) \
  25. BOOST_PP_TUPLE_ELEM(2, 0, state) \
  26. /**/
  27. # define BOOST_PP_SEQ_DETAIL_TO_LIST_MSVC_STATE_SIZE(state) \
  28. BOOST_PP_TUPLE_ELEM(2, 1, state) \
  29. /**/
  30. # define BOOST_PP_SEQ_DETAIL_TO_LIST_MSVC_PRED(d,state) \
  31. BOOST_PP_SEQ_DETAIL_TO_LIST_MSVC_STATE_SIZE(state) \
  32. /**/
  33. # define BOOST_PP_SEQ_DETAIL_TO_LIST_MSVC_OP(d,state) \
  34. ( \
  35. BOOST_PP_CAT(BOOST_PP_SEQ_DETAIL_TO_LIST_MSVC_STATE_RESULT(state),), \
  36. BOOST_PP_DEC(BOOST_PP_SEQ_DETAIL_TO_LIST_MSVC_STATE_SIZE(state)) \
  37. ) \
  38. /**/
  39. #
  40. # /* BOOST_PP_SEQ_DETAIL_TO_LIST_MSVC */
  41. #
  42. # define BOOST_PP_SEQ_DETAIL_TO_LIST_MSVC(result,seqsize) \
  43. BOOST_PP_SEQ_DETAIL_TO_LIST_MSVC_STATE_RESULT \
  44. ( \
  45. BOOST_PP_WHILE \
  46. ( \
  47. BOOST_PP_SEQ_DETAIL_TO_LIST_MSVC_PRED, \
  48. BOOST_PP_SEQ_DETAIL_TO_LIST_MSVC_OP, \
  49. (result,seqsize) \
  50. ) \
  51. ) \
  52. /**/
  53. # endif // BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
  54. #
  55. # endif // BOOST_PREPROCESSOR_SEQ_DETAIL_TO_LIST_MSVC_HPP