From c123db97b7115e88512b94fa78beda430a75d797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E5=AD=90=E6=A5=9A=5Czhuzi?= Date: Sat, 30 Dec 2023 20:34:14 +0800 Subject: [PATCH] update --- src/singleton.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/singleton.h b/src/singleton.h index ef685f96..f6f25892 100644 --- a/src/singleton.h +++ b/src/singleton.h @@ -44,4 +44,10 @@ private: \ return Singleton::getInstance(); \ } +#define HIDE_CONSTRUCTOR(Class) \ +private: \ + Class() = default; \ + Class(const Class& other) = delete; \ + Class& operator=(const Class& other) = delete; + #endif // SINGLETON_H