Function Subspace :: sus :: fn :: call_mut

template <class F, class... Args>
auto call_mut(F&& f, Args&&... args) -> decltype(auto)
requires
!std::is_const_v<std::remove_reference_t<F>>

Invokes the FnMut, passing any given arguments along, and returning the result.

This function is like std::invoke but it provides the following additional guiderails:

  • Verifies that the thing being invoked is called as a mutable lvalue so that the correct overload will be invoked.