| 3787 | } |
| 3788 | |
| 3789 | bool Value::isUInt64() const { |
| 3790 | #if defined(JSON_HAS_INT64) |
| 3791 | switch (type_) { |
| 3792 | case intValue: |
| 3793 | return value_.int_ >= 0; |
| 3794 | case uintValue: |
| 3795 | return true; |
| 3796 | case realValue: |
| 3797 | // Note that maxUInt64 (= 2^64 - 1) is not exactly representable as a |
| 3798 | // double, so double(maxUInt64) will be rounded up to 2^64. Therefore we |
| 3799 | // require the value to be strictly less than the limit. |
| 3800 | return value_.real_ >= 0 && value_.real_ < maxUInt64AsDouble && |
| 3801 | IsIntegral(value_.real_); |
| 3802 | default: |
| 3803 | break; |
| 3804 | } |
| 3805 | #endif // JSON_HAS_INT64 |
| 3806 | return false; |
| 3807 | } |
| 3808 | |
| 3809 | bool Value::isIntegral() const { |
| 3810 | #if defined(JSON_HAS_INT64) |
nothing calls this directly
no test coverage detected