Merge "make Return<T> non-copyable."
diff --git a/base/include/hidl/Status.h b/base/include/hidl/Status.h
index f3afbc6..2f26ffa 100644
--- a/base/include/hidl/Status.h
+++ b/base/include/hidl/Status.h
@@ -152,7 +152,8 @@
return_status() {}
return_status(Status s) : mStatus(s) {}
- return_status(const return_status &) = default;
+ return_status(const return_status &) = delete;
+ return_status &operator=(const return_status &) = delete;
return_status(return_status &&other) {
*this = std::move(other);
@@ -186,8 +187,6 @@
Return(T v) : details::return_status(), mVal{v} {}
Return(Status s) : details::return_status(s) {}
- Return(const Return &) = default;
-
// move-able.
// precondition: "this" has checked status
// postcondition: other is safe to destroy after moving to *this.
@@ -214,8 +213,6 @@
template<typename U> Return(U* v) : details::return_status(), mVal{v} {}
Return(Status s) : details::return_status(s) {}
- Return(const Return &) = default;
-
// move-able.
// precondition: "this" has checked status
// postcondition: other is safe to destroy after moving to *this.
@@ -236,8 +233,6 @@
Return() : details::return_status() {}
Return(Status s) : details::return_status(s) {}
- Return(const Return &) = default;
-
// move-able.
// precondition: "this" has checked status
// postcondition: other is safe to destroy after moving to *this.