ΒΆtemplate <class T>
inline constexpr T try_from_default() noexcept
template <class T>
inline constexpr T try_from_default() noexcept
Description
Constructs an object of type `T` that satisfies [`TryDefault`]($sus::ops::TryDefault) (and [`Try`]($sus::ops::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 >`]($sus::option::Option).
Declared at: sus/ops/try.h:198
Templates
- T