Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

Commit 825e0fa

Browse files
committed
do not use Boost.PP in YOMM2_CLASS, for compatibility with 1.53
1 parent 304d4db commit 825e0fa

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

include/yorel/yomm2.hpp

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,14 @@
1414
#include <utility>
1515
#include <vector>
1616

17-
#include <boost/preprocessor/arithmetic/sub.hpp>
1817
#include <boost/preprocessor/facilities/overload.hpp>
1918
#include <boost/preprocessor/punctuation/comma_if.hpp>
2019
#include <boost/preprocessor/repetition/repeat.hpp>
2120
#include <boost/preprocessor/stringize.hpp>
2221
#include <boost/preprocessor/tuple/elem.hpp>
23-
#include <boost/preprocessor/tuple/push_front.hpp>
24-
#include <boost/preprocessor/tuple/rem.hpp>
2522
#include <boost/preprocessor/tuple/size.hpp>
26-
#include <boost/preprocessor/variadic/to_tuple.hpp>
2723
#include <boost/preprocessor/variadic/elem.hpp>
24+
#include <boost/preprocessor/variadic/to_tuple.hpp>
2825

2926
#include <boost/type_traits/is_virtual_base_of.hpp>
3027

@@ -193,8 +190,8 @@
193190
#define YOMM2_FRIEND(...) \
194191
BOOST_PP_OVERLOAD(YOMM2_FRIEND_, __VA_ARGS__)(__VA_ARGS__)
195192
#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__) \
198195
(__VA_ARGS__), BOOST_PP_EMPTY())
199196
#endif
200197

@@ -204,18 +201,14 @@
204201
#define YOMM2_FRIEND_3(CONTAINER, RETURN_T, ARGS) \
205202
friend struct CONTAINER<RETURN_T ARGS>
206203

207-
#define YOMM2_DEFINITION(CONTAINER, RETURN_T, ARGS) \
204+
#define YOMM2_DEFINITION(CONTAINER, RETURN_T, ARGS) \
208205
CONTAINER<RETURN_T ARGS>::yOMM2_body
209206

210207
#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__))
219212

220213
#define yOMM2_CLASS2(NS, TUPLE) \
221214
namespace { \

0 commit comments

Comments
 (0)