From 194c7d9f9463aa75e465e8fe638fc830b26a06c2 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Fri, 9 May 2014 02:26:36 +0000 Subject: [PATCH] Remove use of = default/= delete as they're unsupported on MSVC2012 llvm-svn: 208388 --- llvm/unittests/ADT/StringMapTest.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/llvm/unittests/ADT/StringMapTest.cpp b/llvm/unittests/ADT/StringMapTest.cpp index b90c77b1c158..de18e07f3861 100644 --- a/llvm/unittests/ADT/StringMapTest.cpp +++ b/llvm/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) {