mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-19 10:35:28 +02:00

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;
|
|
};
|