Closed mathieucarbou closed 1 year ago
I chose that format thinking it would offer wider platform compatibility. Sad to know it didn't work inside class.
Fixed with https://github.com/ayushsharma82/ElegantOTA/commit/482fe173ec2eec6e8ea7f6047dd0ba83e719fce4
yeah callback inside classes are more complex because variables have to be captured ([this], [=], [$], etc).
BTW, you forgot #include <functional>
in the header ;-)
Still compiled, looking at CI haha. I'll add it just in case.
yeah, saw that! weird because in my fork I had to add it to make the project compile... Anyway ;-) thanks for the merge!
The callback signature seems wrong: I cannot use any form of callback to capture the variables from an object which are out of scope of the closure.
I had to change:
to be able to use it in my class: