mirror of https://github.com/libsdl-org/SDL.git
stdinc: c23 deprecated _Static_assert in favor of static_assert
(cherry picked from commit 22bfbdbc02)
This commit is contained in:
parent
6e931bee01
commit
5d606eaae2
|
|
@ -388,10 +388,8 @@ typedef uint64_t Uint64;
|
||||||
#endif /* SDL_DISABLE_ANALYZE_MACROS */
|
#endif /* SDL_DISABLE_ANALYZE_MACROS */
|
||||||
|
|
||||||
#ifndef SDL_COMPILE_TIME_ASSERT
|
#ifndef SDL_COMPILE_TIME_ASSERT
|
||||||
#if defined(__cplusplus)
|
#if (defined(__cplusplus) && __cplusplus >= 201103L) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L)
|
||||||
#if (__cplusplus >= 201103L)
|
|
||||||
#define SDL_COMPILE_TIME_ASSERT(name, x) static_assert(x, #x)
|
#define SDL_COMPILE_TIME_ASSERT(name, x) static_assert(x, #x)
|
||||||
#endif
|
|
||||||
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
|
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
|
||||||
#define SDL_COMPILE_TIME_ASSERT(name, x) _Static_assert(x, #x)
|
#define SDL_COMPILE_TIME_ASSERT(name, x) _Static_assert(x, #x)
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue