| 3767 | } |
| 3768 | |
| 3769 | bool Value::isInt64() const { |
| 3770 | #if defined(JSON_HAS_INT64) |
| 3771 | switch (type_) { |
| 3772 | case intValue: |
| 3773 | return true; |
| 3774 | case uintValue: |
| 3775 | return value_.uint_ <= UInt64(maxInt64); |
| 3776 | case realValue: |
| 3777 | // Note that maxInt64 (= 2^63 - 1) is not exactly representable as a |
| 3778 | // double, so double(maxInt64) will be rounded up to 2^63. Therefore we |
| 3779 | // require the value to be strictly less than the limit. |
| 3780 | return value_.real_ >= double(minInt64) && |
| 3781 | value_.real_ < double(maxInt64) && IsIntegral(value_.real_); |
| 3782 | default: |
| 3783 | break; |
| 3784 | } |
| 3785 | #endif // JSON_HAS_INT64 |
| 3786 | return false; |
| 3787 | } |
| 3788 | |
| 3789 | bool Value::isUInt64() const { |
| 3790 | #if defined(JSON_HAS_INT64) |
nothing calls this directly
no test coverage detected