LennartHennigs / Button2

Arduino/ESP button library that provides callback functions to track single, double, triple and long clicks. It also takes care of debouncing.
MIT License
487 stars 81 forks source link

Change std::functional guards from platform-based to language version-based #58

Open KayMD opened 1 year ago

KayMD commented 1 year ago

Currently, support for std::functional is gated by #if defined(ARDUINO_ARCH_ESP32) || defined(ESP8266)

This could be changed to #if __cplusplus >= 201103L to include other platforms that support <functional> such as Teensy.

KayMD commented 1 year ago

Could also check the header guard for , such as _GLIBCXX_STD_FUNCTION_H for GCC, but then it gets compiler-dependent