Skip to content

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

@AlirezaSalehy

Description

@AlirezaSalehy

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions