diff options
Diffstat (limited to 'core/macros.hh')
| -rw-r--r-- | core/macros.hh | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/core/macros.hh b/core/macros.hh index 9042f49..9a76109 100644 --- a/core/macros.hh +++ b/core/macros.hh @@ -2,8 +2,18 @@ #define CORE_MACROS_HH 1 #pragma once -#define DECLARE_DEFAULT_CTOR(type) \ -public: \ - type(void) = default +#define DISABLE_COPY_OPERATORS(class_name) \ +public: \ + explicit class_name(const class_name& other) = delete; \ + class_name& operator=(const class_name& other) = delete + +#define DISABLE_MOVE_OPERATORS(class_name) \ +public: \ + explicit class_name(class_name&& other) = delete; \ + class_name& operator=(class_name&& other) = delete + +#define DECLARE_DEFAULT_CONSTRUCTOR(class_name) \ +public: \ + class_name(void) = default #endif /* CORE_MACROS_HH */ |
