summaryrefslogtreecommitdiff
path: root/euler/include/cassert
diff options
context:
space:
mode:
Diffstat (limited to 'euler/include/cassert')
-rw-r--r--euler/include/cassert12
1 files changed, 12 insertions, 0 deletions
diff --git a/euler/include/cassert b/euler/include/cassert
new file mode 100644
index 0000000..415790d
--- /dev/null
+++ b/euler/include/cassert
@@ -0,0 +1,12 @@
+#pragma once
+
+namespace euler {
+
+ [[noreturn]] inline void assert_failed() {
+ //TODO: log error and abort
+ while (1) ;
+ }
+
+}
+
+#define assert(cond) ((cond) ? (void)0 : ::euler::assert_failed());