diff options
Diffstat (limited to 'src/common/common_types.h')
-rw-r--r-- | src/common/common_types.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/common/common_types.h b/src/common/common_types.h index 1b453e7f5..5c004c5fa 100644 --- a/src/common/common_types.h +++ b/src/common/common_types.h @@ -73,6 +73,16 @@ union t64 { u8 _u8[8]; ///< 8-bit unsigned char(s) }; +// An inheritable class to disallow the copy constructor and operator= functions +class NonCopyable { +protected: + NonCopyable() = default; + ~NonCopyable() = default; + + NonCopyable(NonCopyable&) = delete; + NonCopyable& operator=(NonCopyable&) = delete; +}; + namespace Common { /// Rectangle data structure class Rect { |