dmacro_fun_template.hpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // (C) Copyright Edward Diener 2019
  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_TTI_DETAIL_MACRO_FUN_TEMPLATE_HPP)
  6. #define BOOST_TTI_DETAIL_MACRO_FUN_TEMPLATE_HPP
  7. #include <boost/preprocessor/comparison/equal.hpp>
  8. #include <boost/preprocessor/control/iif.hpp>
  9. #include <boost/preprocessor/logical/and.hpp>
  10. #include <boost/preprocessor/variadic/elem.hpp>
  11. #include <boost/preprocessor/variadic/size.hpp>
  12. #include <boost/preprocessor/variadic/to_array.hpp>
  13. #include <boost/preprocessor/detail/is_binary.hpp>
  14. #include <boost/tti/detail/dmacro_fve.hpp>
  15. #define BOOST_TTI_DETAIL_FUN_TEMPLATE_VARIADIC_TO_ARRAY(...) \
  16. BOOST_PP_IIF \
  17. ( \
  18. BOOST_PP_AND \
  19. ( \
  20. BOOST_PP_EQUAL \
  21. ( \
  22. BOOST_PP_VARIADIC_SIZE(__VA_ARGS__), \
  23. 1 \
  24. ), \
  25. BOOST_PP_IS_BINARY \
  26. ( \
  27. BOOST_PP_VARIADIC_ELEM(0,__VA_ARGS__) \
  28. ) \
  29. ), \
  30. BOOST_TTI_DETAIL_FIRST_VARIADIC_ELEM, \
  31. BOOST_PP_VARIADIC_TO_ARRAY \
  32. ) \
  33. (__VA_ARGS__) \
  34. /**/
  35. #endif // BOOST_TTI_DETAIL_MACRO_FUN_TEMPLATE_HPP