mirror of
https://github.com/fastfloat/fast_float.git
synced 2026-02-09 11:16:45 +08:00
isolate clang crutch.
This commit is contained in:
parent
4a0bd5e9ea
commit
4ca0df87e8
@ -1154,9 +1154,12 @@ inline constexpr am_mant_t
|
|||||||
binary_format<double>::max_mantissa_fast_path(am_pow_t power) {
|
binary_format<double>::max_mantissa_fast_path(am_pow_t power) {
|
||||||
// caller is responsible to ensure that
|
// caller is responsible to ensure that
|
||||||
FASTFLOAT_ASSUME(power >= 0 && power <= 22);
|
FASTFLOAT_ASSUME(power >= 0 && power <= 22);
|
||||||
//
|
#if defined(__clang__)
|
||||||
// Work around clang and gcc bug https://godbolt.org/z/zedh7rrhc
|
// Work around clang bug https://godbolt.org/z/zedh7rrhc
|
||||||
return (void)max_mantissa[0], max_mantissa[power];
|
return (void)max_mantissa[0], max_mantissa[power];
|
||||||
|
#else
|
||||||
|
return max_mantissa[power];
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
@ -1164,9 +1167,12 @@ inline constexpr am_mant_t
|
|||||||
binary_format<float>::max_mantissa_fast_path(am_pow_t power) {
|
binary_format<float>::max_mantissa_fast_path(am_pow_t power) {
|
||||||
// caller is responsible to ensure that
|
// caller is responsible to ensure that
|
||||||
FASTFLOAT_ASSUME(power >= 0 && power <= 10);
|
FASTFLOAT_ASSUME(power >= 0 && power <= 10);
|
||||||
//
|
#if defined(__clang__)
|
||||||
// Work around clang and gcc bug https://godbolt.org/z/zedh7rrhc
|
// Work around clang bug https://godbolt.org/z/zedh7rrhc
|
||||||
return (void)max_mantissa[0], max_mantissa[power];
|
return (void)max_mantissa[0], max_mantissa[power];
|
||||||
|
#else
|
||||||
|
return max_mantissa[power];
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
@ -1174,9 +1180,12 @@ inline constexpr double
|
|||||||
binary_format<double>::exact_power_of_ten(am_pow_t power) {
|
binary_format<double>::exact_power_of_ten(am_pow_t power) {
|
||||||
// caller is responsible to ensure that
|
// caller is responsible to ensure that
|
||||||
FASTFLOAT_ASSUME(power >= 0 && power <= 22);
|
FASTFLOAT_ASSUME(power >= 0 && power <= 22);
|
||||||
//
|
#if defined(__clang__)
|
||||||
// Work around clang and gcc bug https://godbolt.org/z/zedh7rrhc
|
// Work around clang bug https://godbolt.org/z/zedh7rrhc
|
||||||
return (void)powers_of_ten[0], powers_of_ten[power];
|
return (void)powers_of_ten[0], powers_of_ten[power];
|
||||||
|
#else
|
||||||
|
return powers_of_ten[power];
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
@ -1184,9 +1193,12 @@ inline constexpr float
|
|||||||
binary_format<float>::exact_power_of_ten(am_pow_t power) {
|
binary_format<float>::exact_power_of_ten(am_pow_t power) {
|
||||||
// caller is responsible to ensure that
|
// caller is responsible to ensure that
|
||||||
FASTFLOAT_ASSUME(power >= 0 && power <= 10);
|
FASTFLOAT_ASSUME(power >= 0 && power <= 10);
|
||||||
//
|
#if defined(__clang__)
|
||||||
// Work around clang and gcc bug https://godbolt.org/z/zedh7rrhc
|
// Work around clang bug https://godbolt.org/z/zedh7rrhc
|
||||||
return (void)powers_of_ten[0], powers_of_ten[power];
|
return (void)powers_of_ten[0], powers_of_ten[power];
|
||||||
|
#else
|
||||||
|
return powers_of_ten[power];
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user