| 2686 | } |
| 2687 | |
| 2688 | bool Value::isInt64() const { |
| 2689 | #if defined(JSON_HAS_INT64) |
| 2690 | switch (type_) { |
| 2691 | case intValue: |
| 2692 | return true; |
| 2693 | case uintValue: |
| 2694 | return value_.uint_ <= UInt64(maxInt64); |
| 2695 | case realValue: |
| 2696 | // Note that maxInt64 (= 2^63 - 1) is not exactly representable as a |
| 2697 | // double, so double(maxInt64) will be rounded up to 2^63. Therefore we |
| 2698 | // require the value to be strictly less than the limit. |
| 2699 | return value_.real_ >= double(minInt64) && |
| 2700 | value_.real_ < double(maxInt64) && IsIntegral(value_.real_); |
| 2701 | default: |
| 2702 | break; |
| 2703 | } |
| 2704 | #endif // JSON_HAS_INT64 |
| 2705 | return false; |
| 2706 | } |
| 2707 | |
| 2708 | bool Value::isUInt64() const { |
| 2709 | #if defined(JSON_HAS_INT64) |
nothing calls this directly
no test coverage detected