mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
MdePkg/Base.h: Only use C++ static_assert when supported
To support GoogleTest, 933b4c3 added support for C++ static_assert. However, this is not a mandatory or universally supported C++ feature. Guard its usage by the __cpp_static_assert support flag. Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
This commit is contained in:
parent
f1cd030972
commit
70dd7f8309
@ -800,7 +800,7 @@ typedef UINTN *BASE_LIST;
|
||||
@param Message Raised compiler diagnostic message when expression is false.
|
||||
|
||||
**/
|
||||
#if defined (__cplusplus)
|
||||
#if defined (__cpp_static_assert)
|
||||
#define STATIC_ASSERT static_assert
|
||||
#elif defined (__GNUC__) || defined (__clang__)
|
||||
#define STATIC_ASSERT _Static_assert
|
||||
|
Loading…
x
Reference in New Issue
Block a user