From: Jérémie Galarneau Date: Tue, 26 Mar 2024 20:33:35 +0000 (-0400) Subject: scope-exit: Clarify scope_exit noexcept requirement X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=c91ccadee5bfbc94a95540e17c879ce976caf6a2;p=lttng-tools.git scope-exit: Clarify scope_exit noexcept requirement Signed-off-by: Jérémie Galarneau Change-Id: Iec34c435327e63e046319fa12f78a74ec50f4163 --- 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");