|
15 | 15 | #include <boost/preprocessor/repeat_from_to.hpp> |
16 | 16 | #include <boost/preprocessor/enum.hpp> |
17 | 17 | #include <boost/preprocessor/enum_params.hpp> |
| 18 | +#include <boost/preprocessor/repetition/enum_binary_params.hpp> |
18 | 19 | #include <boost/preprocessor/tuple.hpp> |
19 | 20 | #include <boost/preprocessor/cat.hpp> |
20 | 21 | #include <boost/preprocessor/arithmetic/sub.hpp> |
@@ -97,17 +98,17 @@ struct overloads_common |
97 | 98 | BOOST_PP_CAT(iter, BOOST_PP_INC(index)); \ |
98 | 99 | typedef typename BOOST_PP_CAT(iter, index)::type BOOST_PP_CAT(T, index); \ |
99 | 100 |
|
100 | | -#define BOOST_PYTHON_FUNC_WRAPPER_GEN(z, index, data) \ |
101 | | - static RT BOOST_PP_CAT(func_, \ |
102 | | - BOOST_PP_SUB_D(1, index, BOOST_PP_TUPLE_ELEM(3, 1, data))) ( \ |
103 | | - BOOST_PYTHON_BINARY_ENUM( \ |
104 | | - index, T, arg)) \ |
105 | | - { \ |
106 | | - BOOST_PP_TUPLE_ELEM(3, 2, data) \ |
107 | | - BOOST_PP_TUPLE_ELEM(3, 0, data)( \ |
108 | | - BOOST_PP_ENUM_PARAMS( \ |
109 | | - index, \ |
110 | | - arg)); \ |
| 101 | +#define BOOST_PYTHON_FUNC_WRAPPER_GEN(z, index, data) \ |
| 102 | + static RT BOOST_PP_CAT(func_, \ |
| 103 | + BOOST_PP_SUB_D(1, index, BOOST_PP_TUPLE_ELEM(3, 1, data))) ( \ |
| 104 | + BOOST_PP_ENUM_BINARY_PARAMS_Z( \ |
| 105 | + 1, index, T, arg)) \ |
| 106 | + { \ |
| 107 | + BOOST_PP_TUPLE_ELEM(3, 2, data) \ |
| 108 | + BOOST_PP_TUPLE_ELEM(3, 0, data)( \ |
| 109 | + BOOST_PP_ENUM_PARAMS( \ |
| 110 | + index, \ |
| 111 | + arg)); \ |
111 | 112 | } |
112 | 113 |
|
113 | 114 | #define BOOST_PYTHON_GEN_FUNCTION(fname, fstubs_name, n_args, n_dflts, ret) \ |
@@ -141,7 +142,7 @@ struct overloads_common |
141 | 142 | static RT BOOST_PP_CAT(func_, \ |
142 | 143 | BOOST_PP_SUB_D(1, index, BOOST_PP_TUPLE_ELEM(3, 1, data))) ( \ |
143 | 144 | ClassT& obj BOOST_PP_COMMA_IF(index) \ |
144 | | - BOOST_PYTHON_BINARY_ENUM(index, T, arg) \ |
| 145 | + BOOST_PP_ENUM_BINARY_PARAMS_Z(1, index, T, arg) \ |
145 | 146 | ) \ |
146 | 147 | { \ |
147 | 148 | BOOST_PP_TUPLE_ELEM(3, 2, data) obj.BOOST_PP_TUPLE_ELEM(3, 0, data)( \ |
|
0 commit comments