dolphin/Source/Core/Common/NonCopyable.h
JosJuice b0ee8bd0a0 NonCopyable: Allow moving
NonCopyable is only supposed to prevent classes from being copied,
not make it hard for classes to be moveable.
2017-08-01 20:50:11 +02:00

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