summaryrefslogtreecommitdiffhomepage
path: root/compat
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2021-09-25 13:50:29 +0200
committerStanislaw Halik <sthalik@misaki.pl>2021-09-26 11:22:50 +0200
commitcec13a016bf2f6c686f01481bfdf5e7dac78d0bb (patch)
treecf28bba6b793cb0927ed138db5ded8fde7ccb342 /compat
parent98b80e9878283a073e3ebfd5577acb88efa7b04c (diff)
compat: add macro for deleting move/copy operators
Diffstat (limited to 'compat')
-rw-r--r--compat/macros1.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/compat/macros1.h b/compat/macros1.h
index 2ebfc4df..8c3916d0 100644
--- a/compat/macros1.h
+++ b/compat/macros1.h
@@ -39,4 +39,10 @@
# define eval_once2(expr, ctr) eval_once3(expr, ctr)
# define eval_once3(expr, ctr) ([&] { [[maybe_unused]] static const char init_ ## ctr = ((void)(expr), 0); }())
# define eval_once(expr) eval_once2(expr, __COUNTER__)
+
+#define OTR_DISABLE_MOVE_COPY(type) \
+ type(const type&) = delete; \
+ type(type&&) = delete; \
+ type& operator=(const type&) = delete; \
+ type& operator=(type&&) = delete
#endif