Timeline for How do I use lambda functions in Arduino?
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 26, 2020 at 16:23 | comment | added | the busybee | You can emulate a closure by an instance of a helper class that stores the captured values and implements the function. I didn't try it, but I expect it to work even for AVRs. | |
Sep 24, 2020 at 19:32 | comment | added | Edgar Bonet | @KIIV: thanks for the heads up. I edited the answer. | |
Sep 24, 2020 at 19:32 | history | edited | Edgar Bonet | CC BY-SA 4.0 |
std::function is supported on ARM
|
Sep 24, 2020 at 19:06 | comment | added | KIIV | Not completely true. It's not supported by avr-g++ compiler. However compilers for ARM based arduinos usually have full support of STL libraries including std::function | |
Sep 24, 2020 at 18:37 | vote | accept | Arseni Mourzenko | ||
Sep 24, 2020 at 18:30 | history | answered | Edgar Bonet | CC BY-SA 4.0 |