From c9fef8d83fe48f233372b890fcfd184ef68a9b69 Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Thu, 2 Jan 2025 18:19:38 +0100 Subject: Add assertion failure handler --- asl/meta.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'asl/meta.hpp') 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 struct id { using type = T; }; -- cgit