diff options
author | Nick Brassel <[email protected]> | 2025-05-26 21:41:49 +1000 |
---|---|---|
committer | Nick Brassel <[email protected]> | 2025-05-26 21:41:49 +1000 |
commit | 75a037d2f0f9c54bad8e2f68ae82134559c92f22 (patch) | |
tree | 2b264de0e7a724c30cca511a9bac7ad29705d1a2 /quantum/compiler_support.h | |
parent | 28720c4d343a9c5e9f5a62dbd583dbf536a2e61e (diff) | |
parent | 3703699757b6ce938ff412aca0a8b064927c0cdb (diff) | |
download | qmk_firmware-75a037d2f0f9c54bad8e2f68ae82134559c92f22.tar.gz qmk_firmware-75a037d2f0f9c54bad8e2f68ae82134559c92f22.zip |
Merge remote-tracking branch 'upstream/develop'0.29.0
Diffstat (limited to 'quantum/compiler_support.h')
-rw-r--r-- | quantum/compiler_support.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/quantum/compiler_support.h b/quantum/compiler_support.h new file mode 100644 index 0000000000..5c0c4d2835 --- /dev/null +++ b/quantum/compiler_support.h @@ -0,0 +1,15 @@ +// Copyright 2025 QMK Contributors +// SPDX-License-Identifier: GPL-2.0-or-later + +/** + * @brief Perfom an assertion at compile time. + * + * `_Static_assert` is C<23, while `static_assert` is C++/C23. + */ +#if !defined(STATIC_ASSERT) +# ifdef __cplusplus +# define STATIC_ASSERT static_assert +# else +# define STATIC_ASSERT _Static_assert +# endif +#endif |