| 3836 | } |
| 3837 | |
| 3838 | bool Value::isInt64() const { |
| 3839 | #if defined(JSON_HAS_INT64) |
| 3840 | switch (type_) { |
| 3841 | case intValue: |
| 3842 | return true; |
| 3843 | case uintValue: |
| 3844 | return value_.uint_ <= UInt64(maxInt64); |
| 3845 | case realValue: |
| 3846 | // Note that maxInt64 (= 2^63 - 1) is not exactly representable as a |
| 3847 | // double, so double(maxInt64) will be rounded up to 2^63. Therefore we |
| 3848 | // require the value to be strictly less than the limit. |
| 3849 | return value_.real_ >= double(minInt64) && |
| 3850 | value_.real_ < double(maxInt64) && IsIntegral(value_.real_); |
| 3851 | default: |
| 3852 | break; |
| 3853 | } |
| 3854 | #endif // JSON_HAS_INT64 |
| 3855 | return false; |
| 3856 | } |
| 3857 | |
| 3858 | bool Value::isUInt64() const { |
| 3859 | #if defined(JSON_HAS_INT64) |
nothing calls this directly
no test coverage detected