1 # ifndef AROS_PREPROCESSOR_VARIADIC_CAST2IPTR_HPP
2 # define AROS_PREPROCESSOR_VARIADIC_CAST2IPTR_HPP
4 # include <boost/preprocessor/repetition/for.hpp>
5 # include <boost/preprocessor/logical/compl.hpp>
6 # include <boost/preprocessor/punctuation/comma_if.hpp>
7 # include <aros/preprocessor/facilities/is_empty.hpp>
8 # include <aros/preprocessor/variadic/first.hpp>
9 # include <aros/preprocessor/variadic/rest.hpp>
11 # define AROS_PP_VARIADIC_CAST2IPTR_O(_, tuple) \
12 (AROS_PP_VARIADIC_REST tuple)
14 # define AROS_PP_VARIADIC_CAST2IPTR_M(_, tuple) \
15 (IPTR)(AROS_PP_VARIADIC_FIRST tuple)BOOST_PP_COMMA_IF( \
16 AROS_PP_VARIADIC_CAST2IPTR_P(, \
17 (AROS_PP_VARIADIC_REST tuple) \
22 # define AROS_PP_VARIADIC_CAST2IPTR_P(_, tuple) \
23 BOOST_PP_COMPL(AROS_PP_IS_EMPTY(AROS_PP_VARIADIC_FIRST tuple))
25 # define AROS_PP_VARIADIC_CAST2IPTR(...) \
27 (__VA_ARGS__), AROS_PP_VARIADIC_CAST2IPTR_P, \
28 AROS_PP_VARIADIC_CAST2IPTR_O, AROS_PP_VARIADIC_CAST2IPTR_M \