[llvm] r208388 - Remove use of = default/= delete as they're unsupported on MSVC2012
David Blaikie
dblaikie at gmail.com
Thu May 8 19:26:37 PDT 2014
Author: dblaikie
Date: Thu May 8 21:26:36 2014
New Revision: 208388
URL: http://llvm.org/viewvc/llvm-project?rev=208388&view=rev
Log:
Remove use of = default/= delete as they're unsupported on MSVC2012
Modified:
llvm/trunk/unittests/ADT/StringMapTest.cpp
Modified: llvm/trunk/unittests/ADT/StringMapTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/StringMapTest.cpp?rev=208388&r1=208387&r2=208388&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/StringMapTest.cpp (original)
+++ llvm/trunk/unittests/ADT/StringMapTest.cpp Thu May 8 21:26:36 2014
@@ -221,10 +221,15 @@ TEST_F(StringMapTest, NonDefaultConstruc
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) {
More information about the llvm-commits
mailing list