From c91ccadee5bfbc94a95540e17c879ce976caf6a2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Tue, 26 Mar 2024 16:33:35 -0400 Subject: [PATCH] scope-exit: Clarify scope_exit noexcept requirement MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau Change-Id: Iec34c435327e63e046319fa12f78a74ec50f4163 --- src/common/scope-exit.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/scope-exit.hpp b/src/common/scope-exit.hpp index 20d9b892d..3f8c90f80 100644 --- a/src/common/scope-exit.hpp +++ b/src/common/scope-exit.hpp @@ -33,7 +33,8 @@ class scope_exit { public: /* * Since ScopeExitInvocableType will be invoked in the destructor, it - * must be `noexcept` lest we anger the undefined behaviour gods. + * must be `noexcept` lest we anger the undefined behaviour gods by throwing + * an exception while an exception is active. */ static_assert(details::is_invocation_noexcept::value, "scope_exit requires a noexcept invocable type"); -- 2.34.1