Remove use of = default/= delete as they're unsupported on MSVC2012
authorDavid Blaikie <dblaikie@gmail.com>
Fri, 9 May 2014 02:26:36 +0000 (02:26 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Fri, 9 May 2014 02:26:36 +0000 (02:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208388 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/ADT/StringMapTest.cpp

index b90c77b1c15899e6c13b6f7f5e9e71dbdea2bf46..de18e07f386172d757ef0bdd81fc9a73731aae67 100644 (file)
@@ -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) {