Repository: mesos Updated Branches: refs/heads/master 041fa2e2e -> bf7162205
Added move constructor/assignment operator to `Result`. Added move constructor/assignment operator to \`Result\`. Note that `Some` still makes a copy and would be fixed in a separate patch. Review: https://reviews.apache.org/r/47986/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/a6b3d1ad Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/a6b3d1ad Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/a6b3d1ad Branch: refs/heads/master Commit: a6b3d1ad6f4e1b83b48ac58ba247a422fac32101 Parents: 041fa2e Author: Anand Mazumdar <mazumdar.an...@gmail.com> Authored: Tue May 31 13:28:43 2016 -0600 Committer: Vinod Kone <vinodk...@gmail.com> Committed: Tue May 31 13:28:43 2016 -0600 ---------------------------------------------------------------------- 3rdparty/stout/include/stout/result.hpp | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/a6b3d1ad/3rdparty/stout/include/stout/result.hpp ---------------------------------------------------------------------- diff --git a/3rdparty/stout/include/stout/result.hpp b/3rdparty/stout/include/stout/result.hpp index 5d93ee0..d99ca39 100644 --- a/3rdparty/stout/include/stout/result.hpp +++ b/3rdparty/stout/include/stout/result.hpp @@ -58,6 +58,9 @@ public: Result(const T& _t) : data(Some(_t)) {} + Result(T&& _t) + : data(Some(std::move(_t))) {} + template <typename U> Result(const U& u) : data(Some(u)) {} @@ -95,6 +98,7 @@ public: Result(const Result<T>& that) = default; ~Result() = default; Result<T>& operator=(const Result<T>& that) = default; + Result<T>& operator=(Result<T>&& that) = default; // 'isSome', 'isNone', and 'isError' are mutually exclusive. They // correspond to the underlying unioned state of the Option and Try.