Stiffstream / sobjectizer

An implementation of Actor, Publish-Subscribe, and CSP models in one rather small C++ framework. With performance, quality, and stability proved by years in the production.

Home Page:https://stiffstream.com/en/products/sobjectizer.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow `const auto &` as an argument for delivery filter in single/multi_sink_binding

eao197 opened this issue · comments

The current implementation requires repetition of type name if delivery filter is used with so_5::single_sink_binding_t and so_5::multi_sink_binding_t:

so_5::single_sink_binding_t binding;
binding.bind<MyMsg>(src_mbox, dest_msink, [](const MyMsg & msg) {...});

It would be cool to have a possibility to use const auto& as argument type for delivery filter:

so_5::single_sink_binding_t binding;
binding.bind<MyMsg>(src_mbox, dest_msink, [](const auto & msg) {...});

It may make code more flexible (especially in case of templates).

The fix will be a part of upcoming 5.8.1 release.