szaszm commented on pull request #1182: URL: https://github.com/apache/nifi-minifi-cpp/pull/1182#issuecomment-945765651
I think keeping `std::function`, callback value semantics, and using `std::ref` where necessary is better design. The relatively common usage is only a result of converting old code without rewriting the callbacks, but I think the new structure encourages stateless callback design naturally, so it wouldn't be as commonly used as it is now. Here it's not an issue, but generally there is a problem with forwarding function objects: If they are rvalues, then we can only call them once, since we can't safely reuse a `move`d-from parameter. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
