| 3753 | } |
| 3754 | |
| 3755 | bool Value::isUInt64() const { |
| 3756 | #if defined(JSON_HAS_INT64) |
| 3757 | switch (type_) { |
| 3758 | case intValue: |
| 3759 | return value_.int_ >= 0; |
| 3760 | case uintValue: |
| 3761 | return true; |
| 3762 | case realValue: |
| 3763 | // Note that maxUInt64 (= 2^64 - 1) is not exactly representable as a |
| 3764 | // double, so double(maxUInt64) will be rounded up to 2^64. Therefore we |
| 3765 | // require the value to be strictly less than the limit. |
| 3766 | return value_.real_ >= 0 && value_.real_ < maxUInt64AsDouble && |
| 3767 | IsIntegral(value_.real_); |
| 3768 | default: |
| 3769 | break; |
| 3770 | } |
| 3771 | #endif // JSON_HAS_INT64 |
| 3772 | return false; |
| 3773 | } |
| 3774 | |
| 3775 | bool Value::isIntegral() const { |
| 3776 | #if defined(JSON_HAS_INT64) |
nothing calls this directly
no test coverage detected