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");
* also propagate the scope_exit to another scope, should it be needed.
*/
scope_exit(const scope_exit&) = delete;
+ scope_exit& operator=(const scope_exit&) = delete;
+ scope_exit& operator=(scope_exit&&) = delete;
scope_exit() = delete;
void disarm() noexcept