fmt: do not define uint type in global namespace
This commit is contained in:
parent
f1625751c4
commit
b051903c3d
|
@ -1354,8 +1354,8 @@ template <typename Float> constexpr int num_significand_bits() {
|
||||||
template <typename Float>
|
template <typename Float>
|
||||||
constexpr auto exponent_mask() ->
|
constexpr auto exponent_mask() ->
|
||||||
typename dragonbox::float_info<Float>::carrier_uint {
|
typename dragonbox::float_info<Float>::carrier_uint {
|
||||||
using uint = typename dragonbox::float_info<Float>::carrier_uint;
|
using fmt_uint = typename dragonbox::float_info<Float>::carrier_uint;
|
||||||
return ((uint(1) << dragonbox::float_info<Float>::exponent_bits) - 1)
|
return ((fmt_uint(1) << dragonbox::float_info<Float>::exponent_bits) - 1)
|
||||||
<< num_significand_bits<Float>();
|
<< num_significand_bits<Float>();
|
||||||
}
|
}
|
||||||
template <typename Float> constexpr auto exponent_bias() -> int {
|
template <typename Float> constexpr auto exponent_bias() -> int {
|
||||||
|
@ -3248,9 +3248,9 @@ FMT_CONSTEXPR20 auto write(OutputIt out, T value) -> OutputIt {
|
||||||
|
|
||||||
constexpr auto specs = basic_format_specs<Char>();
|
constexpr auto specs = basic_format_specs<Char>();
|
||||||
using floaty = conditional_t<std::is_same<T, long double>::value, double, T>;
|
using floaty = conditional_t<std::is_same<T, long double>::value, double, T>;
|
||||||
using uint = typename dragonbox::float_info<floaty>::carrier_uint;
|
using fmt_uint = typename dragonbox::float_info<floaty>::carrier_uint;
|
||||||
uint mask = exponent_mask<floaty>();
|
fmt_uint mask = exponent_mask<floaty>();
|
||||||
if ((bit_cast<uint>(value) & mask) == mask)
|
if ((bit_cast<fmt_uint>(value) & mask) == mask)
|
||||||
return write_nonfinite(out, std::isnan(value), specs, fspecs);
|
return write_nonfinite(out, std::isnan(value), specs, fspecs);
|
||||||
|
|
||||||
auto dec = dragonbox::to_decimal(static_cast<floaty>(value));
|
auto dec = dragonbox::to_decimal(static_cast<floaty>(value));
|
||||||
|
|
Loading…
Reference in New Issue