From b1143255469c992a6d8475a070af951b7d09c51d Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 14 Jul 2024 13:03:55 +0200 Subject: compat/function2: add missing noexcept to move ctor --- compat/function2.hpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/compat/function2.hpp b/compat/function2.hpp index 54f00111..9e6b9b50 100644 --- a/compat/function2.hpp +++ b/compat/function2.hpp @@ -388,9 +388,9 @@ struct box : private Allocator { : Allocator(std::move(allocator_)), value_(std::move(value)) { } - box(box&&) = default; + box(box&&) noexcept = default; box(box const&) = default; - box& operator=(box&&) = default; + box& operator=(box&&) noexcept = default; box& operator=(box const&) = default; ~box() = default; }; @@ -404,9 +404,9 @@ struct box : private Allocator { : Allocator(std::move(allocator_)), value_(std::move(value)) { } - box(box&&) = default; + box(box&&) noexcept = default; box(box const&) = delete; - box& operator=(box&&) = default; + box& operator=(box&&) noexcept = default; box& operator=(box const&) = delete; ~box() = default; }; @@ -775,8 +775,8 @@ class operator_impl; ~operator_impl() = default; \ operator_impl(operator_impl const&) = default; \ operator_impl(operator_impl&&) = default; \ - operator_impl& operator=(operator_impl const&) = default; \ - operator_impl& operator=(operator_impl&&) = default; \ + operator_impl& operator=(operator_impl const&) noexcept = default; \ + operator_impl& operator=(operator_impl&&) noexcept = default; \ \ using operator_impl::operator(); \ \ @@ -805,8 +805,8 @@ class operator_impl; ~operator_impl() = default; \ operator_impl(operator_impl const&) = default; \ operator_impl(operator_impl&&) = default; \ - operator_impl& operator=(operator_impl const&) = default; \ - operator_impl& operator=(operator_impl&&) = default; \ + operator_impl& operator=(operator_impl const&) noexcept = default; \ + operator_impl& operator=(operator_impl&&) noexcept = default; \ \ Ret operator()(Args... args) CONST VOLATILE OVL_REF NOEXCEPT { \ auto parent = \ @@ -1605,8 +1605,8 @@ public: FU2_DETAIL_CXX14_CONSTEXPR function(std::nullptr_t np) : erasure_(np) { } - constexpr function& operator=(function const& /*right*/) = default; - constexpr function& operator=(function&& /*right*/) = default; + constexpr function& operator=(function const& /*right*/) noexcept = default; + constexpr function& operator=(function&& /*right*/) noexcept = default; /// Copy assigning from another copyable function template * = nullptr, enable_if_owning_correct_t* = nullptr> - constexpr function& operator=(function&& right) { + constexpr function& operator=(function&& right) noexcept { erasure_ = std::move(right.erasure_); return *this; } -- cgit v1.2.3