| 3694 | |
| 3695 | template <typename T> |
| 3696 | typename std::enable_if<ext_traits::is_signed_integer<T>::value && sizeof(T) <= sizeof(int64_t),bool>::type |
| 3697 | is_integer() const noexcept |
| 3698 | { |
| 3699 | switch (storage_kind()) |
| 3700 | { |
| 3701 | case json_storage_kind::int64: |
| 3702 | return (as_integer<int64_t>() >= (ext_traits::integer_limits<T>::lowest)()) && (as_integer<int64_t>() <= (ext_traits::integer_limits<T>::max)()); |
| 3703 | case json_storage_kind::uint64: |
| 3704 | return as_integer<uint64_t>() <= static_cast<uint64_t>((ext_traits::integer_limits<T>::max)()); |
| 3705 | case json_storage_kind::const_json_ref: |
| 3706 | return cast<const_json_ref_storage>().value().template is_integer<T>(); |
| 3707 | case json_storage_kind::json_ref: |
| 3708 | return cast<json_ref_storage>().value().template is_integer<T>(); |
| 3709 | default: |
| 3710 | return false; |
| 3711 | } |
| 3712 | } |
| 3713 | |
| 3714 | template <typename T> |
| 3715 | typename std::enable_if<ext_traits::is_signed_integer<T>::value && sizeof(int64_t) < sizeof(T),bool>::type |
nothing calls this directly
no test coverage detected