summaryrefslogtreecommitdiff
path: root/lib/special_members.hpp
blob: 0d63f58591ad8ee83a56202eb428d5cad8ee71ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#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

#define DEFAULT_MOVE_COPY(TYPE) \
	TYPE(const TYPE &) = default; \
	TYPE(TYPE &&) = default; \
	TYPE & operator=(const TYPE &) = default; \
	TYPE & operator=(TYPE &&) = default

#endif