mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-25 23:41:19 +01:00
2ce6b449d1
This isn't necessary, as the member functions are deleted. If someone tries to perform a copy, the compiler will now indicate that the member functions/constructors are deleted, rather than inaccessible.
17 lines
402 B
C++
17 lines
402 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;
|
|
};
|