Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/result.h')
-rw-r--r--src/common/result.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common/result.h b/src/common/result.h
index 25129e875..77a9d121c 100644
--- a/src/common/result.h
+++ b/src/common/result.h
@@ -104,6 +104,7 @@ public:
ASSERT(!_isError);
return _result;
}
+
T operator*() &&
{
ASSERT(!_isError);
@@ -116,6 +117,12 @@ public:
return &_result;
}
+ const T &get() const
+ {
+ ASSERT(!_isError)
+ return _result;
+ }
+
const Error &error() const &
{
ASSERT(_isError);