Move‐construct from original and release the moved‐from object.

Synopsis

Declared in <bdlb_scopeexit.h>

ScopeExit(bslmf::MovableRef<ScopeExit> original) noexcept(/* see-below */);

Description

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.

Exception specification

This function is potentially-throwing unless bsl::is_nothrow_move_constructible<EXIT_FUNC>::value || bsl::is_nothrow_copy_constructible<EXIT_FUNC>::value.

Parameters

Name

Description

original

scope exit object to move from

Created with MrDocs