Constructors
Declared in <bdlb_scopeexit.h>
Move-construct from original and release the moved-from object.
ScopeExit(bslmf::MovableRef<ScopeExit> original) noexcept(/* see-below */);
» more...
Create a ScopeExit that will invoke function on destruction.
explicit
ScopeExit(void(* function)());
» more...
Create a ScopeExit that will invoke function on destruction.
template<class EXIT_FUNC_PARAM>
explicit
ScopeExit(EXIT_FUNC_PARAM&& function)
requires bsl::is_constructible< // Copy construct
EXIT_FUNC,
const typename MoveUtil::Decay<EXIT_FUNC_PARAM>::type&
>::value ||
bsl::is_constructible< // Move construct
EXIT_FUNC,
bslmf::MovableRef<typename MoveUtil::Decay<EXIT_FUNC_PARAM>::type>
>::value;
» more...
| Name | Description |
|---|---|
| original | scope exit object to move from |
| function | function pointer invoked on destruction unless release is called |