MCPcopy Create free account
hub / github.com/Kitware/CMake / isInt64

Method isInt64

Utilities/cmjsoncpp/src/lib_json/json_value.cpp:1303–1321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1301}
1302
1303bool Value::isInt64() const {
1304#if defined(JSON_HAS_INT64)
1305 switch (type()) {
1306 case intValue:
1307 return true;
1308 case uintValue:
1309 return value_.uint_ <= UInt64(maxInt64);
1310 case realValue:
1311 // Note that maxInt64 (= 2^63 - 1) is not exactly representable as a
1312 // double, so double(maxInt64) will be rounded up to 2^63. Therefore we
1313 // require the value to be strictly less than the limit.
1314 return value_.real_ >= double(minInt64) &&
1315 value_.real_ < double(maxInt64) && IsIntegral(value_.real_);
1316 default:
1317 break;
1318 }
1319#endif // JSON_HAS_INT64
1320 return false;
1321}
1322
1323bool Value::isUInt64() const {
1324#if defined(JSON_HAS_INT64)

Callers 1

deserializeMethod · 0.80

Calls 2

IsIntegralFunction · 0.85
typeClass · 0.50

Tested by

no test coverage detected