[#BloombergLP-bdlb-ScopeExit-0e-2constructor-07] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/ScopeExit-0e.adoc[ScopeExit]::ScopeExit :relfileprefix: ../../../ :mrdocs: If `bsl::is_nothrow_move_constructible<EXIT_FUNC>::value` is `true` or `EXIT_FUNC` is a move‐only type, move construct, otherwise, copy construct the exit function from the specified `original`. If construction succeeds, call `release()` on `original`. == Synopsis Declared in `<bdlb_scopeexit.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- ScopeExit(xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef<ScopeExit>] original) noexcept(/* see-below */); ---- == Exception specification This function is potentially-throwing unless `bsl::is_nothrow_move_constructible<EXIT_FUNC>::value || bsl::is_nothrow_copy_constructible<EXIT_FUNC>::value`. [.small]#Created with https://www.mrdocs.com[MrDocs]#