-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1260: Fix active messaging functor inference using the FunctorExtractor #1330
Conversation
c0e7168
to
dc4a40a
Compare
Codecov Report
@@ Coverage Diff @@
## develop #1330 +/- ##
===========================================
- Coverage 82.69% 82.66% -0.04%
===========================================
Files 760 760
Lines 28682 28699 +17
===========================================
+ Hits 23719 23724 +5
- Misses 4963 4975 +12
|
189c076
to
6dc8c17
Compare
e88e3c7
to
b091354
Compare
I really like what this does. I want to request an extension to cover updating the codebase as broadly as possible, but that's asking for merge conflicts. Let's get this integrated, and then clean things up across the board in a follow-on PR. |
Could the same thing be done to the interfaces on objgroup and collection proxies? |
This PR is merely just a bugfix for Active send/broadcast when used with Functor handler. For any arbitrary handler we're limited by C++14's lack of using the object as template argument, without specifying its type first. If we really would want to get rid of explicit message type, I think the best we can do currently is: template <typename HandlerType, HandlerType handler>
send(MsgPtrThief<typename FunctionExtractor<HandlerType >::MsgType >msg, ...) Then we could provide helper macro like so: #define VT_HANDLER(handler) decltype(&handler), &handler which would make the call to send<VT_HANDLER(myHandler)>(my_msg); Example: https://godbolt.org/z/fK6xvjWa8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look good
b091354
to
29c5ff8
Compare
I just realized that this change enforces the user to have a Functor with only single |
d64e9a1
to
1f28dc8
Compare
…age with a functor handler in tutorial code
…andler) by using FunctorExtractor directly with MsgPtrThief
…ed by FunctorExtractor
…to Active send/broadcast with Functor
b58ec52
to
560f6dd
Compare
Fixes #1260