summaryrefslogtreecommitdiff
path: root/asl/base/assert.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'asl/base/assert.hpp')
-rw-r--r--asl/base/assert.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/asl/base/assert.hpp b/asl/base/assert.hpp
index 42e8635..d23e897 100644
--- a/asl/base/assert.hpp
+++ b/asl/base/assert.hpp
@@ -6,6 +6,10 @@
namespace asl
{
+using AssertFailureHandler = void (const char* msg, const source_location&, void* user);
+
+void set_assert_failure_handler(AssertFailureHandler handler, void* user);
+
void report_assert_failure(const char* msg, const source_location& sl = source_location{});
} // namespace asl
@@ -16,6 +20,8 @@ void report_assert_failure(const char* msg, const source_location& sl = source_l
#define ASL_DEBUG_BREAK() __builtin_debugtrap()
#endif
+// @Todo Configure asserts at build time
+
#define ASL_ASSERT(...) \
if (__VA_ARGS__) {} \
else \