Go to the source code of this file.
◆ ABSTRACT_BASE_CLASS
#define ABSTRACT_BASE_CLASS |
( |
| cls | ) |
|
Value: cls() = default; \
cls(const cls &) = delete; \
cls &operator=(const cls &) = delete; \
cls(cls &&) = delete; \
cls &operator=(cls &&) = delete; \
virtual ~cls() = default; \
Macro to implement rule of 5 for an abstract base class.
Definition at line 20 of file construct.h.
20#define ABSTRACT_BASE_CLASS(cls) \
21 cls() = default; \
22 cls(const cls &) = delete; \
23 cls &operator=(const cls &) = delete; \
24 cls(cls &&) = delete; \
25 cls &operator=(cls &&) = delete; \
26 virtual ~cls() = default; \
27
◆ DEFAULT_COPYABLE
#define DEFAULT_COPYABLE |
( |
| cls | ) |
|
Value: cls(const cls &) = default; \
cls &operator=(const cls &) = default; \
cls(cls &&) = default; \
cls &operator=(cls &&) = default; \
virtual ~cls() = default;
Macro to help implementing the rule of 5 for a default copyable & movable class.
Definition at line 29 of file construct.h.
29#define DEFAULT_COPYABLE(cls) \
30 cls(const cls &) = default; \
31 cls &operator=(const cls &) = default; \
32 cls(cls &&) = default; \
33 cls &operator=(cls &&) = default; \
34 virtual ~cls() = default;
◆ DEFAULT_MOVABLE_IMPL
#define DEFAULT_MOVABLE_IMPL |
( |
| cls | ) |
|
Value: cls::cls(cls &&) = default; \
cls &cls::operator=(cls &&) = default; \
Definition at line 56 of file construct.h.
56#define DEFAULT_MOVABLE_IMPL(cls) \
57 cls::cls(cls &&) = default; \
58 cls &cls::operator=(cls &&) = default; \
59
◆ NON_COPYABLE
#define NON_COPYABLE |
( |
| cls | ) |
|
Value: cls(const cls &) = delete; \
cls &operator=(const cls &) = delete; \
cls(cls &&) = delete; \
cls &operator=(cls &&) = delete; \
Macro to help implementing the rule of 5 for a non-copyable & movable class.
Definition at line 37 of file construct.h.
37#define NON_COPYABLE(cls) \
38 cls(const cls &) = delete; \
39 cls &operator=(const cls &) = delete; \
40 cls(cls &&) = delete; \
41 cls &operator=(cls &&) = delete; \
42
◆ ONLY_DEFAULT_MOVABLE
#define ONLY_DEFAULT_MOVABLE |
( |
| cls | ) |
|
Value: cls(const cls &) = delete; \
cls &operator=(const cls &) = delete; \
cls(cls &&) = default; \
cls &operator=(cls &&) = default; \
Macro to help implementing the rule of 5 for a class that can be moved but not copied.
Definition at line 44 of file construct.h.
44#define ONLY_DEFAULT_MOVABLE(cls) \
45 cls(const cls &) = delete; \
46 cls &operator=(const cls &) = delete; \
47 cls(cls &&) = default; \
48 cls &operator=(cls &&) = default; \
49
◆ ONLY_MOVABLE_DECL
#define ONLY_MOVABLE_DECL |
( |
| cls | ) |
|
Value: cls(const cls &) = delete; \
cls &operator=(const cls &) = delete; \
cls(cls &&); \
cls &operator=(cls &&); \
Definition at line 50 of file construct.h.
50#define ONLY_MOVABLE_DECL(cls) \
51 cls(const cls &) = delete; \
52 cls &operator=(const cls &) = delete; \
53 cls(cls &&); \
54 cls &operator=(cls &&); \
55