diff --git a/Include/auROXTL/AU_MACROS.hpp b/Include/auROXTL/AU_MACROS.hpp index 06b0a9a..bc69691 100644 --- a/Include/auROXTL/AU_MACROS.hpp +++ b/Include/auROXTL/AU_MACROS.hpp @@ -8,16 +8,20 @@ ***/ #pragma once -#define AU_DEF(type) inline type() = default; +#define AU_DEF(type) inline type() = default; -#define AU_COPY(type) inline type(const type&) = default; inline type &operator=(const type &) = default; -#define AU_MOVE(type) inline type(type&&) = default; inline type &operator=(type &&) = default; -#define AU_COPY_MOVE(type) AU_COPY(type) AU_MOVE(type) -#define AU_COPY_MOVE_DEF(type) AU_COPY(type) AU_MOVE(type) AU_DEF(type) +#define AU_COPY(type) inline type(const type&) = default; inline type &operator=(const type &) = default; +#define AU_MOVE(type) inline type(type&&) = default; inline type &operator=(type &&) = default; +#define AU_COPY_MOVE(type) AU_COPY(type) AU_MOVE(type) +#define AU_COPY_MOVE_DEF(type) AU_COPY(type) AU_MOVE(type) AU_DEF(type) -#define AU_NO_COPY(type) inline type(const type&) = delete; -#define AU_NO_MOVE(type) inline type(type&&) = delete; -#define AU_NO_COPY_NO_MOVE(type) AU_NO_COPY(type) AU_NO_MOVE(type) +#define AU_NO_COPY(type) inline type(const type&) = delete; +#define AU_NO_MOVE(type) inline type(type&&) = delete; +#define AU_NO_COPY_NO_MOVE(type) AU_NO_COPY(type) AU_NO_MOVE(type) + +#define AU_OPERATOR_COPY(type) inline type &operator =(const type ©) { AuResetMember(*this, copy); return *this; } +#define AU_OPERATOR_MOVE(type) inline type &operator =(type &&move) { AuResetMember(*this, AuMove(move)); return *this; } +#define AU_OPERATOR_COPY_MOVE(type) AU_OPERATOR_COPY(type) AU_OPERATOR_MOVE(type) #if !defined(AU_SHARED_FROM_THIS) #define AU_SHARED_FROM_THIS (AuStaticPointerCast>(this->SharedFromThis()))