[libcxx-commits] [PATCH] D120478: [libcxx] [test] Make filesystem tests not rely on libc++ internals

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Mar 1 12:30:27 PST 2022


ldionne requested changes to this revision.
ldionne added inline comments.
This revision now requires changes to proceed.
Herald added a project: All.


================
Comment at: libcxx/test/support/filesystem_test_helper.h:35
+#ifdef _WIN32
+// If built without -DNOMINMAX, Windows system headers can pollute the
+// namespace with min/max defines that break standard C++.
----------------
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.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120478/new/

https://reviews.llvm.org/D120478



More information about the libcxx-commits mailing list