diff options
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 |