Common: Alter semantics of the NonCopyable mixin

Uses delete to make the unimplemented functions detectable at compile time
and not link time if they are used.

The move constructor and assignment operator are removed as moves are not
copies, but transfers of ownership, which isn't suited for this class.
This commit is contained in:
Lioncash 2015-09-06 13:45:05 -04:00
parent c08a83a5aa
commit 53465e329a

View File

@ -60,12 +60,12 @@ extern const char *netplay_dolphin_ver;
class NonCopyable
{
protected:
NonCopyable() {}
NonCopyable(const NonCopyable&&) {}
void operator=(const NonCopyable&&) {}
constexpr NonCopyable() = default;
~NonCopyable() = default;
private:
NonCopyable(NonCopyable&);
NonCopyable& operator=(NonCopyable& other);
NonCopyable(NonCopyable&) = delete;
NonCopyable& operator=(NonCopyable&) = delete;
};
#if defined _WIN32