File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -133,7 +133,8 @@ class JSON_API Value {
133133 typedef Json::LargestUInt LargestUInt;
134134 typedef Json::ArrayIndex ArrayIndex;
135135
136- static const Value& null;
136+ static const Value& null; // /! We regret this reference to a global instance; prefer the simpler Value().
137+ static const Value& nullRef; // /! just a kludge for binary-compatibility; same as null
137138 // / Minimum signed integer value that can be stored in a Json::Value.
138139 static const LargestInt minLargestInt;
139140 // / Maximum signed integer value that can be stored in a Json::Value.
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ namespace Json {
3636static const unsigned char ALIGNAS (8 ) kNull[sizeof(Value)] = { 0 };
3737const unsigned char & kNullRef = kNull [0 ];
3838const Value& Value::null = reinterpret_cast <const Value&>(kNullRef );
39+ const Value& Value::nullRef = null;
3940
4041const Int Value::minInt = Int(~(UInt(-1 ) / 2 ));
4142const Int Value::maxInt = Int(UInt(-1 ) / 2 );
You can’t perform that action at this time.
0 commit comments