halcheck 1.0
Loading...
Searching...
No Matches

◆ operator+

template<typename F = lib::move_only_function<void() &&>>
template<typename G >
finally_t< combine< G > > operator+ ( finally_t< F > && lhs,
finally_t< G > && rhs )
friend

Combines two finally_t values into one, such that both underlying functions are called upon destruction of the return value.

Template Parameters
GThe other type of function to call.
Parameters
lhsThe second function to call.
rhsThe first function to call.
Returns
Note
The underlying functions are called in the reverse order of arguments provided, i.e. arguments should be provided in the same order they are created.