<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
> I would really like to merge this patch. Are there any reasons not to do so?<br>
<br>
</div>Wouldn't adding -Dstatic_assert=_Static_assert to CPPFLAGS be enough<br>
until Apple fixes assert.h ?</blockquote></div><br>I've done some research recently, and would like to share results with you.</div><div class="gmail_extra"><br></div><div class="gmail_extra">1) As you know, VLC partially written in C and C++. We have two recent standards for both languages: C11 and C++11.</div>
<div class="gmail_extra">C++11 defines static_assert as **keyword**, and it is implementation-defined, therefore compiler should support it.</div><div class="gmail_extra">Recent versions of clang++ supports it with -std=c++11 flag. No include requires.</div>
<div class="gmail_extra">C11 defines static_assert as macro in assert.h. _Static_assert is **implementation-defined** and should be supported by compiler.</div><div class="gmail_extra">Recent versions of clang supports _Static_assert. No include requires.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">2) Apple ships standard libraries for both languages with XCode distribution, but they are rather inconsistent.</div><div class="gmail_extra">Standard C++ library defines static_assert in case compiler doesn't support it (e.g. trying to compile without -std=c++11 flag).</div>
<div class="gmail_extra">Standard C library lacks of definition for static_assert in <assert.h>.</div><div class="gmail_extra"><div><br></div>-- <br>
Maxim Bublis
</div></div>