From f06c0132a361a754fbe593f9e54c2201bce116b3 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 28 Oct 2022 03:12:55 +0200 Subject: add maybe_unused to copy/move ctor macros --- compat/defs.hpp | 60 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/compat/defs.hpp b/compat/defs.hpp index e4b92260..e3fcd8ef 100644 --- a/compat/defs.hpp +++ b/compat/defs.hpp @@ -8,42 +8,42 @@ #define fm_begin(...) [&]{__VA_ARGS__}() -#define fm_DECLARE_DEPRECATED_COPY_ASSIGNMENT(type) \ - [[deprecated]] type(const type&) noexcept = default; \ - [[deprecated]] type& operator=(const type&) noexcept = default +#define fm_DECLARE_DEPRECATED_COPY_ASSIGNMENT(type) \ + {{maybe_unused]] [[deprecated]] type(const type&) noexcept = default; \ + {{maybe_unused]] [[deprecated]] type& operator=(const type&) noexcept = default -#define fm_DECLARE_DEFAULT_COPY_ASSIGNMENT(type) \ - constexpr type(const type&) noexcept = default; \ - constexpr type& operator=(const type&) noexcept = default +#define fm_DECLARE_DEFAULT_COPY_ASSIGNMENT(type) \ + {{maybe_unused]] constexpr type(const type&) noexcept = default; \ + {{maybe_unused]] 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_DEFAULT_COPY_ASSIGNMENT_(type) \ + {{maybe_unused]] type(const type&) noexcept = default; \ + {{maybe_unused]] type& operator=(const type&) noexcept = default -#define fm_DECLARE_DELETED_COPY_ASSIGNMENT(type) \ - type(const type&) = delete; \ - type& operator=(const type&) = delete +#define fm_DECLARE_DELETED_COPY_ASSIGNMENT(type) \ + {{maybe_unused]] type(const type&) = delete; \ + {{maybe_unused]] type& operator=(const type&) = delete -#define fm_DECLARE_DELETED_MOVE_ASSIGNMENT(type) \ - type(type&&) = delete; \ - type& operator=(type&&) = delete +#define fm_DECLARE_DELETED_MOVE_ASSIGNMENT(type) \ + {{maybe_unused]] type(type&&) = delete; \ + {{maybe_unused]] type& operator=(type&&) = delete -#define fm_DECLARE_DEPRECATED_MOVE_ASSIGNMENT(type) \ - [[deprecated]] type(type&&) = default; \ - [[deprecated]] type& operator=(type&&) = default +#define fm_DECLARE_DEPRECATED_MOVE_ASSIGNMENT(type) \ + {{maybe_unused]] [[deprecated]] type(type&&) = default; \ + {{maybe_unused]] [[deprecated]] type& operator=(type&&) = default -#define fm_DECLARE_DEFAULT_MOVE_ASSIGNMENT(type) \ - constexpr type(type&&) noexcept = default; \ - constexpr type& operator=(type&&) noexcept = default +#define fm_DECLARE_DEFAULT_MOVE_ASSIGNMENT(type) \ + {{maybe_unused]] constexpr type(type&&) noexcept = default; \ + {{maybe_unused]] 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_ASSIGNMENT_(type) \ + [[maybe_unused]] type(type&&) noexcept = default; \ + [[maybe_unused]] type& operator=(type&&) noexcept = default -#define fm_DECLARE_DEFAULT_MOVE_COPY_ASSIGNMENTS(type) \ - fm_DECLARE_DEFAULT_MOVE_ASSIGNMENT(type); \ - fm_DECLARE_DEFAULT_COPY_ASSIGNMENT(type) +#define fm_DECLARE_DEFAULT_MOVE_COPY_ASSIGNMENTS(type) \ + {{maybe_unused]] fm_DECLARE_DEFAULT_MOVE_ASSIGNMENT(type); \ + {{maybe_unused]] 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) +#define fm_DECLARE_DEFAULT_MOVE_COPY_ASSIGNMENTS_(type) \ + {{maybe_unused]] fm_DECLARE_DEFAULT_MOVE_ASSIGNMENT_(type); \ + {{maybe_unused]] fm_DECLARE_DEFAULT_COPY_ASSIGNMENT_(type) -- cgit v1.2.3