1 2 // (C) Copyright Edward Diener 2019 3 // Use, modification and distribution are subject to the Boost Software License, 4 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 // http://www.boost.org/LICENSE_1_0.txt). 6 7 #if !defined(BOOST_TTI_DETAIL_MACRO_FUN_TEMPLATE_HPP) 8 #define BOOST_TTI_DETAIL_MACRO_FUN_TEMPLATE_HPP 9 10 #include <boost/preprocessor/comparison/equal.hpp> 11 #include <boost/preprocessor/control/iif.hpp> 12 #include <boost/preprocessor/logical/and.hpp> 13 #include <boost/preprocessor/variadic/elem.hpp> 14 #include <boost/preprocessor/variadic/size.hpp> 15 #include <boost/preprocessor/variadic/to_array.hpp> 16 #include <boost/preprocessor/detail/is_binary.hpp> 17 #include <boost/tti/detail/dmacro_fve.hpp> 18 19 #define BOOST_TTI_DETAIL_FUN_TEMPLATE_VARIADIC_TO_ARRAY(...) \ 20 BOOST_PP_IIF \ 21 ( \ 22 BOOST_PP_AND \ 23 ( \ 24 BOOST_PP_EQUAL \ 25 ( \ 26 BOOST_PP_VARIADIC_SIZE(__VA_ARGS__), \ 27 1 \ 28 ), \ 29 BOOST_PP_IS_BINARY \ 30 ( \ 31 BOOST_PP_VARIADIC_ELEM(0,__VA_ARGS__) \ 32 ) \ 33 ), \ 34 BOOST_TTI_DETAIL_FIRST_VARIADIC_ELEM, \ 35 BOOST_PP_VARIADIC_TO_ARRAY \ 36 ) \ 37 (__VA_ARGS__) \ 38 /**/ 39 40 #endif // BOOST_TTI_DETAIL_MACRO_FUN_TEMPLATE_HPP 41