From cec13a016bf2f6c686f01481bfdf5e7dac78d0bb Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 25 Sep 2021 13:50:29 +0200 Subject: compat: add macro for deleting move/copy operators --- compat/macros1.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'compat') 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 -- cgit v1.2.3