1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

Fix r276671 to not use a defaulted move constructor.

MSVC won't provide the body of this move constructor and assignment
operator, possibly because the copy constructor is banned. Just write
it manually.

llvm-svn: 276685
This commit is contained in:
Jordan Rose 2016-07-25 20:34:25 +00:00
parent 4192bbafb1
commit 1ccdcb20d6

View File

@ -55,9 +55,17 @@ public:
// StringSwitch is not copyable.
StringSwitch(const StringSwitch &) = delete;
StringSwitch(StringSwitch &&) = default;
void operator=(const StringSwitch &) = delete;
StringSwitch &operator=(StringSwitch &&) = default;
StringSwitch(StringSwitch &&other) {
*this = std::move(other);
}
StringSwitch &operator=(StringSwitch &&other) {
Str = other.Str;
Result = other.Result;
return *this;
}
~StringSwitch() = default;
template<unsigned N>