[vlc-devel] [PATCH] Added check for _Static_assert and C++11 static_assert.

Maxim Bublis b at codemonkey.ru
Mon Dec 9 14:18:10 CET 2013


>
> I've done some research recently, and would like to share results with you.
>

So, in my opinion following behavior should be implemented:

A. Building C code:
[+] Compiler doesn't have _Static_assert -> define _Static_assert
[+] Standard C library doesn't define static_assert -> define static_assert

B. Building C++ code:
[+] Compiler doesn't have _Static_assert -> define _Static_assert
[-] Compiler doesn't support static_assert keyword AND ([+] Standard C++
library doesn't define static_assert) -> define static_assert

[+] and [-] shows implementation state of this behavior in my patch.

So, here is the question: should we try to build VLC with -std=c++11 (or
-std=c++0x in case of GCC 4.6 and earlier)?
If it is not desired, patch already fixes all possible cases.
If it is desired I will add check for compiler -std=c++11 flag support, and
check for static_assert support with this flag enabled.


-- 
Maxim Bublis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20131209/faea82f7/attachment.html>


More information about the vlc-devel mailing list