summaryrefslogtreecommitdiff
path: root/asl/assert.hpp
diff options
context:
space:
mode:
authorSteven Le Rouzic <steven.lerouzic@gmail.com>2025-02-17 00:21:48 +0100
committerSteven Le Rouzic <steven.lerouzic@gmail.com>2025-02-17 22:29:50 +0100
commita141c401f78467bc15f62882fca5d55a007cacbb (patch)
tree908ac71a8640f78f45d22c6808c5fa6e373000fa /asl/assert.hpp
parentcb77cbe9ce4cddad6a460aa190ff70f0c13e4703 (diff)
Reorganize everything
Diffstat (limited to 'asl/assert.hpp')
-rw-r--r--asl/assert.hpp33
1 files changed, 0 insertions, 33 deletions
diff --git a/asl/assert.hpp b/asl/assert.hpp
deleted file mode 100644
index 608a44f..0000000
--- a/asl/assert.hpp
+++ /dev/null
@@ -1,33 +0,0 @@
-#pragma once
-
-#include "asl/config.hpp"
-#include "asl/meta.hpp"
-
-namespace asl
-{
-
-void report_assert_failure(const char* msg, const source_location& sl = source_location{});
-
-} // namespace asl
-
-#if ASL_COMPILER_CLANG_CL
- #define ASL_DEBUG_BREAK() __debugbreak()
-#elif ASL_COMPILER_CLANG
- #define ASL_DEBUG_BREAK() __builtin_debugtrap()
-#endif
-
-#define ASL_ASSERT(...) \
- if (__VA_ARGS__) {} \
- else \
- { \
- ::asl::report_assert_failure(#__VA_ARGS__); \
- ASL_DEBUG_BREAK(); \
- }
-
-#define ASL_ASSERT_RELEASE(...) \
- if (__VA_ARGS__) {} \
- else \
- { \
- ::asl::report_assert_failure(#__VA_ARGS__); \
- ASL_DEBUG_BREAK(); \
- }