diff --git a/conversion/stringconversion.cpp b/conversion/stringconversion.cpp index 3314b0d..18a7f01 100644 --- a/conversion/stringconversion.cpp +++ b/conversion/stringconversion.cpp @@ -20,6 +20,13 @@ #ifdef PLATFORM_WINDOWS #include +// note: The windows header seriously defines a macro called "max" breaking the (common) use +// of std::numeric_limits in the subsequent code. So we need to undefine this macro. Note that +// this is not the case using mingw-w64 but it is happening with windows.h from Windows Kits +// version 10.0.22000.0 via Visual Studio 2022. +#ifdef max +#undef max +#endif #endif using namespace std;