summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--unittests/ADT/StringMapTest.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/unittests/ADT/StringMapTest.cpp b/unittests/ADT/StringMapTest.cpp
index b90c77b1c1..de18e07f38 100644
--- a/unittests/ADT/StringMapTest.cpp
+++ b/unittests/ADT/StringMapTest.cpp
@@ -221,10 +221,15 @@ TEST_F(StringMapTest, NonDefaultConstructable) {
struct MoveOnly {
int i;
MoveOnly(int i) : i(i) {}
- MoveOnly(MoveOnly &&) = default;
- MoveOnly(const MoveOnly &) = delete;
- MoveOnly &operator=(MoveOnly &&) = default;
- MoveOnly &operator=(const MoveOnly &) = delete;
+ MoveOnly(MoveOnly &&RHS) : i(RHS.i) {}
+ MoveOnly &operator=(MoveOnly &&RHS) {
+ i = RHS.i;
+ return *this;
+ }
+
+private:
+ MoveOnly(const MoveOnly &);
+ MoveOnly &operator=(const MoveOnly &);
};
TEST_F(StringMapTest, MoveOnlyKey) {