Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
options/internal: fix static asserts for pre-C++04
This commit correctly checks whether the C++ standard is new enough, and if so, uses the standard-defined `static_assert`. In the case of C, gcc and clang implement `_Static_assert` as an extension irrespective of the chosen C standard. Otherwise, we fall back to not checking the condition. We need to do the `extern int` hack in order to not produce errors in pedantic mode, as a single semicolon or `(void)0` at file scope give warnings or errors then.
- Loading branch information