diff --git a/include/json/value.h b/include/json/value.h index efc34ac..0c507a3 100644 --- a/include/json/value.h +++ b/include/json/value.h @@ -133,7 +133,8 @@ public: typedef Json::LargestUInt LargestUInt; typedef Json::ArrayIndex ArrayIndex; - static const Value& null; + static const Value& null; ///! We regret this reference to a global instance; prefer the simpler Value(). + static const Value& nullRef; ///! just a kludge for binary-compatibility; same as null /// Minimum signed integer value that can be stored in a Json::Value. static const LargestInt minLargestInt; /// Maximum signed integer value that can be stored in a Json::Value. diff --git a/src/lib_json/json_value.cpp b/src/lib_json/json_value.cpp index ed5aafe..f9139c7 100644 --- a/src/lib_json/json_value.cpp +++ b/src/lib_json/json_value.cpp @@ -36,6 +36,7 @@ namespace Json { static const unsigned char ALIGNAS(8) kNull[sizeof(Value)] = { 0 }; const unsigned char& kNullRef = kNull[0]; const Value& Value::null = reinterpret_cast(kNullRef); +const Value& Value::nullRef = null; const Int Value::minInt = Int(~(UInt(-1) / 2)); const Int Value::maxInt = Int(UInt(-1) / 2);