diff --git a/include/fmt/format.h b/include/fmt/format.h index 14cce727..c505520b 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -2809,11 +2809,7 @@ void internal::basic_writer::write_fp(T value, int precision = specs.precision >= 0 || !specs.type ? specs.precision : 6; unsigned options = 0; if (handler.fixed) options |= grisu_options::fixed; -#ifdef __cpp_if_constexpr - if constexpr (sizeof(value) == sizeof(float)) options |= grisu_options::binary32; -#else - if (sizeof(value) == sizeof(float)) options |= grisu_options::binary32; -#endif + if (const_check(sizeof(value) == sizeof(float))) options |= grisu_options::binary32; bool use_grisu = USE_GRISU && (specs.type != 'a' && specs.type != 'A' && specs.type != 'e' &&