From aa03952cb2a889f8d81a70ed4bd0b4ae69e5ab8d Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 22 Oct 2022 16:02:38 +0200 Subject: add macros --- compat/defs.hpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/compat/defs.hpp b/compat/defs.hpp index 1bd0f181..de922df2 100644 --- a/compat/defs.hpp +++ b/compat/defs.hpp @@ -16,6 +16,10 @@ constexpr type(const type&) noexcept = default; \ constexpr type& operator=(const type&) noexcept = default +#define fm_DECLARE_DEFAULT_COPY_ASSIGNMENT_(type) \ + type(const type&) noexcept = default; \ + type& operator=(const type&) noexcept = default + #define fm_DECLARE_DELETED_COPY_ASSIGNMENT(type) \ type(const type&) = delete; \ type& operator=(const type&) = delete @@ -28,6 +32,14 @@ constexpr type(type&&) noexcept = default; \ constexpr type& operator=(type&&) noexcept = default +#define fm_DECLARE_DEFAULT_MOVE_ASSIGNMENT_(type) \ + type(type&&) noexcept = default; \ + type& operator=(type&&) noexcept = default + #define fm_DECLARE_DEFAULT_MOVE_COPY_ASSIGNMENTS(type) \ - fm_DECLARE_DEFAULT_MOVE_ASSIGNMENT(type); \ + fm_DECLARE_DEFAULT_MOVE_ASSIGNMENT(type); \ fm_DECLARE_DEFAULT_COPY_ASSIGNMENT(type) + +#define fm_DECLARE_DEFAULT_MOVE_COPY_ASSIGNMENTS_(type) \ + fm_DECLARE_DEFAULT_MOVE_ASSIGNMENT_(type); \ + fm_DECLARE_DEFAULT_COPY_ASSIGNMENT_(type) -- cgit v1.2.3