Function Subspace :: sus :: ops :: try_from_default

template <class T>
auto try_from_default() -> T
requires
sus::ops::TryDefault<T>
!std::is_const_v<T>
!std::is_reference_v<T>

Constructs an object of type T that satisfies TryDefault (and Try) with its default success value.

The template variable T must be specified as it can not be deduced here. For example: sus::ops::try_from_default<Result<void, E>>().

The default success value is specified by the type, but is typically the success state containing the default constructed value of the inner type, such as Some(0_i32) for Option<i32>.