From 1742f6e0f0af6aa6deefe2cee4bc41877f4ac2ad Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sat, 7 Jul 2018 10:30:21 +0900 Subject: util.h: DISABLE_MOVE macro --- lib/util.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/util.h') diff --git a/lib/util.h b/lib/util.h index 28315429..78d90626 100644 --- a/lib/util.h +++ b/lib/util.h @@ -35,6 +35,11 @@ #define FALLTHROUGH // -fallthrough #endif +// Along the lines of Q_DISABLE_COPY +#define DISABLE_MOVE(_ClassName) \ + _ClassName(_ClassName&&) Q_DECL_EQ_DELETE; \ + _ClassName& operator=(_ClassName&&) Q_DECL_EQ_DELETE; + namespace QMatrixClient { // The below enables pretty-printing of enums in logs -- cgit v1.2.3