@@ -62,8 +62,6 @@ struct va_args<ReturnType> {
6262 ::boost::openmethod::detail::va_args<__VA_ARGS__>::registry>
6363
6464#define BOOST_OPENMETHOD (NAME, ARGS, ...) \
65- template <typename ...> \
66- struct BOOST_OPENMETHOD_OVERRIDERS (NAME); \
6765 struct BOOST_OPENMETHOD_ID (NAME); \
6866 template <typename ... ForwarderParameters> \
6967 typename ::boost::openmethod::detail::enable_forwarder< \
@@ -72,14 +70,16 @@ struct va_args<ReturnType> {
7270 ForwarderParameters...>::type \
7371 BOOST_OPENMETHOD_GUIDE(NAME)(ForwarderParameters && ... args); \
7472 template <typename ... ForwarderParameters> \
75- inline auto NAME (ForwarderParameters&&... args) -> \
76- typename ::boost::openmethod::detail::enable_forwarder< \
73+ inline auto NAME (ForwarderParameters&&... args) \
74+ -> typename ::boost::openmethod::detail::enable_forwarder< \
7775 void, BOOST_OPENMETHOD_TYPE(NAME, ARGS, __VA_ARGS__), \
7876 ::boost::openmethod::detail::va_args<__VA_ARGS__>::return_type, \
7977 ForwarderParameters...>::type { \
8078 return BOOST_OPENMETHOD_TYPE (NAME, ARGS, __VA_ARGS__)::fn ( \
8179 std::forward<ForwarderParameters>(args)...); \
82- }
80+ } \
81+ template <typename ...> \
82+ struct BOOST_OPENMETHOD_OVERRIDERS (NAME)
8383
8484#define BOOST_OPENMETHOD_DETAIL_LOCATE_METHOD (NAME, ARGS ) \
8585 template <typename T> \
@@ -88,7 +88,7 @@ struct va_args<ReturnType> {
8888 struct boost_openmethod_detail_locate_method_aux <void (A...)> { \
8989 using type = \
9090 decltype (BOOST_OPENMETHOD_GUIDE(NAME)(std::declval<A>()...)); \
91- };
91+ }
9292
9393#define BOOST_OPENMETHOD_DECLARE_OVERRIDER (NAME, ARGS, ...) \
9494 template <typename ...> \
@@ -102,13 +102,15 @@ struct va_args<ReturnType> {
102102 static auto next (Args&&... args) -> decltype (auto ); \
103103 }; \
104104 inline auto BOOST_OPENMETHOD_OVERRIDERS ( \
105- NAME)<__VA_ARGS__ ARGS>::has_next() -> bool { \
105+ NAME)<__VA_ARGS__ ARGS>::has_next() \
106+ ->bool { \
106107 return boost_openmethod_detail_locate_method_aux< \
107108 void ARGS>::type::has_next<fn>(); \
108109 } \
109110 template <typename ... Args> \
110111 inline auto BOOST_OPENMETHOD_OVERRIDERS (NAME)<__VA_ARGS__ ARGS>::next( \
111- Args&&... args) -> decltype(auto ) { \
112+ Args&&... args) \
113+ ->decltype(auto ) { \
112114 return boost_openmethod_detail_locate_method_aux< \
113115 void ARGS>::type::next<fn>(std::forward<Args>(args)...); \
114116 }
@@ -123,7 +125,7 @@ struct va_args<ReturnType> {
123125#define BOOST_OPENMETHOD_DEFINE_OVERRIDER (NAME, ARGS, ...) \
124126 BOOST_OPENMETHOD_DETAIL_REGISTER_OVERRIDER (NAME, ARGS, __VA_ARGS__) \
125127 auto BOOST_OPENMETHOD_OVERRIDER(NAME, ARGS, __VA_ARGS__)::fn ARGS \
126- -> boost::mp11::mp_back<boost::mp11::mp_list<__VA_ARGS__>>
128+ ->boost::mp11::mp_back<boost::mp11::mp_list<__VA_ARGS__>>
127129
128130#define BOOST_OPENMETHOD_OVERRIDE (NAME, ARGS, ...) \
129131 BOOST_OPENMETHOD_DECLARE_OVERRIDER (NAME, ARGS, __VA_ARGS__) \
@@ -133,9 +135,9 @@ struct va_args<ReturnType> {
133135 BOOST_OPENMETHOD_DECLARE_OVERRIDER (NAME, ARGS, __VA_ARGS__) \
134136 BOOST_OPENMETHOD_DETAIL_REGISTER_OVERRIDER(NAME, ARGS, __VA_ARGS__) \
135137 inline auto BOOST_OPENMETHOD_OVERRIDER(NAME, ARGS, __VA_ARGS__)::fn ARGS \
136- -> boost::mp11::mp_back<boost::mp11::mp_list<__VA_ARGS__>>
138+ ->boost::mp11::mp_back<boost::mp11::mp_list<__VA_ARGS__>>
137139
138140#define BOOST_OPENMETHOD_CLASSES (...) \
139- BOOST_OPENMETHOD_REGISTER (::boost::openmethod::use_classes<__VA_ARGS__>);
141+ BOOST_OPENMETHOD_REGISTER (::boost::openmethod::use_classes<__VA_ARGS__>)
140142
141143#endif
0 commit comments