From 3b5fab8849f9a7cd3fa6469d3bec04b78784b3ff Mon Sep 17 00:00:00 2001 From: untodesu Date: Sun, 29 Jun 2025 12:04:58 +0500 Subject: Update core/macros.hh --- core/macros.hh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'core/macros.hh') 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 */ -- cgit