| 2706 | } |
| 2707 | |
| 2708 | bool Value::isUInt64() const { |
| 2709 | #if defined(JSON_HAS_INT64) |
| 2710 | switch (type_) { |
| 2711 | case intValue: |
| 2712 | return value_.int_ >= 0; |
| 2713 | case uintValue: |
| 2714 | return true; |
| 2715 | case realValue: |
| 2716 | // Note that maxUInt64 (= 2^64 - 1) is not exactly representable as a |
| 2717 | // double, so double(maxUInt64) will be rounded up to 2^64. Therefore we |
| 2718 | // require the value to be strictly less than the limit. |
| 2719 | return value_.real_ >= 0 && value_.real_ < maxUInt64AsDouble && |
| 2720 | IsIntegral(value_.real_); |
| 2721 | default: |
| 2722 | break; |
| 2723 | } |
| 2724 | #endif // JSON_HAS_INT64 |
| 2725 | return false; |
| 2726 | } |
| 2727 | |
| 2728 | bool Value::isIntegral() const { |
| 2729 | #if defined(JSON_HAS_INT64) |
nothing calls this directly
no test coverage detected