Use a Myers Singleton for null

Avoid some static initialization problems.

From @marklakata
See #488
This commit is contained in:
Christopher Dunn
2016-06-26 18:47:43 -05:00
parent e0f9aab0bf
commit 0f288aecdd
2 changed files with 30 additions and 16 deletions

View File

@@ -190,6 +190,8 @@ public:
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
static Value const& nullSingleton(); ///< Prefer this to null or nullRef.
/// 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.