| 3815 | } |
| 3816 | |
| 3817 | bool Value::isInt64() const { |
| 3818 | #if defined(JSON_HAS_INT64) |
| 3819 | switch (type_) { |
| 3820 | case intValue: |
| 3821 | return true; |
| 3822 | case uintValue: |
| 3823 | return value_.uint_ <= UInt64(maxInt64); |
| 3824 | case realValue: |
| 3825 | // Note that maxInt64 (= 2^63 - 1) is not exactly representable as a |
| 3826 | // double, so double(maxInt64) will be rounded up to 2^63. Therefore we |
| 3827 | // require the value to be strictly less than the limit. |
| 3828 | return value_.real_ >= double(minInt64) && |
| 3829 | value_.real_ < double(maxInt64) && IsIntegral(value_.real_); |
| 3830 | default: |
| 3831 | break; |
| 3832 | } |
| 3833 | #endif // JSON_HAS_INT64 |
| 3834 | return false; |
| 3835 | } |
| 3836 | |
| 3837 | bool Value::isUInt64() const { |
| 3838 | #if defined(JSON_HAS_INT64) |
nothing calls this directly
no test coverage detected