| 230 | } |
| 231 | |
| 232 | std::optional<double> NonFiniteDoubleFromRawToken(sj::value& json_obj) { |
| 233 | std::string_view token = json_obj.raw_json_token(); |
| 234 | // The raw token includes any trailing whitespace up to the next token |
| 235 | while (!token.empty() && std::isspace(static_cast<unsigned char>(token.back()))) { |
| 236 | token.remove_suffix(1); |
| 237 | } |
| 238 | return NonFiniteDoubleFromString(token); |
| 239 | } |
| 240 | |
| 241 | // Convert float16/HalfFloatType |
| 242 | template <typename T> |
no test coverage detected