I was under the impression Q_DISABLE_COPY_MOVE was a much older function than it is. Since we historically target 5.6 and these functions are small convenience functions, I just implemented them in the actual codebase.
21 lines
458 B
C
21 lines
458 B
C
#ifndef CONSTRUCTORS_H
|
|
#define CONSTRUCTORS_H
|
|
|
|
/**
|
|
* Copy/move deleters. Similar to Q_DISABLE_COPY_MOVE, et al. but those functions
|
|
*/
|
|
|
|
#define DISABLE_COPY(Class) \
|
|
Class(const Class &) = delete;\
|
|
Class &operator=(const Class &) = delete;
|
|
|
|
#define DISABLE_MOVE(Class) \
|
|
Class(Class &&) = delete; \
|
|
Class &operator=(Class &&) = delete;
|
|
|
|
#define DISABLE_COPY_MOVE(Class) \
|
|
DISABLE_COPY(Class) \
|
|
DISABLE_MOVE(Class)
|
|
|
|
#endif // CONSTRUCTORS_H
|