Closed janjongboom closed 7 years ago
Thanks for reporitng this, it's a bit entertaining that this combination of versions compiles at all.
I believe the mbed::callback
function was introduced in mbed OS 5.1.5. Is this issue only present <=5.1.4?
Unfortunately, we don't have the best system for versioning, but you should be able to use v0.6
of mbed-events with previous versions of mbed OS. Let me know if this doesn't work for you.
This was against 5.1.5... It's a PITA that we have all these versions. When someone adds this repo to their project in online IDE they have to manually switch versions, not nice.
I'll try with v0.6 tag. I tried it yesterday but it had issues too, will report them.
Side note: It's the macros which save you here, as the macros are compiled away when not used, so that's how we can still do the workaround ;-) Normal functions would just have killed the compilation regardless of whether you used mbed::callback or not.
Agreed, it looks like we may get support for a "latest" branch soon in the online compiler to aleviate this problem, although there is still some effort needed.
It looks like I was wrong on the version introducing the mbed::callback
function. Looks like it wasn't added until mbed OS 5.2:
https://github.com/ARMmbed/mbed-os/pull/2496
Since the mbed-event library was merged into mbed OS in mbed OS 5.2, I don't see a good reason for this repo to exist outside of support for old versions.
I went ahead and put up a pr that works around without the callback function. Let me know if there is still an issue: https://github.com/ARMmbed/mbed-events/pull/26
Feel free to reopen if this issue is still present
When doing
Workaround: