summaryrefslogtreecommitdiffhomepage
path: root/compat/assert.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'compat/assert.hpp')
-rw-r--r--compat/assert.hpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/compat/assert.hpp b/compat/assert.hpp
index 860a9cde..04c5acbe 100644
--- a/compat/assert.hpp
+++ b/compat/assert.hpp
@@ -59,3 +59,19 @@ constexpr inline void abort(const char (&fmt)[N], Xs... xs) noexcept
#define ERR(...) ::floormat::detail::emit_debug("error: ", __VA_ARGS__)
#define MESSAGE(...) ::floormat::detail::emit_debug("", __VA_ARGS__)
#define DEBUG(...) ::floormat::detail::emit_debug("", __VA_ARGS__)
+
+namespace floormat {
+
+template<bool>
+struct static_warning_ final {
+ [[deprecated]] constexpr static_warning_() = default;
+};
+
+template<>
+struct static_warning_<true> final {
+ constexpr static_warning_() = default;
+};
+
+#define static_warning(...) do { (void)static_warning_<(__VA_ARGS__)>{}; } while(false)
+
+} // namespace floormat