| 182 | }; |
| 183 | |
| 184 | struct LosslessConvertibleToIntVisitor { |
| 185 | constexpr bool operator()(double value) const { |
| 186 | return value >= kDoubleToIntMin && value <= kMaxDoubleRepresentableAsInt && |
| 187 | value == static_cast<double>(static_cast<int64_t>(value)); |
| 188 | } |
| 189 | constexpr bool operator()(uint64_t value) const { |
| 190 | return value <= kUintToIntMax; |
| 191 | } |
| 192 | constexpr bool operator()(int64_t value) const { return true; } |
| 193 | }; |
| 194 | |
| 195 | struct LosslessConvertibleToUintVisitor { |
| 196 | constexpr bool operator()(double value) const { |
no outgoing calls
no test coverage detected