Improve the unwrap_does_not_incur_additional_copying unit test am: 664ffef7e0 Original change: https://android-review.googlesource.com/c/platform/system/libbase/+/2007950 Change-Id: I0afb9c067ddd681506fd23200d3581b79be6bf84
diff --git a/result_test.cpp b/result_test.cpp index 3b2b2e3..da8ab81 100644 --- a/result_test.cpp +++ b/result_test.cpp
@@ -424,9 +424,11 @@ const int data; static int copy_constructed; static int move_constructed; - MyData(int d) : data(d) {} + explicit MyData(int d) : data(d) {} MyData(const MyData& other) : data(other.data) { copy_constructed++; } MyData(MyData&& other) : data(other.data) { move_constructed++; } + MyData& operator=(const MyData&) = delete; + MyData& operator=(MyData&&) = delete; }; int MyData::copy_constructed = 0;