ΒΆtemplate <class T>
inline constexpr T try_from_output(
typename TryImpl<T>::Output&& t) noexcept
template <class T>
inline constexpr T try_from_output(
typename TryImpl<T>::Output&& t) noexcept
Description
Constructs an object of type `T` that satisfies [`Try`]($sus::ops::Try) from a value that represents success for `T`. For instance, this constructs a [`Result <T , E>`]($sus::result::Result) from a `T` since [`Result`]($sus::result::Result) satisfies [`Try`]($sus::ops::Try) and `T` is the type that represents its success values. The template variable `T` must be specified as it can not be deduced here. For example: `sus::ops::try_from_output <Result <T , E>>(T())`. # Void success values The `Output` type of [`Try <T >`]($sus::ops::Try) can not be void. To construct a type that has an output of `void`, require `T` to be [`TryDefault`]($sus::ops::TryDefault) and use [`try_from_default`]($sus::ops::try_from_default).
Declared at: sus/ops/try.h:180
Templates
- T
Parameters
- typename TryImpl<T>::Output&& t