mirror of
https://github.com/thelsing/knx.git
synced 2025-08-26 13:51:28 +02:00
Allow lambda on platforms which support it, can be forced with HAS_FUNCTIONAL 0/1
This commit is contained in:
parent
f0fcfe3b86
commit
4cf3dab9a6
@ -19,7 +19,21 @@ enum ComFlag
|
||||
|
||||
class GroupObject;
|
||||
|
||||
#ifdef __linux__
|
||||
#ifndef HAS_FUNCTIONAL
|
||||
# if defined(__linux__) || defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_STM32)
|
||||
# define HAS_FUNCTIONAL 1
|
||||
# elif defined(__has_include)
|
||||
# if __has_include (<functional>)
|
||||
# define HAS_FUNCTIONAL 1
|
||||
# else
|
||||
# define HAS_FUNCTIONAL 0
|
||||
# endif
|
||||
# else
|
||||
# define HAS_FUNCTIONAL 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if HAS_FUNCTIONAL
|
||||
#include <functional>
|
||||
typedef std::function<void(GroupObject&)> GroupObjectUpdatedHandler;
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user