diff --git a/src/libs/vmisc/fpm/fixed.hpp b/src/libs/vmisc/fpm/fixed.hpp index 5471a0dc3..556456a40 100644 --- a/src/libs/vmisc/fpm/fixed.hpp +++ b/src/libs/vmisc/fpm/fixed.hpp @@ -435,7 +435,7 @@ struct numeric_limits> static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; - static constexpr bool has_denorm = std::denorm_absent; + static constexpr std::float_denorm_style has_denorm = std::denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr std::float_round_style round_style = std::round_to_nearest; static constexpr bool is_iec_559 = false; @@ -492,6 +492,56 @@ struct numeric_limits> } }; +// See https://stackoverflow.com/a/46719572/3045403 +#if __cplusplus < 201703L +template +constexpr bool numeric_limits>::is_specialized; // NOLINT(readability-redundant-declaration) +template +constexpr bool numeric_limits>::is_signed; // NOLINT(readability-redundant-declaration) +template +constexpr bool numeric_limits>::is_integer; // NOLINT(readability-redundant-declaration) +template +constexpr bool numeric_limits>::is_exact; // NOLINT(readability-redundant-declaration) +template +constexpr bool numeric_limits>::has_infinity; // NOLINT(readability-redundant-declaration) +template +constexpr bool numeric_limits>::has_quiet_NaN; // NOLINT(readability-redundant-declaration) +template +constexpr bool numeric_limits>::has_signaling_NaN; // NOLINT(readability-redundant-declaration) +template +constexpr std::float_denorm_style numeric_limits>::has_denorm; // NOLINT(readability-redundant-declaration) +template +constexpr bool numeric_limits>::has_denorm_loss; // NOLINT(readability-redundant-declaration) +template +constexpr std::float_round_style numeric_limits>::round_style; // NOLINT(readability-redundant-declaration) +template +constexpr bool numeric_limits>::is_iec_559; // NOLINT(readability-redundant-declaration) +template +constexpr bool numeric_limits>::is_bounded; // NOLINT(readability-redundant-declaration) +template +constexpr bool numeric_limits>::is_modulo; // NOLINT(readability-redundant-declaration) +template +constexpr int numeric_limits>::digits; // NOLINT(readability-redundant-declaration) +template +constexpr int numeric_limits>::digits10; // NOLINT(readability-redundant-declaration) +template +constexpr int numeric_limits>::max_digits10; // NOLINT(readability-redundant-declaration) +template +constexpr int numeric_limits>::radix; // NOLINT(readability-redundant-declaration) +template +constexpr int numeric_limits>::min_exponent; // NOLINT(readability-redundant-declaration) +template +constexpr int numeric_limits>::min_exponent10; // NOLINT(readability-redundant-declaration) +template +constexpr int numeric_limits>::max_exponent; // NOLINT(readability-redundant-declaration) +template +constexpr int numeric_limits>::max_exponent10; // NOLINT(readability-redundant-declaration) +template +constexpr bool numeric_limits>::traps; // NOLINT(readability-redundant-declaration) +template +constexpr bool numeric_limits>::tinyness_before; // NOLINT(readability-redundant-declaration) +#endif + } // namespace std #endif