From 057e745ebe91a393f8c8ccc11cc9e39216edeb1a Mon Sep 17 00:00:00 2001 From: eelke Date: Tue, 26 Dec 2017 07:34:08 +0100 Subject: [PATCH] Just some comments. --- core/Expected.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/Expected.h b/core/Expected.h index 8d78941..a5f054b 100644 --- a/core/Expected.h +++ b/core/Expected.h @@ -16,16 +16,18 @@ class Expected { public: + /** Constructor that receives a valid result value */ Expected(const T& rhs) : m_value(rhs), m_valid(true) {} + /** Move constructor for a valid result value */ Expected(T&& rhs) : m_value(std::move(rhs)) , m_valid(true) {} - + /** Copy constructor */ Expected(const Expected& rhs) : m_valid(rhs.m_valid) { @@ -37,6 +39,7 @@ public: } } + /** Move constructor */ Expected(Expected &&rhs) : m_valid(rhs.m_valid) { @@ -48,6 +51,7 @@ public: } } + /** destructor */ ~Expected() { if (m_valid) {