summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-08-09 22:42:19 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-08-09 22:42:19 +0000
commitc6dbc22b9b4e3352bfefc2b774aea6b50ff439d8 (patch)
tree52fd73e2e3f6d526586b858324099f0977dd9aca
parentf63d5fa236b4d49dabaed7f237c1ec91cd36e203 (diff)
downloadbcm5719-llvm-c6dbc22b9b4e3352bfefc2b774aea6b50ff439d8.tar.gz
bcm5719-llvm-c6dbc22b9b4e3352bfefc2b774aea6b50ff439d8.zip
Revert "Add some extra checks to the MoveOnly test class to ensure it is not constructed or assigned from in a moved-from state."
Premature commit due to misreading CR feedback. This reverts commit r215301. llvm-svn: 215302
-rw-r--r--libcxx/test/containers/MoveOnly.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/libcxx/test/containers/MoveOnly.h b/libcxx/test/containers/MoveOnly.h
index 96eef95913c..e4d9f649560 100644
--- a/libcxx/test/containers/MoveOnly.h
+++ b/libcxx/test/containers/MoveOnly.h
@@ -22,17 +22,11 @@ class MoveOnly
int data_;
public:
- MoveOnly(int data = 0) : data_(data) { assert(data != -1); }
- MoveOnly(MoveOnly &&x) : data_(x.data_) {
- assert(x.data_ != -1);
- x.data_ = -1;
- }
- MoveOnly &operator=(MoveOnly &&x) {
- assert(x.data_ != -1);
- data_ = x.data_;
- x.data_ = -1;
- return *this;
- }
+ MoveOnly(int data = 1) : data_(data) {}
+ MoveOnly(MoveOnly&& x)
+ : data_(x.data_) {x.data_ = 0;}
+ MoveOnly& operator=(MoveOnly&& x)
+ {data_ = x.data_; x.data_ = 0; return *this;}
int get() const {return data_;}
OpenPOWER on IntegriCloud