mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 03:18:13 +00:00
stdinc: c23 deprecated _Static_assert in favor of static_assert
This commit is contained in:

committed by
Ozkan Sezer

parent
4830fc4e40
commit
22bfbdbc02
@@ -461,10 +461,8 @@ typedef Sint64 SDL_Time;
|
|||||||
#endif /* SDL_DISABLE_ANALYZE_MACROS */
|
#endif /* SDL_DISABLE_ANALYZE_MACROS */
|
||||||
|
|
||||||
#ifndef SDL_COMPILE_TIME_ASSERT
|
#ifndef SDL_COMPILE_TIME_ASSERT
|
||||||
#ifdef __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
|
||||||
|
Reference in New Issue
Block a user