forked from bblanchon/ArduinoJson
Remove ARDUINOJSON_HAS_NULLPTR
(#1820)
This commit is contained in:
@ -2,10 +2,6 @@
|
||||
|
||||
#include <catch.hpp>
|
||||
|
||||
#if !ARDUINOJSON_HAS_NULLPTR
|
||||
# error ARDUINOJSON_HAS_NULLPTR must be set to 1
|
||||
#endif
|
||||
|
||||
TEST_CASE("nullptr") {
|
||||
DynamicJsonDocument doc(4096);
|
||||
JsonVariant variant = doc.to<JsonVariant>();
|
||||
|
@ -4,14 +4,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef ARDUINOJSON_HAS_NULLPTR
|
||||
# if __cplusplus >= 201103L
|
||||
# define ARDUINOJSON_HAS_NULLPTR 1
|
||||
# else
|
||||
# define ARDUINOJSON_HAS_NULLPTR 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// Support std::istream and std::ostream
|
||||
#ifndef ARDUINOJSON_ENABLE_STD_STREAM
|
||||
# ifdef __has_include
|
||||
@ -215,7 +207,7 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if ARDUINOJSON_HAS_NULLPTR && defined(nullptr)
|
||||
#if 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
|
||||
|
@ -181,8 +181,6 @@ struct Converter<SerializedValue<T>,
|
||||
}
|
||||
};
|
||||
|
||||
#if ARDUINOJSON_HAS_NULLPTR
|
||||
|
||||
template <>
|
||||
struct Converter<decltype(nullptr)> : private VariantAttorney {
|
||||
static void toJson(decltype(nullptr), JsonVariant dst) {
|
||||
@ -197,8 +195,6 @@ struct Converter<decltype(nullptr)> : private VariantAttorney {
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#if ARDUINOJSON_ENABLE_ARDUINO_STREAM
|
||||
|
||||
class MemoryPoolPrint : public Print {
|
||||
|
@ -75,12 +75,10 @@ struct NullComparer : ComparerBase {
|
||||
}
|
||||
};
|
||||
|
||||
#if ARDUINOJSON_HAS_NULLPTR
|
||||
template <>
|
||||
struct Comparer<decltype(nullptr), void> : NullComparer {
|
||||
explicit Comparer(decltype(nullptr)) : NullComparer() {}
|
||||
};
|
||||
#endif
|
||||
|
||||
struct ArrayComparer : ComparerBase {
|
||||
const CollectionData* _rhs;
|
||||
|
Reference in New Issue
Block a user