|
14 | 14 | #include <utility> |
15 | 15 | #include <vector> |
16 | 16 |
|
17 | | -#include <boost/preprocessor/arithmetic/sub.hpp> |
18 | 17 | #include <boost/preprocessor/facilities/overload.hpp> |
19 | 18 | #include <boost/preprocessor/punctuation/comma_if.hpp> |
20 | 19 | #include <boost/preprocessor/repetition/repeat.hpp> |
21 | 20 | #include <boost/preprocessor/stringize.hpp> |
22 | 21 | #include <boost/preprocessor/tuple/elem.hpp> |
23 | | -#include <boost/preprocessor/tuple/push_front.hpp> |
24 | | -#include <boost/preprocessor/tuple/rem.hpp> |
25 | 22 | #include <boost/preprocessor/tuple/size.hpp> |
26 | | -#include <boost/preprocessor/variadic/to_tuple.hpp> |
27 | 23 | #include <boost/preprocessor/variadic/elem.hpp> |
| 24 | +#include <boost/preprocessor/variadic/to_tuple.hpp> |
28 | 25 |
|
29 | 26 | #include <boost/type_traits/is_virtual_base_of.hpp> |
30 | 27 |
|
|
193 | 190 | #define YOMM2_FRIEND(...) \ |
194 | 191 | BOOST_PP_OVERLOAD(YOMM2_FRIEND_, __VA_ARGS__)(__VA_ARGS__) |
195 | 192 | #else |
196 | | -#define YOMM2_FRIEND(...) \ |
197 | | - BOOST_PP_CAT(BOOST_PP_OVERLOAD(YOMM2_FRIEND_, __VA_ARGS__) \ |
| 193 | +#define YOMM2_FRIEND(...) \ |
| 194 | + BOOST_PP_CAT(BOOST_PP_OVERLOAD(YOMM2_FRIEND_, __VA_ARGS__) \ |
198 | 195 | (__VA_ARGS__), BOOST_PP_EMPTY()) |
199 | 196 | #endif |
200 | 197 |
|
|
204 | 201 | #define YOMM2_FRIEND_3(CONTAINER, RETURN_T, ARGS) \ |
205 | 202 | friend struct CONTAINER<RETURN_T ARGS> |
206 | 203 |
|
207 | | -#define YOMM2_DEFINITION(CONTAINER, RETURN_T, ARGS) \ |
| 204 | +#define YOMM2_DEFINITION(CONTAINER, RETURN_T, ARGS) \ |
208 | 205 | CONTAINER<RETURN_T ARGS>::yOMM2_body |
209 | 206 |
|
210 | 207 | #define YOMM2_CLASS(...) \ |
211 | | - yOMM2_CLASS2(yOMM2_GENSYM, \ |
212 | | - BOOST_PP_TUPLE_PUSH_FRONT( \ |
213 | | - BOOST_PP_VARIADIC_TO_TUPLE(__VA_ARGS__), \ |
214 | | - ::yorel::yomm2::default_registry)) |
215 | | - |
216 | | -#define YOMM2_CLASS_(REG, ...) \ |
217 | | - yOMM2_CLASS2(yOMM2_GENSYM, \ |
218 | | - BOOST_PP_TUPLE_PUSH_FRONT(BOOST_PP_VARIADIC_TO_TUPLE(__VA_ARGS__), REG)) |
| 208 | + YOMM2_CLASS_(::yorel::yomm2::default_registry, __VA_ARGS__) |
| 209 | + |
| 210 | +#define YOMM2_CLASS_(...) \ |
| 211 | + yOMM2_CLASS2(yOMM2_GENSYM, BOOST_PP_VARIADIC_TO_TUPLE(__VA_ARGS__)) |
219 | 212 |
|
220 | 213 | #define yOMM2_CLASS2(NS, TUPLE) \ |
221 | 214 | namespace { \ |
|
0 commit comments