summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-05-09 02:26:36 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-05-09 02:26:36 +0000
commit3fb66ae739ad92e12dfc16bae5c47047960b0aed (patch)
treee8833d97d1271076f933c01663b19a8152af5559 /unittests
parent74d614a6fc97587c2092807edf5382163d6d1dc6 (diff)
downloadllvm-3fb66ae739ad92e12dfc16bae5c47047960b0aed.tar.gz
llvm-3fb66ae739ad92e12dfc16bae5c47047960b0aed.tar.bz2
llvm-3fb66ae739ad92e12dfc16bae5c47047960b0aed.tar.xz
Remove use of = default/= delete as they're unsupported on MSVC2012
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208388 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-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) {