diff --git a/luna/include/luna/Check.h b/luna/include/luna/Check.h index 897c4486..9fb7a495 100644 --- a/luna/include/luna/Check.h +++ b/luna/include/luna/Check.h @@ -7,6 +7,7 @@ #define STRINGIZE_VALUE_OF(x) STRINGIZE(x) #endif +// Like check(), but with a custom error message. #define expect(expr, message) \ do { \ if (!(expr)) [[unlikely]] \ @@ -15,6 +16,7 @@ } \ } while (0) +// Like assert(), but always enabled. #define check(expr) \ do { \ if (!(expr)) [[unlikely]] \