Function Subspace :: sus :: fn :: call_once

template <class F, class... Args>
auto call_once(F&& f, Args&&... args) -> decltype(auto)
requires
sus::mem::IsMoveRef<decltype(f)>

Invokes the FnOnce, 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 being moved from so that the correct overload will be invoked.