Skip to content

Commit

Permalink
more macro work
Browse files Browse the repository at this point in the history
  • Loading branch information
jll63 committed Sep 21, 2024
1 parent df382df commit 2aa20c8
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions include/yorel/yomm2/macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
#define yOMM2_DECLARE(IF_STATIC, NAME, ARGS, ...) \
struct YOMM2_SYMBOL(NAME); \
IF_STATIC(static, ) \
yOMM2_method(NAME, ARGS, __VA_ARGS__) NAME##_yomm2_guide( \
yOMM2_method(NAME, ARGS, __VA_ARGS__) NAME##_yomm2_guide( \
BOOST_PP_REPEAT(BOOST_PP_TUPLE_SIZE(ARGS), yOMM2_PLIST, ARGS)); \
IF_STATIC(static, ) \
inline decltype(auto) NAME( \
Expand All @@ -71,12 +71,11 @@
struct _yOMM2_select; \
template<typename... A> \
struct _yOMM2_select<void(A...)> { \
using type = decltype(NAME##_yomm2_guide(std::declval<A>()...)); \
using type = decltype(NAME##_yomm2_guide(std::declval<A>()...)); \
}; \
using method_type = _yOMM2_select<void ARGS>::type; \
using _yOMM2_return_t = method_type::return_type;


#define YOMM2_DEFINE(NAME, ARGS, ...) \
yOMM2_DEFINE(YOMM2_GENSYM, NAME, ARGS, __VA_ARGS__)

Expand Down Expand Up @@ -115,7 +114,7 @@
ARGS; \
}; \
INLINE NS::method_type::next_type CONTAINER< \
boost::mp11::mp_first<boost::mp11::mp_list<__VA_ARGS__>> ARGS>::next; \
boost::mp11::mp_first<boost::mp11::mp_list<__VA_ARGS__>> ARGS>::next; \
namespace { \
namespace NS { \
INLINE method_type::override_fn<CONTAINER< \
Expand All @@ -126,9 +125,9 @@
ARGS>::next); \
} \
} \
INLINE boost::mp11::mp_first<boost::mp11::mp_list<__VA_ARGS__>> \
CONTAINER<boost::mp11::mp_first<boost::mp11::mp_list<__VA_ARGS__>>( \
ARGS)>::fn ARGS
INLINE boost::mp11::mp_first<boost::mp11::mp_list<__VA_ARGS__>> CONTAINER< \
boost::mp11::mp_first<boost::mp11::mp_list<__VA_ARGS__>> ARGS>::fn \
ARGS

// #if !BOOST_PP_VARIADICS_MSVC
// #define YOMM2_FRIEND(...) \
Expand Down

0 comments on commit 2aa20c8

Please sign in to comment.