Return a ScopeExit guard that uses the specified function as its exit function, and has the decayed type of function (class type or or function pointer type) as its exit function member type.

Synopsis

Declared in <bdlb_scopeexit.h>

template<class EXIT_FUNC_PARAM>
[[nodiscard]]
static
ScopeExit<bsl::decay<EXIT_FUNC_PARAM>::type>
makeScopeExit(EXIT_FUNC_PARAM&& function);

Return Value

Note

The return value should not be discarded.

Created with MrDocs