try_operation_return_as(expr)
A customisable converter of ValueOrError<T, E> concept matching types to a returnable failure type.
Overridable: Argument dependent lookup.
Default: A number of implementations are provided by default:
- try_operation_return_as(T &&)which requires- Tto provide an- .as_failure()member function in order to be available. This is selected for all- basic_resultand- basic_outcometypes. See- auto try_operation_return_as(T &&).
- Copy and move editions of - try_operation_return_as(std::experimental::expected<T, E>)which return a- std::experimental::unexpected<E>for the input’s- .error()member function. See- std::experimental::unexpected<E> try_operation_return_as(std::experimental::expected<T, E>).
Namespace: BOOST_OUTCOME_V2_NAMESPACE
Header: <boost/outcome/try.hpp>



