scope-exit: Clarify scope_exit noexcept requirement
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 26 Mar 2024 20:33:35 +0000 (16:33 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 26 Mar 2024 20:34:11 +0000 (16:34 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Iec34c435327e63e046319fa12f78a74ec50f4163

src/common/scope-exit.hpp

index 20d9b892d34d0ff54265035b951d144a9d5b6d4b..3f8c90f80941fbe4384c498c559a6c4d6454be0c 100644 (file)
@@ -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<ScopeExitInvocableType>::value,
                      "scope_exit requires a noexcept invocable type");
This page took 0.027338 seconds and 4 git commands to generate.