mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-11-07 04:36:52 -10:00
libc: Restrict the static_assert macro to pre-C23 modes
Signed-off-by: Faraz Vahedi <[email protected]> Reviewed by: fuz MFC after: 1 month Pull Request: https://github.com/freebsd/freebsd-src/pull/2203
This commit is contained in:
1 parent
64502126e1
commit
c5c7d18d01
1 file changed
+4
-1
+4
-1
@@ -72,8 +72,11 @@
|
||||
* C++ template parameters may contain commas, even if not enclosed in
|
||||
* parentheses, causing the _Static_assert macro to be invoked with more
|
||||
* than two parameters.
|
||||
*
|
||||
* C23 defines static_assert and its obsolescent alternative spelling,
|
||||
* _Static_assert, as keywords.
|
||||
*/
|
||||
#if __ISO_C_VISIBLE >= 2011 && !defined(__cplusplus)
|
||||
#if __ISO_C_VISIBLE >= 2011 && __ISO_C_VISIBLE < 2023 && !defined(__cplusplus)
|
||||
#define static_assert _Static_assert
|
||||
#endif
|
||||
|
||||
|
||||
Reference in new issue
Block a user