mirror of
https://github.com/boostorg/outcome.git
synced 2026-01-19 04:22:13 +00:00
356 lines
46 KiB
HTML
356 lines
46 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<title>Types - Boost.Outcome documentation</title>
|
|
<link rel="stylesheet" href="../css/boost.css" type="text/css">
|
|
<meta name="generator" content="Hugo 0.52 with Boostdoc theme">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1.0"/>
|
|
|
|
<link rel="icon" href="../images/favicon.ico" type="image/ico"/>
|
|
<body><div id="boost-common-heading-doc" style="background: #574D74 url('../images/header-bg.png') repeat-x top left;">
|
|
<div class="heading-inner" style="background: url('../images/header-fg.png') no-repeat top left;">
|
|
<div class="heading-placard"></div>
|
|
|
|
<h1 class="heading-title">
|
|
<a href="../">
|
|
<img src="../images/space.png" alt="Boost C++ Libraries" class="heading-logo" />
|
|
<span class="heading-boost">Boost</span>
|
|
<span class="heading-cpplibraries">C++ Libraries</span>
|
|
</a>
|
|
</h1>
|
|
|
|
<p class="heading-quote">
|
|
<q>...one of the most highly
|
|
regarded and expertly designed C++ library projects in the
|
|
world.</q> <span class="heading-attribution">— <a href=
|
|
"http://www.gotw.ca/" class="external">Herb Sutter</a> and <a href=
|
|
"http://en.wikipedia.org/wiki/Andrei_Alexandrescu" class="external">Andrei
|
|
Alexandrescu</a>, <a href=
|
|
"http://safari.awprofessional.com/?XmlId=0321113586" class="external">C++
|
|
Coding Standards</a></span></p>
|
|
</div>
|
|
</div>
|
|
<div id="boost-common-heading-doc-spacer"></div><div class="spirit-nav">
|
|
<a accesskey="p" href="../reference/policies/throw_bad_result_access.html"><img src="../images/prev.png" alt="Prev"></a>
|
|
<a accesskey="u" href="../reference.html"><img src="../images/up.png" alt="Up"></a>
|
|
<a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../reference/types/basic_outcome.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
|
|
|
|
<div class="titlepage"><div><div><h1 style="clear: both">Types</h1></div></div></div>
|
|
<ol class="children children-li"><li>
|
|
<a href="../reference/types/basic_outcome.html" ><code>basic_outcome<T, EC, EP, NoValuePolicy></code></a>
|
|
<p>A type carrying one of (i) a successful <code>T</code> (ii) a disappointment <code>EC</code> (iii) a failure <code>EP</code> (iv) both a disappointment <code>EC</code> and a failure <code>EP</code>, with <code>NoValuePolicy</code> specifying what to do if one tries to read state which isn’t there.</p><ol><li>
|
|
<a href="../reference/types/basic_outcome/default.html" ><code>basic_outcome() = delete</code></a>
|
|
<p>The default constructor (disabled).</p><li>
|
|
<a href="../reference/types/basic_outcome/move_constructor.html" ><code>basic_outcome(basic_outcome &&)</code></a>
|
|
<p>Move constructor. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/copy_constructor.html" ><code>basic_outcome(const basic_outcome &)</code></a>
|
|
<p>Copy constructor. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/move_assignment.html" ><code>basic_outcome &operator=(basic_outcome &&)</code></a>
|
|
<p>Move assignment. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/copy_assignment.html" ><code>basic_outcome &operator=(const basic_outcome &)</code></a>
|
|
<p>Copy assignment. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/destructor.html" ><code>~basic_outcome()</code></a>
|
|
<p>Destructor. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/disabling_catchall.html" ><code>basic_outcome(Args...) = delete</code></a>
|
|
<p>Disabling catchall constructor used to give useful diagnostic error when trying to use non-inplace constructors when <code>predicate::constructors_enabled</code> is false.</p><li>
|
|
<a href="../reference/types/basic_outcome/disabling_implicit_constructor.html" ><code>basic_outcome(X &&) = delete</code></a>
|
|
<p>Disabling implicit constructor used to give useful diagnostic error when trying to use implicit constructors when <code>predicate::implicit_constructors_enabled</code> is false.</p><li>
|
|
<a href="../reference/types/basic_outcome/implicit_value_converting_constructor.html" ><code>basic_outcome(R &&)</code></a>
|
|
<p>Implicit <code>value_type</code> constructor. Available if <code>predicate::enable_value_converting_constructor<R></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/implicit_error_converting_constructor.html" ><code>basic_outcome(S &&)</code></a>
|
|
<p>Implicit <code>error_type</code> constructor. Available if <code>predicate::enable_error_converting_constructor<S></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/implicit_error_condition_converting_constructor.html" ><code>basic_outcome(ErrorCondEnum &&)</code></a>
|
|
<p>Implicit <code>error_type</code> from <code>ErrorCondEnum</code> constructor. Available if <code>predicate::enable_error_condition_converting_constructor<ErrorCondEnum></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/implicit_exception_converting_constructor.html" ><code>basic_outcome(P &&)</code></a>
|
|
<p>Implicit <code>exception_type</code> constructor. Available if <code>predicate::enable_exception_converting_constructor<P></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/implicit_error_exception_converting_constructor.html" ><code>basic_outcome(S &&, P &&)</code></a>
|
|
<p>Implicit <code>error_type</code> + <code>exception_type</code> constructor. Available if <code>predicate::enable_error_exception_converting_constructor<S, P></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/explicit_valueorerror_converting_constructor.html" ><code>explicit basic_outcome(concepts::value_or_error<T, E> &&)</code></a>
|
|
<p>Explicit converting constructor from <code>concepts::value_or_error<T, E></code> concept matching types. Available if <code>convert::value_or_error<></code> permits it. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/explicit_copy_converting_constructor.html" ><code>explicit basic_outcome(const basic_outcome<A, B, C, D> &)</code></a>
|
|
<p>Explicit converting copy constructor from compatible <code>basic_outcome</code>. Available if <code>predicate::enable_compatible_conversion<A, B, C, D></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/explicit_move_converting_constructor.html" ><code>explicit basic_outcome(basic_outcome<A, B, C, D> &&)</code></a>
|
|
<p>Explicit converting move constructor from compatible <code>basic_outcome</code>. Available if <code>predicate::enable_compatible_conversion<A, B, C, D></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/explicit_result_copy_converting_constructor.html" ><code>explicit basic_outcome(const basic_result<A, B, C> &)</code></a>
|
|
<p>Explicit converting copy constructor from compatible <code>basic_result</code>. Available if <code>predicate::enable_compatible_conversion<A, B, void, C></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/explicit_result_move_converting_constructor.html" ><code>explicit basic_outcome(basic_result<A, B, C> &&)</code></a>
|
|
<p>Explicit converting move constructor from compatible <code>basic_result</code>. Available if <code>predicate::enable_compatible_conversion<A, B, void, C></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/explicit_result_make_error_code_copy_converting_constructor.html" ><code>explicit basic_outcome(const basic_result<A, B, C> &)</code></a>
|
|
<p>Explicit converting copy constructor from compatible <code>basic_result</code>. Available if <code>predicate::enable_make_error_code_compatible_conversion<A, B, void, C></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/explicit_result_make_error_code_move_converting_constructor.html" ><code>explicit basic_outcome(basic_result<A, B, C> &&)</code></a>
|
|
<p>Explicit converting move constructor from compatible <code>basic_result</code>. Available if <code>predicate::enable_make_error_code_compatible_conversion<A, B, void, C></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/explicit_inplace_value_constructor.html" ><code>explicit basic_outcome(in_place_type_t<value_type_if_enabled>, Args ...)</code></a>
|
|
<p>Explicit inplace value constructor. Available if <code>predicate::enable_inplace_value_constructor<Args ...></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/explicit_inplace_value_constructor_il.html" ><code>explicit basic_outcome(in_place_type_t<value_type_if_enabled>, std::initializer_list<U>, Args ...)</code></a>
|
|
<p>Explicit inplace value constructor. Available if <code>predicate::enable_inplace_value_constructor<std::initializer_list<U>, Args ...></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/explicit_inplace_error_constructor.html" ><code>explicit basic_outcome(in_place_type_t<error_type_if_enabled>, Args ...)</code></a>
|
|
<p>Explicit inplace error constructor. Available if <code>predicate::enable_inplace_error_constructor<Args ...></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/explicit_inplace_error_constructor_il.html" ><code>explicit basic_outcome(in_place_type_t<error_type_if_enabled>, std::initializer_list<U>, Args ...)</code></a>
|
|
<p>Explicit inplace error constructor. Available if <code>predicate::enable_inplace_error_constructor<std::initializer_list<U>, Args ...></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/explicit_inplace_exception_constructor.html" ><code>explicit basic_outcome(in_place_type_t<exception_type_if_enabled>, Args ...)</code></a>
|
|
<p>Explicit inplace exception constructor. Available if <code>predicate::enable_inplace_exception_constructor<Args ...></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/explicit_inplace_exception_constructor_il.html" ><code>explicit basic_outcome(in_place_type_t<exception_type_if_enabled>, std::initializer_list<U>, Args ...)</code></a>
|
|
<p>Explicit inplace exception constructor. Available if <code>predicate::enable_inplace_exception_constructor<std::initializer_list<U>, Args ...></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/implicit_inplace_value_error_exception_constructor.html" ><code>basic_outcome(A1 &&, A2 &&, Args ...)</code></a>
|
|
<p>Implicit inplace value or error or exception constructor. Available if <code>predicate::enable_inplace_value_error_exception_constructor<A1, A2, Args ...></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/implicit_success_copy_constructor.html" ><code>basic_outcome(const success_type<T> &)</code></a>
|
|
<p>Implicit value-from-success-type-sugar copy constructor. Available if <code>predicate::enable_compatible_conversion<T, void, void></code> is true, or <code>T</code> is <code>void</code>. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/implicit_success_move_constructor.html" ><code>basic_outcome(success_type<T> &&)</code></a>
|
|
<p>Implicit value-from-success-type-sugar move constructor. Available if <code>predicate::enable_compatible_conversion<T, void, void></code> is true, or <code>T</code> is <code>void</code>. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/implicit_failure_error_copy_constructor.html" ><code>basic_outcome(const failure_type<EC> &)</code></a>
|
|
<p>Implicit error-from-failure-type-sugar copy constructor. Available if <code>predicate::enable_compatible_conversion<void, EC, void, void></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/implicit_failure_error_move_constructor.html" ><code>basic_outcome(failure_type<EC> &&)</code></a>
|
|
<p>Implicit error-from-failure-type-sugar move constructor. Available if <code>predicate::enable_compatible_conversion<void, EC, void, void></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/implicit_failure_error_make_error_code_copy_constructor.html" ><code>basic_outcome(const failure_type<EC> &)</code></a>
|
|
<p>Implicit error-from-failure-type-sugar copy constructor. Available if <code>predicate::enable_make_error_code_compatible_conversion<void, EC, void, void></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/implicit_failure_error_make_error_code_move_constructor.html" ><code>basic_outcome(failure_type<EC> &&)</code></a>
|
|
<p>Implicit error-from-failure-type-sugar move constructor. Available if <code>predicate::enable_make_error_code_compatible_conversion<void, EC, void, void></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/implicit_failure_exception_copy_constructor.html" ><code>basic_outcome(const failure_type<EP> &)</code></a>
|
|
<p>Implicit exception-from-failure-type-sugar copy constructor. Available if <code>predicate::enable_compatible_conversion<void, void, EP, void></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/implicit_failure_exception_move_constructor.html" ><code>basic_outcome(failure_type<EP> &&)</code></a>
|
|
<p>Implicit exception-from-failure-type-sugar move constructor. Available if <code>predicate::enable_compatible_conversion<void, void, EP, void></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/implicit_failure_error_exception_copy_constructor.html" ><code>basic_outcome(const failure_type<EC, EP> &)</code></a>
|
|
<p>Implicit error-and-exception-from-failure-type-sugar copy constructor. Available if <code>predicate::enable_compatible_conversion<void, EC, EP, void></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/implicit_failure_error_exception_move_constructor.html" ><code>basic_outcome(failure_type<EC, EP> &&)</code></a>
|
|
<p>Implicit error-and-exception-from-failure-type-sugar move constructor. Available if <code>predicate::enable_compatible_conversion<void, EC, EP, void></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/operator_bool.html" ><code>explicit operator bool() const noexcept</code></a>
|
|
<p>Returns true if a value is present. Constexpr, never throws.</p><li>
|
|
<a href="../reference/types/basic_outcome/has_value.html" ><code>bool has_value() const noexcept</code></a>
|
|
<p>Returns true if a value is present. Constexpr, never throws.</p><li>
|
|
<a href="../reference/types/basic_outcome/has_error.html" ><code>bool has_error() const noexcept</code></a>
|
|
<p>Returns true if an error is present. Constexpr, never throws.</p><li>
|
|
<a href="../reference/types/basic_outcome/has_exception.html" ><code>bool has_exception() const noexcept</code></a>
|
|
<p>Returns true if an exception is present. Constexpr, never throws.</p><li>
|
|
<a href="../reference/types/basic_outcome/has_failure.html" ><code>bool has_failure() const noexcept</code></a>
|
|
<p>Returns true if there is either an error or an exception. Constexpr, never throws.</p><li>
|
|
<a href="../reference/types/basic_outcome/assume_value_lvalue.html" ><code>value_type &assume_value() & noexcept</code></a>
|
|
<p>Narrow contract lvalue reference observer of any value present. Constexpr propagating, never throws.</p><li>
|
|
<a href="../reference/types/basic_outcome/assume_value_lvalue_const.html" ><code>const value_type &assume_value() const & noexcept</code></a>
|
|
<p>Narrow contract const lvalue reference observer of any value present. Constexpr propagating, never throws.</p><li>
|
|
<a href="../reference/types/basic_outcome/assume_value_rvalue.html" ><code>value_type &&assume_value() && noexcept</code></a>
|
|
<p>Narrow contract rvalue reference observer of any value present. Constexpr propagating, never throws.</p><li>
|
|
<a href="../reference/types/basic_outcome/assume_value_rvalue_const.html" ><code>const value_type &&assume_value() const && noexcept</code></a>
|
|
<p>Narrow contract const rvalue reference observer of any value present. Constexpr propagating, never throws.</p><li>
|
|
<a href="../reference/types/basic_outcome/value_lvalue.html" ><code>value_type &value() &</code></a>
|
|
<p>Wide contract lvalue reference observer of any value present. Constexpr propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/value_lvalue_const.html" ><code>const value_type &value() const &</code></a>
|
|
<p>Wide contract const lvalue reference observer of any value present. Constexpr propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/value_rvalue.html" ><code>value_type &&value() &&</code></a>
|
|
<p>Wide contract rvalue reference observer of any value present. Constexpr propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/value_rvalue_const.html" ><code>const value_type &&value() const &&</code></a>
|
|
<p>Wide contract const rvalue reference observer of any value present. Constexpr propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/assume_error_lvalue.html" ><code>error_type &assume_error() & noexcept</code></a>
|
|
<p>Narrow contract lvalue reference observer of the stored error. Constexpr propagating, never throws.</p><li>
|
|
<a href="../reference/types/basic_outcome/assume_error_lvalue_const.html" ><code>const error_type &assume_error() const & noexcept</code></a>
|
|
<p>Narrow contract const lvalue reference observer of the stored error. Constexpr propagating, never throws.</p><li>
|
|
<a href="../reference/types/basic_outcome/assume_error_rvalue.html" ><code>error_type &&assume_error() && noexcept</code></a>
|
|
<p>Narrow contract rvalue reference observer of the stored error. Constexpr propagating, never throws.</p><li>
|
|
<a href="../reference/types/basic_outcome/assume_error_rvalue_const.html" ><code>const error_type &&assume_error() const && noexcept</code></a>
|
|
<p>Narrow contract const rvalue reference observer of the stored error. Constexpr propagating, never throws.</p><li>
|
|
<a href="../reference/types/basic_outcome/error_lvalue.html" ><code>error_type &error() &</code></a>
|
|
<p>Wide contract lvalue reference observer of the stored error. Constexpr propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/error_lvalue_const.html" ><code>const error_type &error() const &</code></a>
|
|
<p>Wide contract const lvalue reference observer of the stored error. Constexpr propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/error_rvalue.html" ><code>error_type &&error() &&</code></a>
|
|
<p>Wide contract rvalue reference observer of the stored error. Constexpr propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/error_rvalue_const.html" ><code>const error_type &&error() const &&</code></a>
|
|
<p>Wide contract const rvalue reference observer of the stored error. Constexpr propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/assume_exception_lvalue.html" ><code>exception_type &assume_exception() & noexcept</code></a>
|
|
<p>Narrow contract lvalue reference observer of the stored exception. Constexpr propagating, never throws.</p><li>
|
|
<a href="../reference/types/basic_outcome/assume_exception_lvalue_const.html" ><code>const exception_type &assume_exception() const & noexcept</code></a>
|
|
<p>Narrow contract const lvalue reference observer of the stored exception. Constexpr propagating, never throws.</p><li>
|
|
<a href="../reference/types/basic_outcome/assume_exception_rvalue_const.html" ><code>const exception_type &&assume_exception() const && noexcept</code></a>
|
|
<p>Narrow contract const rvalue reference observer of the stored exception. Constexpr propagating, never throws.</p><li>
|
|
<a href="../reference/types/basic_outcome/assume_exception_rvalue.html" ><code>exception_type &&assume_exception() && noexcept</code></a>
|
|
<p>Narrow contract rvalue reference observer of the stored exception. Constexpr propagating, never throws.</p><li>
|
|
<a href="../reference/types/basic_outcome/exception_lvalue.html" ><code>exception_type &exception() &</code></a>
|
|
<p>Wide contract lvalue reference observer of the stored exception. Constexpr propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/exception_lvalue_const.html" ><code>const exception_type &exception() const &</code></a>
|
|
<p>Wide contract const lvalue reference observer of the stored exception. Constexpr propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/exception_rvalue.html" ><code>exception_type &&exception() &&</code></a>
|
|
<p>Wide contract rvalue reference observer of the stored exception. Constexpr propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/exception_rvalue_const.html" ><code>const exception_type &&exception() const &&</code></a>
|
|
<p>Wide contract const rvalue reference observer of the stored exception. Constexpr propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/failure.html" ><code>exception_type failure() const noexcept</code></a>
|
|
<p>Synthesising observer of the stored exception or error. Available if the traits <code>is_error_code_available<T></code> and <code>is_exception_ptr_available<T></code> are both true. Never throws.</p><li>
|
|
<a href="../reference/types/basic_outcome/equality_basic_result.html" ><code>bool operator==(const basic_result<A, B, C> &) const</code></a>
|
|
<p>Returns true if this outcome compares equal to the other result. Constexpr and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/equality_basic_outcome.html" ><code>bool operator==(const basic_outcome<A, B, C, D> &) const</code></a>
|
|
<p>Returns true if this outcome compares equal to the other outcome. Constexpr and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/inequality_success_type.html" ><code>bool operator==(const success_type<A> &) const</code></a>
|
|
<p>Returns true if this result compares equal to the success type sugar. Constexpr and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/equality_failure_type.html" ><code>bool operator==(const failure_type<A, B> &) const</code></a>
|
|
<p>Returns true if this outcome compares equal to the failure type sugar. Constexpr and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/inequality_basic_result.html" ><code>bool operator!=(const basic_result<A, B, C> &) const</code></a>
|
|
<p>Returns true if this outcome does not compare equal to the other result. Constexpr and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/inequality_basic_outcome.html" ><code>bool operator!=(const basic_outcome<A, B, C, D> &) const</code></a>
|
|
<p>Returns true if this outcome does not compare equal to the other outcome. Constexpr and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/equality_success_type.html" ><code>bool operator!=(const success_type<A> &) const</code></a>
|
|
<p>Returns true if this outcome does not compare equal to the success type sugar. Constexpr and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/inequality_failure_type.html" ><code>bool operator!=(const failure_type<A, B> &) const</code></a>
|
|
<p>Returns true if this outcome does not compare equal to the failure type sugar. Constexpr and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/swap.html" ><code>void swap(basic_outcome &)</code></a>
|
|
<p>Swap one basic_outcome with another, with the strong guarantee. Noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_outcome/as_failure_lvalue.html" ><code>failure_type<error_type, exception_type> as_failure() const &</code></a>
|
|
<p>Return the output from free function <code>failure()</code> containing a copy of any errored and/or excepted state.</p><li>
|
|
<a href="../reference/types/basic_outcome/as_failure_rvalue.html" ><code>failure_type<error_type, exception_type> as_failure() &&</code></a>
|
|
<p>Return the output from free function <code>failure()</code> containing a move of any errored and/or excepted state.</p></li></ol><li>
|
|
<a href="../reference/types/basic_result.html" ><code>basic_result<T, E, NoValuePolicy></code></a>
|
|
<p>A sum type carrying either a successful <code>T</code>, or a disappointment <code>E</code>, with <code>NoValuePolicy</code> specifying what to do if one tries to read state which isn’t there.</p><ol><li>
|
|
<a href="../reference/types/basic_result/default.html" ><code>basic_result() = delete</code></a>
|
|
<p>The default constructor (disabled).</p><li>
|
|
<a href="../reference/types/basic_result/move_constructor.html" ><code>basic_result(basic_result &&)</code></a>
|
|
<p>Move constructor. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/copy_constructor.html" ><code>basic_result(const basic_result &)</code></a>
|
|
<p>Copy constructor. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/move_assignment.html" ><code>basic_result &operator=(basic_result &&)</code></a>
|
|
<p>Move assignment. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/copy_assignment.html" ><code>basic_result &operator=(const basic_result &)</code></a>
|
|
<p>Copy assignment. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/destructor.html" ><code>~basic_result()</code></a>
|
|
<p>Destructor. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/disabling_catchall.html" ><code>basic_result(Args...) = delete</code></a>
|
|
<p>Disabling catchall constructor used to give useful diagnostic error when trying to use non-inplace constructors when <code>predicate::constructors_enabled</code> is false.</p><li>
|
|
<a href="../reference/types/basic_result/disabling_implicit_constructor.html" ><code>basic_result(X &&) = delete</code></a>
|
|
<p>Disabling implicit constructor used to give useful diagnostic error when trying to use implicit constructors when <code>predicate::implicit_constructors_enabled</code> is false.</p><li>
|
|
<a href="../reference/types/basic_result/implicit_value_converting_constructor.html" ><code>basic_result(R &&)</code></a>
|
|
<p>Implicit <code>value_type</code> constructor. Available if <code>predicate::enable_value_converting_constructor<R></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/implicit_error_converting_constructor.html" ><code>basic_result(S &&)</code></a>
|
|
<p>Implicit <code>error_type</code> constructor. Available if <code>predicate::enable_error_converting_constructor<S></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/implicit_error_condition_converting_constructor.html" ><code>basic_result(ErrorCondEnum &&)</code></a>
|
|
<p>Implicit <code>error_type</code> from <code>ErrorCondEnum</code> constructor. Available if <code>predicate::enable_error_condition_converting_constructor<ErrorCondEnum></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/explicit_valueorerror_converting_constructor.html" ><code>explicit basic_result(concepts::value_or_error<T, E> &&)</code></a>
|
|
<p>Explicit converting constructor from <code>concepts::value_or_error<T, E></code> concept matching types. Available if <code>convert::value_or_error<></code> permits it. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/explicit_copy_converting_constructor.html" ><code>explicit basic_result(const basic_result<R, S, P> &)</code></a>
|
|
<p>Explicit converting copy constructor from compatible <code>basic_result</code>. Available if <code>predicate::enable_compatible_conversion<R, S, P></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/explicit_move_converting_constructor.html" ><code>explicit basic_result(basic_result<R, S, P> &&)</code></a>
|
|
<p>Explicit converting move constructor from compatible <code>basic_result</code>. Available if <code>predicate::enable_compatible_conversion<R, S, P></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/explicit_make_error_code_copy_converting_constructor.html" ><code>explicit basic_result(const basic_result<R, S, P> &)</code></a>
|
|
<p>Explicit converting copy constructor from compatible <code>basic_result</code>. Available if <code>predicate::enable_make_error_code_compatible_conversion<R, S, P></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/explicit_make_error_code_move_converting_constructor.html" ><code>explicit basic_result(basic_result<R, S, P> &&)</code></a>
|
|
<p>Explicit converting move constructor from compatible <code>basic_result</code>. Available if <code>predicate::enable_make_error_code_compatible_conversion<R, S, P></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/explicit_make_exception_ptr_copy_converting_constructor.html" ><code>explicit basic_result(const basic_result<R, S, P> &)</code></a>
|
|
<p>Explicit converting copy constructor from compatible <code>basic_result</code>. Available if <code>predicate::enable_make_exception_ptr_compatible_conversion<R, S, P></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/explicit_make_exception_ptr_move_converting_constructor.html" ><code>explicit basic_result(basic_result<R, S, P> &&)</code></a>
|
|
<p>Explicit converting move constructor from compatible <code>basic_result</code>. Available if <code>predicate::enable_make_exception_ptr_compatible_conversion<R, S, P></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/explicit_inplace_value_constructor.html" ><code>explicit basic_result(in_place_type_t<value_type_if_enabled>, Args ...)</code></a>
|
|
<p>Explicit inplace value constructor. Available if <code>predicate::enable_inplace_value_constructor<Args ...></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/explicit_inplace_value_constructor_il.html" ><code>explicit basic_result(in_place_type_t<value_type_if_enabled>, std::initializer_list<U>, Args ...)</code></a>
|
|
<p>Explicit inplace value constructor. Available if <code>predicate::enable_inplace_value_constructor<std::initializer_list<U>, Args ...></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/explicit_inplace_error_constructor.html" ><code>explicit basic_result(in_place_type_t<error_type_if_enabled>, Args ...)</code></a>
|
|
<p>Explicit inplace error constructor. Available if <code>predicate::enable_inplace_error_constructor<Args ...></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/explicit_inplace_error_constructor_il.html" ><code>explicit basic_result(in_place_type_t<error_type_if_enabled>, std::initializer_list<U>, Args ...)</code></a>
|
|
<p>Explicit inplace error constructor. Available if <code>predicate::enable_inplace_error_constructor<std::initializer_list<U>, Args ...></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/implicit_inplace_value_error_constructor.html" ><code>basic_result(A1 &&, A2 &&, Args ...)</code></a>
|
|
<p>Implicit inplace value or error constructor. Available if <code>predicate::enable_inplace_value_error_constructor<A1, A2, Args ...></code> is true. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/implicit_success_copy_constructor.html" ><code>basic_result(const success_type<T> &)</code></a>
|
|
<p>Implicit value-from-success-type-sugar copy constructor. Available if <code>predicate::enable_compatible_conversion<T, void, void></code> is true, or <code>T</code> is <code>void</code>. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/implicit_success_move_constructor.html" ><code>basic_result(success_type<T> &&)</code></a>
|
|
<p>Implicit value-from-success-type-sugar move constructor. Available if <code>predicate::enable_compatible_conversion<T, void, void></code> is true, or <code>T</code> is <code>void</code>. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/implicit_failure_copy_constructor.html" ><code>basic_result(const failure_type<T> &)</code></a>
|
|
<p>Implicit error-from-failure-type-sugar copy constructor. Available if <code>predicate::enable_compatible_conversion<void, T, void></code> is true, or <code>T</code> is <code>void</code>. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/implicit_failure_move_constructor.html" ><code>basic_result(failure_type<T> &&)</code></a>
|
|
<p>Implicit error-from-failure-type-sugar move constructor. Available if <code>predicate::enable_compatible_conversion<void, T, void></code> is true, or <code>T</code> is <code>void</code>. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/implicit_failure_make_error_code_copy_constructor.html" ><code>basic_result(const failure_type<T> &)</code></a>
|
|
<p>Implicit error-from-failure-type-sugar copy constructor. Available if <code>predicate::enable_make_error_code_compatible_conversion<void, T, void></code> is true, or <code>T</code> is <code>void</code>. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/implicit_failure_make_error_code_move_constructor.html" ><code>basic_result(failure_type<T> &&)</code></a>
|
|
<p>Implicit error-from-failure-type-sugar move constructor. Available if <code>predicate::enable_make_error_code_compatible_conversion<void, T, void></code> is true, or <code>T</code> is <code>void</code>. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/implicit_failure_make_exception_ptr_copy_constructor.html" ><code>basic_result(const failure_type<T> &)</code></a>
|
|
<p>Implicit error-from-failure-type-sugar copy constructor. Available if <code>predicate::enable_make_exception_ptr_compatible_conversion<void, T, void></code> is true, or <code>T</code> is <code>void</code>. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/implicit_failure_make_exception_ptr_move_constructor.html" ><code>basic_result(failure_type<T> &&)</code></a>
|
|
<p>Implicit error-from-failure-type-sugar move constructor. Available if <code>predicate::enable_make_exception_ptr_compatible_conversion<void, T, void></code> is true, or <code>T</code> is <code>void</code>. Constexpr, triviality and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/operator_bool.html" ><code>explicit operator bool() const noexcept</code></a>
|
|
<p>Returns true if a value is present. Constexpr, never throws.</p><li>
|
|
<a href="../reference/types/basic_result/has_value.html" ><code>bool has_value() const noexcept</code></a>
|
|
<p>Returns true if a value is present. Constexpr, never throws.</p><li>
|
|
<a href="../reference/types/basic_result/has_error.html" ><code>bool has_error() const noexcept</code></a>
|
|
<p>Returns true if an error is present. Constexpr, never throws.</p><li>
|
|
<a href="../reference/types/basic_result/has_exception.html" ><code>bool has_exception() const noexcept</code></a>
|
|
<p>Always returns false for <code>basic_result</code>. Constexpr, never throws.</p><li>
|
|
<a href="../reference/types/basic_result/has_failure.html" ><code>bool has_failure() const noexcept</code></a>
|
|
<p>Returns true if there is either an error or an exception. Constexpr, never throws.</p><li>
|
|
<a href="../reference/types/basic_result/has_lost_consistency.html" ><code>bool has_lost_consistency() const noexcept</code></a>
|
|
<p>Returns true if a preceding swap involving this object failed to preserve the strong guarantee. Constexpr, never throws.</p><li>
|
|
<a href="../reference/types/basic_result/assume_value_lvalue.html" ><code>value_type &assume_value() & noexcept</code></a>
|
|
<p>Narrow contract lvalue reference observer of any value present. Constexpr propagating, never throws.</p><li>
|
|
<a href="../reference/types/basic_result/assume_value_lvalue_const.html" ><code>const value_type &assume_value() const & noexcept</code></a>
|
|
<p>Narrow contract const lvalue reference observer of any value present. Constexpr propagating, never throws.</p><li>
|
|
<a href="../reference/types/basic_result/assume_value_rvalue.html" ><code>value_type &&assume_value() && noexcept</code></a>
|
|
<p>Narrow contract rvalue reference observer of any value present. Constexpr propagating, never throws.</p><li>
|
|
<a href="../reference/types/basic_result/assume_value_rvalue_const.html" ><code>const value_type &&assume_value() const && noexcept</code></a>
|
|
<p>Narrow contract const rvalue reference observer of any value present. Constexpr propagating, never throws.</p><li>
|
|
<a href="../reference/types/basic_result/value_lvalue.html" ><code>value_type &value() &</code></a>
|
|
<p>Wide contract lvalue reference observer of any value present. Constexpr propagating.</p><li>
|
|
<a href="../reference/types/basic_result/value_lvalue_const.html" ><code>const value_type &value() const &</code></a>
|
|
<p>Wide contract const lvalue reference observer of any value present. Constexpr propagating.</p><li>
|
|
<a href="../reference/types/basic_result/value_rvalue.html" ><code>value_type &&value() &&</code></a>
|
|
<p>Wide contract rvalue reference observer of any value present. Constexpr propagating.</p><li>
|
|
<a href="../reference/types/basic_result/value_rvalue_const.html" ><code>const value_type &&value() const &&</code></a>
|
|
<p>Wide contract const rvalue reference observer of any value present. Constexpr propagating.</p><li>
|
|
<a href="../reference/types/basic_result/assume_error_lvalue.html" ><code>error_type &assume_error() & noexcept</code></a>
|
|
<p>Narrow contract lvalue reference observer of the stored error. Constexpr propagating, never throws.</p><li>
|
|
<a href="../reference/types/basic_result/assume_error_lvalue_const.html" ><code>const error_type &assume_error() const & noexcept</code></a>
|
|
<p>Narrow contract const lvalue reference observer of the stored error. Constexpr propagating, never throws.</p><li>
|
|
<a href="../reference/types/basic_result/assume_error_rvalue.html" ><code>error_type &&assume_error() && noexcept</code></a>
|
|
<p>Narrow contract rvalue reference observer of the stored error. Constexpr propagating, never throws.</p><li>
|
|
<a href="../reference/types/basic_result/assume_error_rvalue_const.html" ><code>const error_type &&assume_error() const && noexcept</code></a>
|
|
<p>Narrow contract const rvalue reference observer of the stored error. Constexpr propagating, never throws.</p><li>
|
|
<a href="../reference/types/basic_result/error_lvalue.html" ><code>error_type &error() &</code></a>
|
|
<p>Wide contract lvalue reference observer of the stored error. Constexpr propagating.</p><li>
|
|
<a href="../reference/types/basic_result/error_lvalue_const.html" ><code>const error_type &error() const &</code></a>
|
|
<p>Wide contract const lvalue reference observer of the stored error. Constexpr propagating.</p><li>
|
|
<a href="../reference/types/basic_result/error_rvalue.html" ><code>error_type &&error() &&</code></a>
|
|
<p>Wide contract rvalue reference observer of the stored error. Constexpr propagating.</p><li>
|
|
<a href="../reference/types/basic_result/error_rvalue_const.html" ><code>const error_type &&error() const &&</code></a>
|
|
<p>Wide contract const rvalue reference observer of the stored error. Constexpr propagating.</p><li>
|
|
<a href="../reference/types/basic_result/equality_basic_result.html" ><code>bool operator==(const basic_result<A, B, C> &) const</code></a>
|
|
<p>Returns true if this result compares equal to the other result. Constexpr and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/inequality_success_type.html" ><code>bool operator==(const success_type<A> &) const</code></a>
|
|
<p>Returns true if this result compares equal to the success type sugar. Constexpr and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/equality_failure_type.html" ><code>bool operator==(const failure_type<A, void> &) const</code></a>
|
|
<p>Returns true if this result compares equal to the failure type sugar. Constexpr and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/inequality_basic_result.html" ><code>bool operator!=(const basic_result<A, B, C> &) const</code></a>
|
|
<p>Returns true if this result does not compare equal to the other result. Constexpr and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/equality_success_type.html" ><code>bool operator!=(const success_type<A> &) const</code></a>
|
|
<p>Returns true if this result does not compare equal to the success type sugar. Constexpr and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/inequality_failure_type.html" ><code>bool operator!=(const failure_type<A, void> &) const</code></a>
|
|
<p>Returns true if this result does not compare equal to the failure type sugar. Constexpr and noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/swap.html" ><code>void swap(basic_result &)</code></a>
|
|
<p>Swap one basic_result with another, with the strong guarantee. Noexcept propagating.</p><li>
|
|
<a href="../reference/types/basic_result/as_failure_lvalue.html" ><code>auto as_failure() const &</code></a>
|
|
<p>Return the output from free function <code>failure()</code> containing a copy of any errored state.</p><li>
|
|
<a href="../reference/types/basic_result/as_failure_rvalue.html" ><code>auto as_failure() &&</code></a>
|
|
<p>Return the output from free function <code>failure()</code> containing a move of any errored state.</p></li></ol><li>
|
|
<a href="../reference/types/bad_outcome_access.html" ><code>bad_outcome_access</code></a>
|
|
<p>Exception type publicly inheriting from <code>std::logic_error</code> indicating an incorrect observation of value or error or exception occurred.</p><li>
|
|
<a href="../reference/types/bad_result_access_with.html" ><code>bad_result_access_with<EC></code></a>
|
|
<p>Exception type publicly inheriting from <code>bad_result_access</code> indicating an incorrect observation of value occurred, supplying the error value.</p><li>
|
|
<a href="../reference/types/bad_result_access.html" ><code>bad_result_access</code></a>
|
|
<p>Exception type publicly inheriting from <code>std::logic_error</code> indicating an incorrect observation of value or error occurred.</p><li>
|
|
<a href="../reference/types/awaitables/eager.html" ><code>eager<T, Executor = void>/atomic_eager<T, Executor = void></code></a>
|
|
<p>An eagerly evaluated coroutine awaitable with Outcome customisation.</p><li>
|
|
<a href="../reference/types/failure_type.html" ><code>failure_type<EC, EP = void></code></a>
|
|
<p>Type sugar for constructing an unsuccessful result or outcome.</p><li>
|
|
<a href="../reference/types/awaitables/generator.html" ><code>generator<T, Executor = void></code></a>
|
|
<p>A lazily evaluated coroutine generator with Outcome customisation.</p><li>
|
|
<a href="../reference/types/in_place_type_t.html" ><code>in_place_type_t<T></code></a>
|
|
<p>Either <code>std::in_place_type_t<T></code> or a local emulation, depending on the <code>BOOST_OUTCOME_USE_STD_IN_PLACE_TYPE</code> macro.</p><li>
|
|
<a href="../reference/types/awaitables/lazy.html" ><code>lazy<T, Executor = void>/atomic_lazy<T, Executor = void></code></a>
|
|
<p>A lazily evaluated coroutine awaitable with Outcome customisation.</p><li>
|
|
<a href="../reference/types/success_type.html" ><code>success_type<T></code></a>
|
|
<p>Type sugar for constructing a successful result or outcome.</p></li></ol>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div><p><small>Last revised: December 13, 2018 at 21:10:19 UTC</small></p>
|
|
<hr>
|
|
<div class="spirit-nav">
|
|
<a accesskey="p" href="../reference/policies/throw_bad_result_access.html"><img src="../images/prev.png" alt="Prev"></a>
|
|
<a accesskey="u" href="../reference.html"><img src="../images/up.png" alt="Up"></a>
|
|
<a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../reference/types/basic_outcome.html"><img src="../images/next.png" alt="Next"></a></div></body>
|
|
</html>
|