aboutsummaryrefslogtreecommitdiff
path: root/src/core/result.h
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2026-08-27 14:17:34 +0200
committerhachem <im@hachem.wtf>2026-08-27 14:17:34 +0200
commit705e3914e4e820c3ac92892c32c93479691a09e7 (patch)
treebad8932559620328da060ea45245fcabec2332f2 /src/core/result.h
parent90398614bcc9e1c1bde7a0f65a0db66173a1d8b4 (diff)
add: debugger interface
Diffstat (limited to 'src/core/result.h')
-rw-r--r--src/core/result.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/core/result.h b/src/core/result.h
new file mode 100644
index 0000000..a516336
--- /dev/null
+++ b/src/core/result.h
@@ -0,0 +1,18 @@
+#pragma once
+
+#include <expected>
+#include <format>
+#include <string>
+#include <utility>
+
+namespace Hsdbg
+{
+ template <typename T>
+ using Result = std::expected<T, std::string>;
+
+ template <typename... Args>
+ auto fail(std::format_string<Args...> fmt, Args&&... args) -> std::unexpected<std::string>
+ {
+ return std::unexpected(std::format(fmt, std::forward<Args>(args)...));
+ }
+}