summaryrefslogtreecommitdiff
path: root/deimos/core/base.h
diff options
context:
space:
mode:
authorSteven Le Rouzic <steven.lerouzic@gmail.com>2024-03-25 19:32:02 +0100
committerSteven Le Rouzic <steven.lerouzic@gmail.com>2024-03-25 19:32:02 +0100
commit5606b4c399404c0b8f745c6702d70f26eff8b371 (patch)
treeaeafe10a9697196b101a457654319b73fb1c89a0 /deimos/core/base.h
parent00c0d78199fcfbbb20828be5e06fd2d271fa4c1e (diff)
Update to Clang 18, C++23, rework allocator
Diffstat (limited to 'deimos/core/base.h')
-rw-r--r--deimos/core/base.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/deimos/core/base.h b/deimos/core/base.h
index 0530db7..ea14610 100644
--- a/deimos/core/base.h
+++ b/deimos/core/base.h
@@ -48,6 +48,19 @@ struct uint128
uint64 low;
};
+struct SourceLocation
+{
+ const char* file;
+ int32 line;
+
+ constexpr SourceLocation( // NOLINT
+ const char* file_ = __builtin_FILE(),
+ int32 line_ = __builtin_LINE()) :
+ file{file_},
+ line{line_}
+ {}
+};
+
template<typename T> struct RemoveReferenceT { using Type = T; };
template<typename T> struct RemoveReferenceT<T&> { using Type = T; };
template<typename T> struct RemoveReferenceT<T&&> { using Type = T; };