mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 13:57:57 -07:00
b0ee8bd0a0
NonCopyable is only supposed to prevent classes from being copied, not make it hard for classes to be moveable.
20 lines
498 B
C++
20 lines
498 B
C++
// Copyright 2015 Dolphin Emulator Project
|
|
// Licensed under GPLv2+
|
|
// Refer to the license.txt file included.
|
|
|
|
#pragma once
|
|
|
|
// An inheritable class to disallow the copy constructor and operator= functions
|
|
class NonCopyable
|
|
{
|
|
protected:
|
|
constexpr NonCopyable() = default;
|
|
~NonCopyable() = default;
|
|
|
|
NonCopyable(const NonCopyable&) = delete;
|
|
NonCopyable& operator=(const NonCopyable&) = delete;
|
|
|
|
NonCopyable(NonCopyable&&) = default;
|
|
NonCopyable& operator=(NonCopyable&&) = default;
|
|
};
|