From 3fb66ae739ad92e12dfc16bae5c47047960b0aed 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208388 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/ADT/StringMapTest.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/unittests/ADT/StringMapTest.cpp b/unittests/ADT/StringMapTest.cpp index b90c77b1c15..de18e07f386 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) { -- 2.34.1