summaryrefslogtreecommitdiff
path: root/deimos/core/gsl.h
diff options
context:
space:
mode:
authorSteven Le Rouzic <steven.lerouzic@gmail.com>2024-04-04 15:33:40 +0200
committerSteven Le Rouzic <steven.lerouzic@gmail.com>2024-04-04 15:33:40 +0200
commitf878f9e4c42f02585e57bb35c3aabf9f69ee3834 (patch)
treeddb7aaa64677615859ac389a6c3358f2c6a51fe1 /deimos/core/gsl.h
parentee4ce45b36061964eec1602c7bd3692fb9a40a2f (diff)
More work on Span, add Ensures and Expects
Diffstat (limited to 'deimos/core/gsl.h')
-rw-r--r--deimos/core/gsl.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/deimos/core/gsl.h b/deimos/core/gsl.h
index b6a9804..2000f6a 100644
--- a/deimos/core/gsl.h
+++ b/deimos/core/gsl.h
@@ -8,3 +8,5 @@ using czstring = const char*;
} // namespace gsl
+#define Expects(EXPR) do { if (!(EXPR)) { __builtin_trap(); } } while (0)
+#define Ensures(EXPR) do { if (!(EXPR)) { __builtin_trap(); } } while (0)