Fixes for MSVC

This commit is contained in:
2025-07-02 14:19:05 -07:00
parent 9010650ceb
commit 9ea63478e5
22 changed files with 468 additions and 285 deletions

View File

@@ -19,6 +19,7 @@
#ifndef FENNEC_METAPROGRAMMING_FLOAT_H
#define FENNEC_METAPROGRAMMING_FLOAT_H
#include <bit>
#include <iosfwd>
inline void float_h()
@@ -67,7 +68,35 @@ inline void float_h()
out << "" << std::endl;
// TODO: Fix this to generate info without using the c++stdlib for platforms without this available.
// MAYBE TODO: Generate info without C++ STDLIB to compile natively on platforms without support
out << "#undef FLT_HAS_INFINITY" << std::endl;
out << "#undef FLT_HAS_QUIET_NAN" << std::endl;
out << "#undef FLT_HAS_SIGNALING_NAN" << std::endl;
out << "#undef FLT_HAS_DENORM" << std::endl;
out << "#undef FLT_HAS_DENORM_LOSS" << std::endl;
out << "#undef FLT_ROUNDS" << std::endl;
out << "#undef FLT_IS_IEC559" << std::endl;
out << "#undef FLT_MANT_DIG" << std::endl;
out << "#undef FLT_DIG" << std::endl;
out << "#undef FLT_DECIMAL_DIG" << std::endl;
out << "#undef FLT_RADIX" << std::endl;
out << "#undef FLT_MIN_EXP" << std::endl;
out << "#undef FLT_MAX_EXP" << std::endl;
out << "#undef FLT_MIN_10_EXP" << std::endl;
out << "#undef FLT_MAX_10_EXP" << std::endl;
out << "#undef FLT_TRAPS" << std::endl;
out << "#undef FLT_TINYNESS_BEFORE" << std::endl;
out << "#undef FLT_MIN" << std::endl;
out << "#undef FLT_MAX" << std::endl;
out << "#undef FLT_EPSILON" << std::endl;
out << "#undef FLT_INF" << std::endl;
out << "#undef FLT_QUIET_NAN" << std::endl;
out << "#undef FLT_SIGNALING_NAN" << std::endl;
out << "#undef FLT_DENORM_MIN" << std::endl;
out << "#undef FLT_ROUND_ERR" << std::endl;
out << "" << std::endl;
out << "#define FLT_HAS_INFINITY " << std::dec << std::numeric_limits<float>::has_infinity << std::endl;
out << "#define FLT_HAS_QUIET_NAN " << std::dec << std::numeric_limits<float>::has_quiet_NaN << std::endl;
@@ -98,6 +127,34 @@ inline void float_h()
out << "" << std::endl;
out << "#undef DBL_HAS_INFINITY" << std::endl;
out << "#undef DBL_HAS_QUIET_NAN" << std::endl;
out << "#undef DBL_HAS_SIGNALING_NAN" << std::endl;
out << "#undef DBL_HAS_DENORM" << std::endl;
out << "#undef DBL_HAS_DENORM_LOSS" << std::endl;
out << "#undef DBL_ROUNDS" << std::endl;
out << "#undef DBL_IS_IEC559" << std::endl;
out << "#undef DBL_MANT_DIG" << std::endl;
out << "#undef DBL_DIG" << std::endl;
out << "#undef DBL_DECIMAL_DIG" << std::endl;
out << "#undef DBL_RADIX" << std::endl;
out << "#undef DBL_MIN_EXP" << std::endl;
out << "#undef DBL_MAX_EXP" << std::endl;
out << "#undef DBL_MIN_10_EXP" << std::endl;
out << "#undef DBL_MAX_10_EXP" << std::endl;
out << "#undef DBL_TRAPS" << std::endl;
out << "#undef DBL_TINYNESS_BEFORE" << std::endl;
out << "#undef DBL_MIN" << std::endl;
out << "#undef DBL_MAX" << std::endl;
out << "#undef DBL_EPSILON" << std::endl;
out << "#undef DBL_INF" << std::endl;
out << "#undef DBL_QUIET_NAN" << std::endl;
out << "#undef DBL_SIGNALING_NAN" << std::endl;
out << "#undef DBL_DENORM_MIN" << std::endl;
out << "#undef DBL_ROUND_ERR" << std::endl;
out << "" << std::endl;
out << "#define DBL_HAS_INFINITY " << std::dec << std::numeric_limits<double>::has_infinity << std::endl;
out << "#define DBL_HAS_QUIET_NAN " << std::dec << std::numeric_limits<double>::has_quiet_NaN << std::endl;
out << "#define DBL_HAS_SIGNALING_NAN " << std::dec << std::numeric_limits<double>::has_signaling_NaN << std::endl;