diff options
Diffstat (limited to 'utility/special_members.hpp')
-rw-r--r-- | utility/special_members.hpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/utility/special_members.hpp b/utility/special_members.hpp new file mode 100644 index 0000000..f396813 --- /dev/null +++ b/utility/special_members.hpp @@ -0,0 +1,12 @@ +#ifndef SPECIAL_MEMBERS_H +#define SPECIAL_MEMBERS_H + +#define NO_COPY(TYPE) \ + TYPE(const TYPE &) = delete; \ + void operator=(const TYPE &) = delete + +#define NO_MOVE(TYPE) \ + TYPE(TYPE &&) = delete; \ + void operator=(TYPE &&) = delete + +#endif |