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

Provide a solution for using class member functions as callback #153

Open
AlirezaSalehy opened this issue Jun 13, 2022 · 0 comments
Open

Comments

@AlirezaSalehy
Copy link

AlirezaSalehy commented Jun 13, 2022

Hi, There!

Thanks again for your useful library and the effort made. Recently, I have been struggling to find a way to use member functions as PropertyChanged callback but as you possibly know it's not possible in this version of the library. But I request to change the callback definitions that is originally like this:

void (*callback_)(ThingPropertyValue) = nullptr)

to this:

std::function<void(ThingPropertyValue)> callback_

According to my investigations, the neatest way to make member functions used as callback is by using functional and std::function concept; this way we can easily pass lambda functions as callbacks.

So I was wondering if there is a technical issue that impedes the usage of functional. And if there's no then I'd be so grateful to be able to contribute to this issue.

Thanks in advance!

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

No branches or pull requests

1 participant