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

so_set_delivery_filter and lvalue references

eao197 opened this issue · comments

It seems that this code can't be compiled with the current version of SObjectizer:

void so_define_agent() override {
  auto filter = [](const some_message &) { return true; };
  so_set_delivery_filter(mbox, filter);
}

because so_set_delivery_filter expects a rvalue reference to lambda-function.

Maybe it's necessary to fix so_set_delivery_filter to allow acceptance of lvalue references (const and non-const)?

Fixed in v.5.7.4.2.