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.
Declared in <bdlb_scopeexit.h>
template<class EXIT_FUNC_PARAM>
[[nodiscard]]
static
ScopeExit<bsl::decay<EXIT_FUNC_PARAM>::type>
makeScopeExit(EXIT_FUNC_PARAM&& function);
The return value should not be discarded.