Closed jmas closed 9 years ago
It's simpler to just redefine callback_t using std::function.
@Imroy, Can you show some code how to do this. I'm noob in this. :(
UPD: Oh.. I see.. You just add source update. I'll try. Thanks.
UPD2: Yep. Now it working. Thanks a lot!
Okay, good to hear you figured it out :)
Hello. I'm not super-c++ programmer, but I found that I can't pass
'this'
to lambda-function when I work withset_callback()
. I want to do something like this:eventsSize
,events
is members of top-class scope where this code is present. In currentPubSubClien.h
I do not found way to work witheventsSize
,events
inside lambda-function.So I did some modifications for
PubSubClien.h
:And now I can pass variables of different scope to lambda-function.
I can do Pull-Request with this modifications. But if you know right way to pass variables of different scope to lambda-function - please tell how I can do this.