Skip to content
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

Changed rx and tx callbacks to std::function #569

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ZacJW
Copy link

@ZacJW ZacJW commented Mar 12, 2022

By using std::function rather than function pointers, users can invoke
more complex callback functions such as non-static methods via the use of std::bind.

This is a backwards compatible change as function pointers coerce into std::functions. I've verfied as much by compiling and running an existing project and it works without any modifications.

I have not updated any documentation as it doesn't explicitly say "function pointer" which would now be wrong, just "function" which could mean std::function.

By using std::function rather than function pointers, users can invoke
more complex callback functions such as non-static methods.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant