diff --git a/include/boost/openmethod/detail/static_list.hpp b/include/boost/openmethod/detail/static_list.hpp index 400cf393..dbc5a1de 100644 --- a/include/boost/openmethod/detail/static_list.hpp +++ b/include/boost/openmethod/detail/static_list.hpp @@ -127,10 +127,11 @@ class static_list { friend auto operator==(const iterator& a, const iterator& b) -> bool { return a.ptr == b.ptr; - }; + } + friend auto operator!=(const iterator& a, const iterator& b) -> bool { return a.ptr != b.ptr; - }; + } private: T* ptr; @@ -179,11 +180,12 @@ class static_list { friend auto operator==(const const_iterator& a, const const_iterator& b) -> bool { return a.ptr == b.ptr; - }; + } + friend auto operator!=(const const_iterator& a, const const_iterator& b) -> bool { return a.ptr != b.ptr; - }; + } private: T* ptr; diff --git a/include/boost/openmethod/macros.hpp b/include/boost/openmethod/macros.hpp index 4ef79738..79b1e8e0 100644 --- a/include/boost/openmethod/macros.hpp +++ b/include/boost/openmethod/macros.hpp @@ -62,8 +62,6 @@ struct va_args { ::boost::openmethod::detail::va_args<__VA_ARGS__>::registry> #define BOOST_OPENMETHOD(NAME, ARGS, ...) \ - template \ - struct BOOST_OPENMETHOD_OVERRIDERS(NAME); \ struct BOOST_OPENMETHOD_ID(NAME); \ template \ typename ::boost::openmethod::detail::enable_forwarder< \ @@ -72,14 +70,16 @@ struct va_args { ForwarderParameters...>::type \ BOOST_OPENMETHOD_GUIDE(NAME)(ForwarderParameters && ... args); \ template \ - inline auto NAME(ForwarderParameters&&... args) -> \ - typename ::boost::openmethod::detail::enable_forwarder< \ + inline auto NAME(ForwarderParameters&&... args) \ + ->typename ::boost::openmethod::detail::enable_forwarder< \ void, BOOST_OPENMETHOD_TYPE(NAME, ARGS, __VA_ARGS__), \ ::boost::openmethod::detail::va_args<__VA_ARGS__>::return_type, \ ForwarderParameters...>::type { \ return BOOST_OPENMETHOD_TYPE(NAME, ARGS, __VA_ARGS__)::fn( \ std::forward(args)...); \ - } + } \ + template \ + struct BOOST_OPENMETHOD_OVERRIDERS(NAME) #define BOOST_OPENMETHOD_DETAIL_LOCATE_METHOD(NAME, ARGS) \ template \ @@ -88,7 +88,7 @@ struct va_args { struct boost_openmethod_detail_locate_method_aux { \ using type = \ decltype(BOOST_OPENMETHOD_GUIDE(NAME)(std::declval()...)); \ - }; + } #define BOOST_OPENMETHOD_DECLARE_OVERRIDER(NAME, ARGS, ...) \ template \ @@ -102,13 +102,15 @@ struct va_args { static auto next(Args&&... args) -> decltype(auto); \ }; \ inline auto BOOST_OPENMETHOD_OVERRIDERS( \ - NAME)<__VA_ARGS__ ARGS>::has_next() -> bool { \ + NAME)<__VA_ARGS__ ARGS>::has_next() \ + ->bool { \ return boost_openmethod_detail_locate_method_aux< \ void ARGS>::type::has_next(); \ } \ template \ inline auto BOOST_OPENMETHOD_OVERRIDERS(NAME)<__VA_ARGS__ ARGS>::next( \ - Args&&... args) -> decltype(auto) { \ + Args&&... args) \ + ->decltype(auto) { \ return boost_openmethod_detail_locate_method_aux< \ void ARGS>::type::next(std::forward(args)...); \ } @@ -123,7 +125,7 @@ struct va_args { #define BOOST_OPENMETHOD_DEFINE_OVERRIDER(NAME, ARGS, ...) \ BOOST_OPENMETHOD_DETAIL_REGISTER_OVERRIDER(NAME, ARGS, __VA_ARGS__) \ auto BOOST_OPENMETHOD_OVERRIDER(NAME, ARGS, __VA_ARGS__)::fn ARGS \ - -> boost::mp11::mp_back> + ->boost::mp11::mp_back> #define BOOST_OPENMETHOD_OVERRIDE(NAME, ARGS, ...) \ BOOST_OPENMETHOD_DECLARE_OVERRIDER(NAME, ARGS, __VA_ARGS__) \ @@ -133,9 +135,9 @@ struct va_args { BOOST_OPENMETHOD_DECLARE_OVERRIDER(NAME, ARGS, __VA_ARGS__) \ BOOST_OPENMETHOD_DETAIL_REGISTER_OVERRIDER(NAME, ARGS, __VA_ARGS__) \ inline auto BOOST_OPENMETHOD_OVERRIDER(NAME, ARGS, __VA_ARGS__)::fn ARGS \ - -> boost::mp11::mp_back> + ->boost::mp11::mp_back> #define BOOST_OPENMETHOD_CLASSES(...) \ - BOOST_OPENMETHOD_REGISTER(::boost::openmethod::use_classes<__VA_ARGS__>); + BOOST_OPENMETHOD_REGISTER(::boost::openmethod::use_classes<__VA_ARGS__>) #endif diff --git a/include/boost/openmethod/policies/vptr_vector.hpp b/include/boost/openmethod/policies/vptr_vector.hpp index 814231a7..1b1a2768 100644 --- a/include/boost/openmethod/policies/vptr_vector.hpp +++ b/include/boost/openmethod/policies/vptr_vector.hpp @@ -183,7 +183,7 @@ struct vptr_vector : vptr { } else { detail::vptr_vector_vptrs.clear(); } - }; + } }; };