[PATCH] D33741: [libc++] Undef min/max in test_macros.h

Casey Carter via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 31 16:19:00 PDT 2017


CaseyCarter added a comment.

In https://reviews.llvm.org/D33741#769381, @EricWF wrote:

> In https://reviews.llvm.org/D33741#769371, @STL_MSFT wrote:
>
> > I haven't seen min/max test failures, probably because our CRT/STL headers never drag in Windows.h.
>
>
> Ah, that makes sense. Libc++ currently does although the plan is to fix that eventually. :-S


Are you aware that Windows.h won't define `min` and `max` if you define `NOMINMAX` before including it? You could solve the problem by adding `-DNOMINMAX` to your test compile parameters.


https://reviews.llvm.org/D33741





More information about the cfe-commits mailing list