Files
oak-editor/app/common/constructors.h
T
itsmattkc d5b1768d70 reimplement Q_DISABLE_COPY_MOVE for full compatibility with versions < 5.13
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.
2019-11-24 14:57:57 +09:00

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