qmk_firmware

QMK firmware for my keyboards (Corne, Sweep Ferris) and trackball (Ploopy Adept)
Log | Files | Refs | Submodules | LICENSE

compiler_support.h (370B)


      1 // Copyright 2025 QMK Contributors
      2 // SPDX-License-Identifier: GPL-2.0-or-later
      3 
      4 /**
      5  * @brief Perfom an assertion at compile time.
      6  *
      7  * `_Static_assert` is C<23, while `static_assert` is C++/C23.
      8  */
      9 #if !defined(STATIC_ASSERT)
     10 #    ifdef __cplusplus
     11 #        define STATIC_ASSERT static_assert
     12 #    else
     13 #        define STATIC_ASSERT _Static_assert
     14 #    endif
     15 #endif