15444 {
15445#ifdef __GNUC__
15446#pragma GCC diagnostic push
15447#pragma GCC diagnostic ignored "-Wfloat-equal"
15448#endif
15449
15450 if (static_cast<double>(n) >= static_cast<double>(std::numeric_limits<float>::lowest()) &&
15451 static_cast<double>(n) <= static_cast<double>((std::numeric_limits<float>::max)()) &&
15452 static_cast<double>(static_cast<float>(n)) == static_cast<double>(n))
15453 {
15454 oa->write_character(format == detail::input_format_t::cbor
15455 ? get_cbor_float_prefix(static_cast<float>(n))
15456 : get_msgpack_float_prefix(static_cast<float>(n)));
15457 write_number(static_cast<float>(n));
15458 }
15459
15460 else
15461 {
15462 oa->write_character(format == detail::input_format_t::cbor
15463 ? get_cbor_float_prefix(n)
15464 : get_msgpack_float_prefix(n));
15465 write_number(n);
15466 }
15467
15468#ifdef __GNUC__
15469#pragma GCC diagnostic pop
15470#endif
15471 }
output_adapter_t< CharType > oa
the output