BAN: Errors now includes assert.h

This commit is contained in:
Bananymous 2023-06-03 18:53:05 +03:00
parent d201e65810
commit 1e075c248f
1 changed files with 1 additions and 0 deletions

View File

@ -13,6 +13,7 @@
#define MUST(expr) ({ auto&& e = expr; if (e.is_error()) Kernel::panic("{}", e.error()); e.release_value(); })
#define MUST_REF(expr) *({ auto&& e = expr; if (e.is_error()) Kernel::panic("{}", e.error()); &e.release_value(); })
#else
#include <assert.h>
#define MUST(expr) ({ auto&& e = expr; assert(!e.is_error()); e.release_value(); })
#define MUST_REF(expr) *({ auto&& e = expr; assert(!e.is_error()); &e.release_value(); })
#endif