As part of https://reviews.llvm.org/D119036
(506cf6dc048835c598b654e43ed8f723a42e39ba), -DNOMINMAX was
dropped from the Windows CI configurations, replaced with a
block with _LIBCPP_PUSH_MACROS, #include <__undef_macros>
and _LIBCPP_POP_MACROS (and
ADDITIONAL_COMPILE_FLAGS: -DNOMINMAX left in two tests).
However, this workaround breaks the running the libc++ tests
against a different C++ standard library than libc++, as those
macros and that header are libc++ internals.
This works around it by simply doing #undef min and #undef max
(when on Windows), making the tests work on other C++ standard
libraries again.
Instead, could we guard against those macros by doing something like (std::numeric_limits<large_file_offset_t>::max)()?
Otherwise, we could also add -DNOMINMAX in the testing config when we're on Windows. I'm not a huge fan of undef'ing those macros here in this file, it seems kind of ad-hoc.