aboutsummaryrefslogtreecommitdiff
path: root/quantum/compiler_support.h
blob: 5c0c4d2835301fcd9b154636d5f8e5d7aa23afdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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