Function Subspace :: sus :: result :: ok

template <class T>
auto ok(T&& t) -> auto
auto ok() -> auto

Used to construct a Result<T, E> with an Ok(t) value.

Calling ok() produces a hint to make a Result<T, E> but does not actually construct Result<T, E>. This is to deduce the actual types T and E when it is constructed, avoid specifying them both here, and support conversions.

Result<void, E> can also be constructed from calling ok() without an argument.