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

Method isUInt64

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

Source from the content-addressed store, hash-verified

1321}
1322
1323bool Value::isUInt64() const {
1324#if defined(JSON_HAS_INT64)
1325 switch (type()) {
1326 case intValue:
1327 return value_.int_ >= 0;
1328 case uintValue:
1329 return true;
1330 case realValue:
1331 // Note that maxUInt64 (= 2^64 - 1) is not exactly representable as a
1332 // double, so double(maxUInt64) will be rounded up to 2^64. Therefore we
1333 // require the value to be strictly less than the limit.
1334 return value_.real_ >= 0 && value_.real_ < maxUInt64AsDouble &&
1335 IsIntegral(value_.real_);
1336 default:
1337 break;
1338 }
1339#endif // JSON_HAS_INT64
1340 return false;
1341}
1342
1343bool Value::isIntegral() const {
1344 switch (type()) {

Callers

nothing calls this directly

Calls 2

IsIntegralFunction · 0.85
typeClass · 0.50

Tested by

no test coverage detected