# compilation fix after merge from upstream.

This commit is contained in:
IRainman 2025-09-18 22:41:24 +03:00
parent 329282003d
commit 097800a609

View File

@ -254,10 +254,10 @@ clinger_fast_path_impl(uint64_t const mantissa, int64_t const exponent,
return true; return true;
} }
#endif #endif
value = T(pns.mantissa) * value = T(mantissa) *
binary_format<T>::exact_power_of_ten(pns.exponent); binary_format<T>::exact_power_of_ten(exponent);
#ifndef FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN #ifndef FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN
if (pns.negative) { if (is_negative) {
value = -value; value = -value;
} }
#endif #endif
@ -276,7 +276,7 @@ clinger_fast_path_impl(uint64_t const mantissa, int64_t const exponent,
*/ */
template <typename T, typename UC> template <typename T, typename UC>
FASTFLOAT_CONSTEXPR20 from_chars_result_t<UC> FASTFLOAT_CONSTEXPR20 from_chars_result_t<UC>
from_chars_advanced(parsed_number_string_t<UC> &pns, T &value) noexcept { from_chars_advanced(parsed_number_string_t<UC> const &pns, T &value) noexcept {
static_assert(is_supported_float_type<T>::value, static_assert(is_supported_float_type<T>::value,
"only some floating-point types are supported"); "only some floating-point types are supported");
static_assert(is_supported_char_type<UC>::value, static_assert(is_supported_char_type<UC>::value,
@ -287,8 +287,7 @@ from_chars_advanced(parsed_number_string_t<UC> &pns, T &value) noexcept {
answer.ec = std::errc(); // be optimistic answer.ec = std::errc(); // be optimistic
answer.ptr = pns.lastmatch; answer.ptr = pns.lastmatch;
if (!pns.too_many_digits && if (!pns.too_many_digits && clinger_fast_path_impl(pns.mantissa, pns.exponent,
clinger_fast_path_impl(pns.mantissa, pns.exponent,
#ifndef FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN #ifndef FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN
pns.negative, pns.negative,
#endif #endif
@ -387,7 +386,8 @@ from_chars(UC const *first, UC const *last, T &value, int const base) noexcept {
} }
FASTFLOAT_CONSTEXPR20 inline double FASTFLOAT_CONSTEXPR20 inline double
integer_times_pow10(uint64_t const mantissa, int const decimal_exponent) noexcept { integer_times_pow10(uint64_t const mantissa,
int const decimal_exponent) noexcept {
double value; double value;
if (clinger_fast_path_impl(mantissa, decimal_exponent, if (clinger_fast_path_impl(mantissa, decimal_exponent,
#ifndef FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN #ifndef FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN
@ -407,7 +407,8 @@ integer_times_pow10(uint64_t const mantissa, int const decimal_exponent) noexcep
} }
FASTFLOAT_CONSTEXPR20 inline double FASTFLOAT_CONSTEXPR20 inline double
integer_times_pow10(int64_t const mantissa, int const decimal_exponent) noexcept { integer_times_pow10(int64_t const mantissa,
int const decimal_exponent) noexcept {
#ifdef FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN #ifdef FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN
FASTFLOAT_ASSUME(mantissa > 0); FASTFLOAT_ASSUME(mantissa > 0);
const uint64_t m = static_cast<uint64_t>(mantissa); const uint64_t m = static_cast<uint64_t>(mantissa);