summaryrefslogtreecommitdiff
path: root/src/support/result.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/support/result.h')
-rw-r--r--src/support/result.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/support/result.h b/src/support/result.h
index ab71d3a53..7cd360d53 100644
--- a/src/support/result.h
+++ b/src/support/result.h
@@ -40,7 +40,7 @@ struct Err {
}
// Represent a result of type T or an error message.
-template<typename T = Ok> struct Result {
+template<typename T = Ok> struct [[nodiscard]] Result {
std::variant<T, Err> val;
Result(Result<T>& other) = default;
@@ -56,7 +56,7 @@ template<typename T = Ok> struct Result {
};
// Represent an optional result of type T or an error message.
-template<typename T = Ok> struct MaybeResult {
+template<typename T = Ok> struct [[nodiscard]] MaybeResult {
std::variant<T, None, Err> val;
MaybeResult() : val(None{}) {}