From 67aa8efd5a55d512a8fdf2ab43069cfdabecc26e Mon Sep 17 00:00:00 2001 From: Benoit Blanchon Date: Sun, 23 Aug 2020 09:29:40 +0200 Subject: [PATCH] Added a build failure when nullptr is defined as a macro (closes #1355) --- CHANGELOG.md | 5 +++++ src/ArduinoJson/Configuration.hpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2fa203e8..05f1b1bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ ArduinoJson: change log ======================= +HEAD +---- + +* Added a build failure when nullptr is defined as a macro (issue #1355) + v6.16.1 (2020-08-04) ------- diff --git a/src/ArduinoJson/Configuration.hpp b/src/ArduinoJson/Configuration.hpp index acf6276b..42ba498e 100644 --- a/src/ArduinoJson/Configuration.hpp +++ b/src/ArduinoJson/Configuration.hpp @@ -230,3 +230,8 @@ #define ARDUINOJSON_DEBUG 0 #endif #endif + +#if ARDUINOJSON_HAS_NULLPTR && defined(nullptr) +#error nullptr is defined as a macro. Remove the faulty #define or #undef nullptr +// See https://github.com/bblanchon/ArduinoJson/issues/1355 +#endif