From 22fa512c2822f3e8ea5b807b085df43bd07c6f20 Mon Sep 17 00:00:00 2001 From: Crazor Date: Fri, 22 Jun 2018 12:16:08 +0200 Subject: [PATCH] Exclude {min, max} macros when using . Those defines not only break , but as well. --- cores/esp32/Arduino.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cores/esp32/Arduino.h b/cores/esp32/Arduino.h index d60d3fe0828..6e5a78b9a61 100644 --- a/cores/esp32/Arduino.h +++ b/cores/esp32/Arduino.h @@ -176,8 +176,8 @@ extern "C" void configTzTime(const char* tz, long random(long); #endif /* __cplusplus */ -#ifndef _GLIBCXX_VECTOR -// arduino is not compatible with std::vector +#if !defined(_GLIBCXX_VECTOR) && !defined(_GLIBCXX_FUNCTIONAL) +// arduino is not compatible with std::vector or std::function #define min(a,b) ((a)<(b)?(a):(b)) #define max(a,b) ((a)>(b)?(a):(b)) #endif