<div dir="rtl"><div dir="ltr">Hi Arthur,</div><div dir="ltr"><br></div><div dir="ltr">Won't #undef max after including any MySQL header work as well?</div><div dir="ltr"><br></div><div dir="ltr">Technically, the warning could be removed and max would be #undef quietly and the defined as you suggest, but this is a design change so I refer this to Howard.</div>

<div dir="ltr"><br></div><div dir="ltr">Yaron</div><div dir="ltr"><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div dir="ltr">2013/11/16 Arthur O'Dwyer <span dir="ltr"><<a href="mailto:arthur.j.odwyer@gmail.com" target="_blank">arthur.j.odwyer@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 Fri, Nov 15, 2013 at 3:41 PM, Yaron Keren <<a href="mailto:yaron.keren@gmail.com">yaron.keren@gmail.com</a>> wrote:<br>


><br>
> -_LIBCPP_WARNING("macro min is incompatible with C++.  #undefing min")<br>
> +_LIBCPP_WARNING("macro min is incompatible with C++.  Try #define NOMINMAX "<br>
> +                "before any Windows header. #undefing min")<br>
<br>
</div>Incidentally, this warning has annoyed me in the past when compiling<br>
MySQL 5.5 as C++. They have some code (in the name of portability, I'm<br>
sure) equivalent to<br>
<br>
    #ifndef max<br>
     #define min(a,b) (a < b ? a : b)<br>
     #define max(a,b) (a > b ? a : b)<br>
    #endif<br>
<br>
which I try to disable by putting<br>
<br>
    #define max max<br>
<br>
in another header. By #undef'ing max, libc++ interferes with this<br>
tactic — or rather, it's hard to tell for any given translation unit<br>
whether it interferes with it or not (depending on the order of<br>
#includes), which is even more distracting. I wonder whether it would<br>
be possible for the libc++ header to use<br>
<br>
    #undef max<br>
    #define max max<br>
<br>
instead of just "#undef max", or if the Standard prohibits that somehow.<br>
<br>
Not that I expect a change to happen, but I figured I should publicly<br>
register my particular use-case.<br>
<span class="HOEnZb"><font color="#888888"><br>
–Arthur<br>
</font></span></blockquote></div><br></div>