@@ -20,15 +20,16 @@ namespace detail {
2020 * and handling incoming messages.
2121 */
2222template <stdx::ct_string Name, typename Msg, match::matcher M,
23- stdx::callable F, typename ... ExtraArgs >
23+ stdx::callable F>
2424struct callback {
2525 [[nodiscard]] auto is_match (auto const &data) const -> bool {
2626 auto view = typename Msg::view_t {data};
2727 return matcher (view);
2828 }
2929
30+ template <typename ... Args>
3031 [[nodiscard]] auto handle (auto const &data,
31- ExtraArgs const &...args) const -> bool {
32+ Args const &...args) const -> bool {
3233 auto view = typename Msg::view_t {data};
3334 if (matcher (view)) {
3435 CIB_INFO (" Incoming message matched [{}], because [{}], executing "
@@ -54,22 +55,21 @@ struct callback {
5455 using callable_t = F;
5556
5657 template <match::matcher NewM>
57- using rebind_matcher = callback<Name, Msg, NewM, F, ExtraArgs... >;
58+ using rebind_matcher = callback<Name, Msg, NewM, F>;
5859
5960 constexpr static auto name = Name;
6061 [[no_unique_address]] matcher_t matcher;
6162 [[no_unique_address]] callable_t callable;
6263};
6364
64- template <stdx::ct_string Name, typename Msg, typename ... ExtraArgs>
65- struct callback_construct_t {
65+ template <stdx::ct_string Name, typename Msg> struct callback_construct_t {
6666 template <match::matcher M, stdx::callable F>
6767 [[nodiscard]] constexpr auto operator ()(M, F &&f) const {
6868 using ::operator and ;
6969 using matcher_t =
7070 decltype (match::sum_of_products (M{} and typename Msg::matcher_t {}));
71- return callback<Name, Msg, matcher_t , std::remove_cvref_t <F>,
72- ExtraArgs...>{ matcher_t {}, std::forward<F>(f)};
71+ return callback<Name, Msg, matcher_t , std::remove_cvref_t <F>>{
72+ matcher_t {}, std::forward<F>(f)};
7373 }
7474
7575 template <msg::matcher_maker M, stdx::callable F>
@@ -86,7 +86,6 @@ struct callback_construct_t {
8686};
8787} // namespace detail
8888
89- template <stdx::ct_string Name, typename Msg, typename ... ExtraArgs>
90- constexpr inline auto callback =
91- detail::callback_construct_t <Name, Msg, ExtraArgs...>{};
89+ template <stdx::ct_string Name, typename Msg>
90+ constexpr inline auto callback = detail::callback_construct_t <Name, Msg>{};
9291} // namespace msg
0 commit comments