diff options
author | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2025-01-02 18:19:38 +0100 |
---|---|---|
committer | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2025-01-02 18:19:38 +0100 |
commit | c9fef8d83fe48f233372b890fcfd184ef68a9b69 (patch) | |
tree | 0c1825a180288c38a11ba4e644bd1a6b3151f906 /asl/meta.hpp | |
parent | 7e66d8e7e50060553be837b021aef1d83d0252bd (diff) |
Add assertion failure handler
Diffstat (limited to 'asl/meta.hpp')
-rw-r--r-- | asl/meta.hpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/asl/meta.hpp b/asl/meta.hpp index 133d2fb..f69a4a3 100644 --- a/asl/meta.hpp +++ b/asl/meta.hpp @@ -4,6 +4,19 @@ namespace asl {
+struct source_location
+{
+ const char* file;
+ int line;
+
+ explicit source_location(
+ const char* file = __builtin_FILE(),
+ int line = __builtin_LINE())
+ : file{file}
+ , line{line}
+ {}
+};
+
struct empty {};
template<typename T> struct id { using type = T; };
|