From c6c224a78715d5e2c532fe318325fbca8e70e701 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 9 Dec 2022 20:00:08 +0300 Subject: Add noexcept to move constructors and move assignment operators --- libbutl/move-only-function.hxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libbutl/move-only-function.hxx') diff --git a/libbutl/move-only-function.hxx b/libbutl/move-only-function.hxx index 846ef25..e5cfe51 100644 --- a/libbutl/move-only-function.hxx +++ b/libbutl/move-only-function.hxx @@ -124,7 +124,10 @@ namespace butl return f (std::forward (args)...); } - wrapper (wrapper&& w): f (std::move (w.f)) {} + wrapper (wrapper&& w) + noexcept (std::is_nothrow_move_constructible::value) + : f (std::move (w.f)) {} + wrapper& operator= (wrapper&&) = delete; // Shouldn't be needed. ~wrapper () {f.~F ();} -- cgit v1.1