sequence_to_seq.hpp 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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_TO_SEQ_HPP)
  6. #define BOOST_VMD_DETAIL_SEQUENCE_TO_SEQ_HPP
  7. #include <boost/preprocessor/control/expr_iif.hpp>
  8. #include <boost/vmd/detail/modifiers.hpp>
  9. #include <boost/vmd/detail/mods.hpp>
  10. #include <boost/vmd/detail/not_empty.hpp>
  11. #include <boost/vmd/detail/sequence_elem.hpp>
  12. #define BOOST_VMD_DETAIL_SEQUENCE_TO_SEQ(...) \
  13. BOOST_PP_EXPR_IIF \
  14. ( \
  15. BOOST_VMD_DETAIL_NOT_EMPTY(BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_VSEQ(__VA_ARGS__)), \
  16. BOOST_VMD_DETAIL_SEQUENCE_ELEM_PROCESS_TUPLE \
  17. ( \
  18. BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_VSEQ(__VA_ARGS__), \
  19. , \
  20. BOOST_VMD_TYPE_SEQ, \
  21. BOOST_VMD_DETAIL_NEW_MODS(BOOST_VMD_ALLOW_RETURN,__VA_ARGS__) \
  22. ) \
  23. ) \
  24. /**/
  25. #define BOOST_VMD_DETAIL_SEQUENCE_TO_SEQ_D(d,...) \
  26. BOOST_PP_EXPR_IIF \
  27. ( \
  28. BOOST_VMD_DETAIL_NOT_EMPTY(BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_VSEQ(__VA_ARGS__)), \
  29. BOOST_VMD_DETAIL_SEQUENCE_ELEM_PROCESS_TUPLE_D \
  30. ( \
  31. d, \
  32. BOOST_VMD_DETAIL_SEQUENCE_ELEM_GET_VSEQ(__VA_ARGS__), \
  33. , \
  34. BOOST_VMD_TYPE_SEQ, \
  35. BOOST_VMD_DETAIL_NEW_MODS_D(d,BOOST_VMD_ALLOW_RETURN,__VA_ARGS__) \
  36. ) \
  37. ) \
  38. /**/
  39. #endif /* BOOST_VMD_DETAIL_SEQUENCE_TO_SEQ_HPP */