Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / outcome / doc / src / content / reference / types / basic_result / implicit_failure_make_exception_ptr_copy_constructor.md
1 +++
2 title = "`basic_result(const failure_type<T> &)`"
3 description = "Implicit error-from-failure-type-sugar copy constructor. Available if `predicate::enable_make_exception_ptr_compatible_conversion<void, T, void>` is true, or `T` is `void`. Constexpr, triviality and noexcept propagating."
4 categories = ["constructors", "implicit-constructors", "tagged-constructors"]
5 weight = 533
6 +++
7
8 Implicit error-from-failure-type-sugar copy constructor used to disambiguate the construction of the error type.
9 Note that if `T = void`, `error_type` will be default constructed.  Calls {{% api "void hook_result_copy_construction(T *, U &&) noexcept" %}} with `this` and `const failure_type<T> &`.
10
11 *Requires*: `predicate::enable_make_exception_ptr_compatible_conversion<void, T, void>` is true, or `T` is `void`.
12
13 *Complexity*: Same as for the `error_type` constructor which accepts `T`, or the `error_type` default constructor if `T` is `void`. Constexpr, triviality and noexcept of underlying operations is propagated.