From 3865bac4695656f50bfc78c621117d2fe26b0b36 Mon Sep 17 00:00:00 2001 From: Herb Sutter Date: Tue, 30 Aug 2022 16:08:07 -0700 Subject: [PATCH] Made `noexcept`-consistent --- include/gsl/util | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/gsl/util b/include/gsl/util index 757be6a..9bfcfc1 100644 --- a/include/gsl/util +++ b/include/gsl/util @@ -53,11 +53,11 @@ class final_action { public: template - explicit final_action(FF&& ff) : f{std::forward(ff)} { } + explicit final_action(FF&& ff) noexcept : f{std::forward(ff)} { } - ~final_action() { if (invoke) f(); } + ~final_action() noexcept { if (invoke) f(); } - final_action(final_action&& other) + final_action(final_action&& other) noexcept : f(std::move(other.f)), invoke(std::exchange(other.invoke, false)) { }