summaryrefslogtreecommitdiff
path: root/euler/include/cassert
diff options
context:
space:
mode:
authorBenji Dial <benji@benjidial.net>2024-07-29 19:59:52 -0400
committerBenji Dial <benji@benjidial.net>2024-07-29 19:59:52 -0400
commite6c3a80b01ffb52079783cddd9be6d392d0f7039 (patch)
tree148276b9878f287bc81638f90249ec4d7b86eaf0 /euler/include/cassert
parentbe691582ee12613278af24cb5a824eeb357f6324 (diff)
downloadhilbert-os-e6c3a80b01ffb52079783cddd9be6d392d0f7039.tar.gz
redesign compositor protocol, start widget library
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());