[Language Conformance] Use constexpr restriction in jsoncpp (#1005)

* use constexpr restriction in jsoncpp

* remove TODO comment
This commit is contained in:
dota17
2019-09-17 01:33:47 +08:00
committed by Jordan Bayles
parent 3550a0a939
commit 7ef0f9fa5b
3 changed files with 18 additions and 34 deletions

View File

@@ -88,23 +88,6 @@ Value const& Value::null = Value::nullSingleton();
Value const& Value::nullRef = Value::nullSingleton();
#endif
const Int Value::minInt = Int(~(UInt(-1) / 2));
const Int Value::maxInt = Int(UInt(-1) / 2);
const UInt Value::maxUInt = UInt(-1);
#if defined(JSON_HAS_INT64)
const Int64 Value::minInt64 = Int64(~(UInt64(-1) / 2));
const Int64 Value::maxInt64 = Int64(UInt64(-1) / 2);
const UInt64 Value::maxUInt64 = UInt64(-1);
// The constant is hard-coded because some compiler have trouble
// converting Value::maxUInt64 to a double correctly (AIX/xlC).
// Assumes that UInt64 is a 64 bits integer.
static const double maxUInt64AsDouble = 18446744073709551615.0;
#endif // defined(JSON_HAS_INT64)
const LargestInt Value::minLargestInt = LargestInt(~(LargestUInt(-1) / 2));
const LargestInt Value::maxLargestInt = LargestInt(LargestUInt(-1) / 2);
const LargestUInt Value::maxLargestUInt = LargestUInt(-1);
const UInt Value::defaultRealPrecision = 17;
#if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
template <typename T, typename U>