<div dir="rtl"><div dir="ltr">It may be ok for the library (I did not check yet if ntdef.h or minwindef.h are not included indirectly somehow) but will pose a possible problem for the libcxx user: </div><div dir="ltr">if he includes libcxx header followed by <windows.h> without <span style="font-size:12.800000190734863px;font-family:arial,sans-serif">NOMINMAX</span> defined he would get min and max defined and trouble.<br>
</div><div dir="ltr"><br></div><div dir="ltr">So to be on the safe side, we would like to get <span style="font-size:12.800000190734863px;font-family:arial,sans-serif">NOMINMAX</span> always defined.</div><div dir="ltr">
<br>
</div><div dir="ltr">What do you think about moving the code to __config:</div><div dir="ltr"><br></div><div dir="ltr">#ifdef _WIN32</div><div dir="ltr"><div dir="ltr">#ifndef NOMINMAX</div><div dir="ltr">#define NOMINMAX</div>
<div dir="ltr">#endif</div><div>#endif</div><div><br></div><div>It will work if the library user includes libcxx before window.h.</div><div><br></div><div>In the reverse case we can't avoid getting min and max defined but __undef_min_max will warn and undef them.</div>
<div><br></div><div>Yaron</div><div><br></div><div><br></div></div><div dir="ltr"><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div dir="ltr">2013/11/16 Marshall Clow <span dir="ltr"><<a href="mailto:mclow.lists@gmail.com" target="_blank">mclow.lists@gmail.com</a>></span></div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Nov 15, 2013, at 2:54 PM, Yaron Keren <<a href="mailto:yaron.keren@gmail.com">yaron.keren@gmail.com</a>> wrote:<br>
<br>
> Author: yrnkrn<br>
> Date: Fri Nov 15 16:54:15 2013<br>
> New Revision: 194870<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=194870&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=194870&view=rev</a><br>
> Log:<br>
> Windows.h is not required.<br>
><br>
> Modified:<br>
> libcxx/trunk/include/support/win32/support.h<br>
><br>
> Modified: libcxx/trunk/include/support/win32/support.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/support/win32/support.h?rev=194870&r1=194869&r2=194870&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/support/win32/support.h?rev=194870&r1=194869&r2=194870&view=diff</a><br>
> ==============================================================================<br>
> --- libcxx/trunk/include/support/win32/support.h (original)<br>
> +++ libcxx/trunk/include/support/win32/support.h Fri Nov 15 16:54:15 2013<br>
> @@ -23,7 +23,6 @@<br>
> #ifndef NOMINMAX<br>
> #define NOMINMAX<br>
> #endif<br>
> -#include <Windows.h><br>
><br>
> extern "C" {<br>
<br>
</div>If <windows.h> is not required, is the whole "#ifndef NOMINMAX" stuff not required either?<br>
<br>
<br>
-- Marshall<br>
<br>
Marshall Clow Idio Software <mailto:<a href="mailto:mclow.lists@gmail.com">mclow.lists@gmail.com</a>><br>
<br>
A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).<br>
-- Yu Suzuki<br>
<br>
</blockquote></div><br></div>