From c1917c6f776061513bac0e4672f38bf1b3d7841e Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sun, 7 Mar 2021 09:54:55 +0100 Subject: [PATCH] Adds misc macro NO_COPY_OR_MOVE, which allows you to delete copy and move constructors and assignment operators. --- src/Misc.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/Misc.hpp diff --git a/src/Misc.hpp b/src/Misc.hpp new file mode 100644 index 0000000..3d9b6e3 --- /dev/null +++ b/src/Misc.hpp @@ -0,0 +1,10 @@ +#ifndef ARBUTILS_MISC_HPP +#define ARBUTILS_MISC_HPP + +#define NO_COPY_OR_MOVE(type)\ + type(const type&) = delete;\ + type(type&&) = delete;\ + type& operator=(const type&) = delete;\ + type& operator=(type&&) = delete;\ + +#endif // ARBUTILS_MISC_HPP