Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions include/stdx/static_assert.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#if __cplusplus >= 202002L

#include <stdx/compiler.hpp>
#include <stdx/ct_format.hpp>
#include <stdx/ct_string.hpp>

Expand Down Expand Up @@ -38,6 +39,11 @@ template <ct_string Fmt, auto... Args> constexpr auto static_format() {
} // namespace v1
} // namespace stdx

STDX_PRAGMA(diagnostic push)
#ifdef __clang__
STDX_PRAGMA(diagnostic ignored "-Wunknown-warning-option")
STDX_PRAGMA(diagnostic ignored "-Wc++26-extensions")
#endif
#if __cpp_static_assert >= 202306L
#define STATIC_ASSERT(cond, ...) \
[]<bool B>() -> bool { \
Expand All @@ -54,4 +60,6 @@ template <ct_string Fmt, auto... Args> constexpr auto static_format() {
}.template operator()<cond>()

#endif
STDX_PRAGMA(diagnostic pop)

#endif