<div dir="rtl"><div dir="ltr">Windows.h #defines <span style="font-family:arial,sans-serif;font-size:12.499999046325684px">NOMINMAX. </span></div><div dir="ltr">In the MingW 4.8.1 headers min and max may be defined in five header files:<br>

<br>stdlib.h, #if 0<br>ntdef.h, #ifndef NOMINMAX<br>minmax.h, #ifndef __cplusplus<br>minwindef.h, #ifndef __cplusplus<br>classpnp.h, not protected by any define!!<br><br>so NOMINMAX applies only to ntdef.h.</div><div dir="ltr">

Anyhow, to be on the safe side it may be defined project wide.<br><br>Yaron</div><div dir="ltr"><br>2013/10/2 G M <<a href="mailto:gmisocpp@gmail.com">gmisocpp@gmail.com</a>><br>><br>> Hi Yaron<br>>  <br>> Yes that's true. Windows.h isn't required any more for clang or visual studio builds either.<br>

>  <br>> I didn't remove it in my prior patch to support.h because I was trying to keep my changes minimal for the goal of that patch and remove windows.h in a follow up one as it makes a big difference to compile times, especially Visual Studio and curiously reduces the error count too.<br>

>  <br>> I think these lines are also related to windows.h<br>> //#ifndef NOMINMAX<br>> //#define NOMINMAX<br>> //#endif<br>> but min/max might get brought in by other Win32 headers, I'm not sure. It's arguable that this macro should be defined in __config in the Win32 section so it becomes project wide. libcxx goes to some lengths to avoid other min/max issues in (some) other headers in using __undef_min_max.<br>

>  <br></div></div>