types.html 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  3. <title>Types - Boost.Outcome documentation</title>
  4. <link rel="stylesheet" href="../css/boost.css" type="text/css">
  5. <meta name="generator" content="Hugo 0.52 with Boostdoc theme">
  6. <meta name="viewport" content="width=device-width,initial-scale=1.0"/>
  7. <link rel="icon" href="../images/favicon.ico" type="image/ico"/>
  8. <body><div class="spirit-nav">
  9. <a accesskey="p" href="../reference/policies/throw_bad_result_access.html"><img src="../images/prev.png" alt="Prev"></a>
  10. <a accesskey="u" href="../reference.html"><img src="../images/up.png" alt="Up"></a>
  11. <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">
  12. <div class="titlepage"><div><div><h1 style="clear: both">Types</h1></div></div></div>
  13. <ol class="children children-li"><li>
  14. <a href="../reference/types/basic_outcome.html" ><code>basic_outcome&lt;T, EC, EP, NoValuePolicy&gt;</code></a>
  15. <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&rsquo;t there.</p><ol><li>
  16. <a href="../reference/types/basic_outcome/default.html" ><code>basic_outcome() = delete</code></a>
  17. <p>The default constructor (disabled).</p><li>
  18. <a href="../reference/types/basic_outcome/move_constructor.html" ><code>basic_outcome(basic_outcome &amp;&amp;)</code></a>
  19. <p>Move constructor. Constexpr, triviality and noexcept propagating.</p><li>
  20. <a href="../reference/types/basic_outcome/copy_constructor.html" ><code>basic_outcome(const basic_outcome &amp;)</code></a>
  21. <p>Copy constructor. Constexpr, triviality and noexcept propagating.</p><li>
  22. <a href="../reference/types/basic_outcome/move_assignment.html" ><code>basic_outcome &amp;operator=(basic_outcome &amp;&amp;)</code></a>
  23. <p>Move assignment. Constexpr, triviality and noexcept propagating.</p><li>
  24. <a href="../reference/types/basic_outcome/copy_assignment.html" ><code>basic_outcome &amp;operator=(const basic_outcome &amp;)</code></a>
  25. <p>Copy assignment. Constexpr, triviality and noexcept propagating.</p><li>
  26. <a href="../reference/types/basic_outcome/destructor.html" ><code>~basic_outcome()</code></a>
  27. <p>Destructor. Constexpr, triviality and noexcept propagating.</p><li>
  28. <a href="../reference/types/basic_outcome/disabling_catchall.html" ><code>basic_outcome(Args...) = delete</code></a>
  29. <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>
  30. <a href="../reference/types/basic_outcome/disabling_implicit_constructor.html" ><code>basic_outcome(X &amp;&amp;) = delete</code></a>
  31. <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>
  32. <a href="../reference/types/basic_outcome/implicit_value_converting_constructor.html" ><code>basic_outcome(R &amp;&amp;)</code></a>
  33. <p>Implicit <code>value_type</code> constructor. Available if <code>predicate::enable_value_converting_constructor&lt;R&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  34. <a href="../reference/types/basic_outcome/implicit_error_converting_constructor.html" ><code>basic_outcome(S &amp;&amp;)</code></a>
  35. <p>Implicit <code>error_type</code> constructor. Available if <code>predicate::enable_error_converting_constructor&lt;S&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  36. <a href="../reference/types/basic_outcome/implicit_error_condition_converting_constructor.html" ><code>basic_outcome(ErrorCondEnum &amp;&amp;)</code></a>
  37. <p>Implicit <code>error_type</code> from <code>ErrorCondEnum</code> constructor. Available if <code>predicate::enable_error_condition_converting_constructor&lt;ErrorCondEnum&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  38. <a href="../reference/types/basic_outcome/implicit_exception_converting_constructor.html" ><code>basic_outcome(P &amp;&amp;)</code></a>
  39. <p>Implicit <code>exception_type</code> constructor. Available if <code>predicate::enable_exception_converting_constructor&lt;P&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  40. <a href="../reference/types/basic_outcome/implicit_error_exception_converting_constructor.html" ><code>basic_outcome(S &amp;&amp;, P &amp;&amp;)</code></a>
  41. <p>Implicit <code>error_type</code> + <code>exception_type</code> constructor. Available if <code>predicate::enable_error_exception_converting_constructor&lt;S, P&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  42. <a href="../reference/types/basic_outcome/explicit_valueorerror_converting_constructor.html" ><code>explicit basic_outcome(ValueOrError&lt;T, E&gt; &amp;&amp;)</code></a>
  43. <p>Explicit converting constructor from <code>ValueOrError&lt;T, E&gt;</code> concept matching types. Available if <code>convert::value_or_error&lt;&gt;</code> permits it. Constexpr, triviality and noexcept propagating.</p><li>
  44. <a href="../reference/types/basic_outcome/explicit_copy_converting_constructor.html" ><code>explicit basic_outcome(const basic_outcome&lt;A, B, C, D&gt; &amp;)</code></a>
  45. <p>Explicit converting copy constructor from compatible <code>basic_outcome</code>. Available if <code>predicate::enable_compatible_conversion&lt;A, B, C, D&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  46. <a href="../reference/types/basic_outcome/explicit_move_converting_constructor.html" ><code>explicit basic_outcome(basic_outcome&lt;A, B, C, D&gt; &amp;&amp;)</code></a>
  47. <p>Explicit converting move constructor from compatible <code>basic_outcome</code>. Available if <code>predicate::enable_compatible_conversion&lt;A, B, C, D&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  48. <a href="../reference/types/basic_outcome/explicit_result_copy_converting_constructor.html" ><code>explicit basic_outcome(const basic_result&lt;A, B, C&gt; &amp;)</code></a>
  49. <p>Explicit converting copy constructor from compatible <code>basic_result</code>. Available if <code>predicate::enable_compatible_conversion&lt;A, B, void, C&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  50. <a href="../reference/types/basic_outcome/explicit_result_move_converting_constructor.html" ><code>explicit basic_outcome(basic_result&lt;A, B, C&gt; &amp;&amp;)</code></a>
  51. <p>Explicit converting move constructor from compatible <code>basic_result</code>. Available if <code>predicate::enable_compatible_conversion&lt;A, B, void, C&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  52. <a href="../reference/types/basic_outcome/explicit_result_make_error_code_copy_converting_constructor.html" ><code>explicit basic_outcome(const basic_result&lt;A, B, C&gt; &amp;)</code></a>
  53. <p>Explicit converting copy constructor from compatible <code>basic_result</code>. Available if <code>predicate::enable_make_error_code_compatible_conversion&lt;A, B, void, C&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  54. <a href="../reference/types/basic_outcome/explicit_result_make_error_code_move_converting_constructor.html" ><code>explicit basic_outcome(basic_result&lt;A, B, C&gt; &amp;&amp;)</code></a>
  55. <p>Explicit converting move constructor from compatible <code>basic_result</code>. Available if <code>predicate::enable_make_error_code_compatible_conversion&lt;A, B, void, C&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  56. <a href="../reference/types/basic_outcome/explicit_inplace_value_constructor.html" ><code>explicit basic_outcome(in_place_type_t&lt;value_type_if_enabled&gt;, Args ...)</code></a>
  57. <p>Explicit inplace value constructor. Available if <code>predicate::enable_inplace_value_constructor&lt;Args ...&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  58. <a href="../reference/types/basic_outcome/explicit_inplace_value_constructor_il.html" ><code>explicit basic_outcome(in_place_type_t&lt;value_type_if_enabled&gt;, std::initializer_list&lt;U&gt;, Args ...)</code></a>
  59. <p>Explicit inplace value constructor. Available if <code>predicate::enable_inplace_value_constructor&lt;std::initializer_list&lt;U&gt;, Args ...&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  60. <a href="../reference/types/basic_outcome/explicit_inplace_error_constructor.html" ><code>explicit basic_outcome(in_place_type_t&lt;error_type_if_enabled&gt;, Args ...)</code></a>
  61. <p>Explicit inplace error constructor. Available if <code>predicate::enable_inplace_error_constructor&lt;Args ...&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  62. <a href="../reference/types/basic_outcome/explicit_inplace_error_constructor_il.html" ><code>explicit basic_outcome(in_place_type_t&lt;error_type_if_enabled&gt;, std::initializer_list&lt;U&gt;, Args ...)</code></a>
  63. <p>Explicit inplace error constructor. Available if <code>predicate::enable_inplace_error_constructor&lt;std::initializer_list&lt;U&gt;, Args ...&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  64. <a href="../reference/types/basic_outcome/explicit_inplace_exception_constructor.html" ><code>explicit basic_outcome(in_place_type_t&lt;exception_type_if_enabled&gt;, Args ...)</code></a>
  65. <p>Explicit inplace exception constructor. Available if <code>predicate::enable_inplace_exception_constructor&lt;Args ...&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  66. <a href="../reference/types/basic_outcome/explicit_inplace_exception_constructor_il.html" ><code>explicit basic_outcome(in_place_type_t&lt;exception_type_if_enabled&gt;, std::initializer_list&lt;U&gt;, Args ...)</code></a>
  67. <p>Explicit inplace exception constructor. Available if <code>predicate::enable_inplace_exception_constructor&lt;std::initializer_list&lt;U&gt;, Args ...&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  68. <a href="../reference/types/basic_outcome/implicit_inplace_value_error_exception_constructor.html" ><code>basic_outcome(A1 &amp;&amp;, A2 &amp;&amp;, Args ...)</code></a>
  69. <p>Implicit inplace value or error or exception constructor. Available if <code>predicate::enable_inplace_value_error_exception_constructor&lt;A1, A2, Args ...&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  70. <a href="../reference/types/basic_outcome/implicit_success_copy_constructor.html" ><code>basic_outcome(const success_type&lt;T&gt; &amp;)</code></a>
  71. <p>Implicit value-from-success-type-sugar copy constructor. Available if <code>predicate::enable_compatible_conversion&lt;T, void, void&gt;</code> is true, or <code>T</code> is <code>void</code>. Constexpr, triviality and noexcept propagating.</p><li>
  72. <a href="../reference/types/basic_outcome/implicit_success_move_constructor.html" ><code>basic_outcome(success_type&lt;T&gt; &amp;&amp;)</code></a>
  73. <p>Implicit value-from-success-type-sugar move constructor. Available if <code>predicate::enable_compatible_conversion&lt;T, void, void&gt;</code> is true, or <code>T</code> is <code>void</code>. Constexpr, triviality and noexcept propagating.</p><li>
  74. <a href="../reference/types/basic_outcome/implicit_failure_error_copy_constructor.html" ><code>basic_outcome(const failure_type&lt;EC&gt; &amp;)</code></a>
  75. <p>Implicit error-from-failure-type-sugar copy constructor. Available if <code>predicate::enable_compatible_conversion&lt;void, EC, void, void&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  76. <a href="../reference/types/basic_outcome/implicit_failure_error_move_constructor.html" ><code>basic_outcome(failure_type&lt;EC&gt; &amp;&amp;)</code></a>
  77. <p>Implicit error-from-failure-type-sugar move constructor. Available if <code>predicate::enable_compatible_conversion&lt;void, EC, void, void&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  78. <a href="../reference/types/basic_outcome/implicit_failure_error_make_error_code_copy_constructor.html" ><code>basic_outcome(const failure_type&lt;EC&gt; &amp;)</code></a>
  79. <p>Implicit error-from-failure-type-sugar copy constructor. Available if <code>predicate::enable_make_error_code_compatible_conversion&lt;void, EC, void, void&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  80. <a href="../reference/types/basic_outcome/implicit_failure_error_make_error_code_move_constructor.html" ><code>basic_outcome(failure_type&lt;EC&gt; &amp;&amp;)</code></a>
  81. <p>Implicit error-from-failure-type-sugar move constructor. Available if <code>predicate::enable_make_error_code_compatible_conversion&lt;void, EC, void, void&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  82. <a href="../reference/types/basic_outcome/implicit_failure_exception_copy_constructor.html" ><code>basic_outcome(const failure_type&lt;EP&gt; &amp;)</code></a>
  83. <p>Implicit exception-from-failure-type-sugar copy constructor. Available if <code>predicate::enable_compatible_conversion&lt;void, void, EP, void&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  84. <a href="../reference/types/basic_outcome/implicit_failure_exception_move_constructor.html" ><code>basic_outcome(failure_type&lt;EP&gt; &amp;&amp;)</code></a>
  85. <p>Implicit exception-from-failure-type-sugar move constructor. Available if <code>predicate::enable_compatible_conversion&lt;void, void, EP, void&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  86. <a href="../reference/types/basic_outcome/implicit_failure_error_exception_copy_constructor.html" ><code>basic_outcome(const failure_type&lt;EC, EP&gt; &amp;)</code></a>
  87. <p>Implicit error-and-exception-from-failure-type-sugar copy constructor. Available if <code>predicate::enable_compatible_conversion&lt;void, EC, EP, void&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  88. <a href="../reference/types/basic_outcome/implicit_failure_error_exception_move_constructor.html" ><code>basic_outcome(failure_type&lt;EC, EP&gt; &amp;&amp;)</code></a>
  89. <p>Implicit error-and-exception-from-failure-type-sugar move constructor. Available if <code>predicate::enable_compatible_conversion&lt;void, EC, EP, void&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  90. <a href="../reference/types/basic_outcome/operator_bool.html" ><code>explicit operator bool() const noexcept</code></a>
  91. <p>Returns true if a value is present. Constexpr, never throws.</p><li>
  92. <a href="../reference/types/basic_outcome/has_value.html" ><code>bool has_value() const noexcept</code></a>
  93. <p>Returns true if a value is present. Constexpr, never throws.</p><li>
  94. <a href="../reference/types/basic_outcome/has_error.html" ><code>bool has_error() const noexcept</code></a>
  95. <p>Returns true if an error is present. Constexpr, never throws.</p><li>
  96. <a href="../reference/types/basic_outcome/has_exception.html" ><code>bool has_exception() const noexcept</code></a>
  97. <p>Returns true if an exception is present. Constexpr, never throws.</p><li>
  98. <a href="../reference/types/basic_outcome/has_failure.html" ><code>bool has_failure() const noexcept</code></a>
  99. <p>Returns true if there is either an error or an exception. Constexpr, never throws.</p><li>
  100. <a href="../reference/types/basic_outcome/assume_value_lvalue.html" ><code>value_type &amp;assume_value() &amp; noexcept</code></a>
  101. <p>Narrow contract lvalue reference observer of any value present. Constexpr propagating, never throws.</p><li>
  102. <a href="../reference/types/basic_outcome/assume_value_lvalue_const.html" ><code>const value_type &amp;assume_value() const &amp; noexcept</code></a>
  103. <p>Narrow contract const lvalue reference observer of any value present. Constexpr propagating, never throws.</p><li>
  104. <a href="../reference/types/basic_outcome/assume_value_rvalue.html" ><code>value_type &amp;&amp;assume_value() &amp;&amp; noexcept</code></a>
  105. <p>Narrow contract rvalue reference observer of any value present. Constexpr propagating, never throws.</p><li>
  106. <a href="../reference/types/basic_outcome/assume_value_rvalue_const.html" ><code>const value_type &amp;&amp;assume_value() const &amp;&amp; noexcept</code></a>
  107. <p>Narrow contract const rvalue reference observer of any value present. Constexpr propagating, never throws.</p><li>
  108. <a href="../reference/types/basic_outcome/value_lvalue.html" ><code>value_type &amp;value() &amp;</code></a>
  109. <p>Wide contract lvalue reference observer of any value present. Constexpr propagating.</p><li>
  110. <a href="../reference/types/basic_outcome/value_lvalue_const.html" ><code>const value_type &amp;value() const &amp;</code></a>
  111. <p>Wide contract const lvalue reference observer of any value present. Constexpr propagating.</p><li>
  112. <a href="../reference/types/basic_outcome/value_rvalue.html" ><code>value_type &amp;&amp;value() &amp;&amp;</code></a>
  113. <p>Wide contract rvalue reference observer of any value present. Constexpr propagating.</p><li>
  114. <a href="../reference/types/basic_outcome/value_rvalue_const.html" ><code>const value_type &amp;&amp;value() const &amp;&amp;</code></a>
  115. <p>Wide contract const rvalue reference observer of any value present. Constexpr propagating.</p><li>
  116. <a href="../reference/types/basic_outcome/assume_error_lvalue.html" ><code>error_type &amp;assume_error() &amp; noexcept</code></a>
  117. <p>Narrow contract lvalue reference observer of the stored error. Constexpr propagating, never throws.</p><li>
  118. <a href="../reference/types/basic_outcome/assume_error_lvalue_const.html" ><code>const error_type &amp;assume_error() const &amp; noexcept</code></a>
  119. <p>Narrow contract const lvalue reference observer of the stored error. Constexpr propagating, never throws.</p><li>
  120. <a href="../reference/types/basic_outcome/assume_error_rvalue.html" ><code>error_type &amp;&amp;assume_error() &amp;&amp; noexcept</code></a>
  121. <p>Narrow contract rvalue reference observer of the stored error. Constexpr propagating, never throws.</p><li>
  122. <a href="../reference/types/basic_outcome/assume_error_rvalue_const.html" ><code>const error_type &amp;&amp;assume_error() const &amp;&amp; noexcept</code></a>
  123. <p>Narrow contract const rvalue reference observer of the stored error. Constexpr propagating, never throws.</p><li>
  124. <a href="../reference/types/basic_outcome/error_lvalue.html" ><code>error_type &amp;error() &amp;</code></a>
  125. <p>Wide contract lvalue reference observer of the stored error. Constexpr propagating.</p><li>
  126. <a href="../reference/types/basic_outcome/error_lvalue_const.html" ><code>const error_type &amp;error() const &amp;</code></a>
  127. <p>Wide contract const lvalue reference observer of the stored error. Constexpr propagating.</p><li>
  128. <a href="../reference/types/basic_outcome/error_rvalue.html" ><code>error_type &amp;&amp;error() &amp;&amp;</code></a>
  129. <p>Wide contract rvalue reference observer of the stored error. Constexpr propagating.</p><li>
  130. <a href="../reference/types/basic_outcome/error_rvalue_const.html" ><code>const error_type &amp;&amp;error() const &amp;&amp;</code></a>
  131. <p>Wide contract const rvalue reference observer of the stored error. Constexpr propagating.</p><li>
  132. <a href="../reference/types/basic_outcome/assume_exception_lvalue.html" ><code>exception_type &amp;assume_exception() &amp; noexcept</code></a>
  133. <p>Narrow contract lvalue reference observer of the stored exception. Constexpr propagating, never throws.</p><li>
  134. <a href="../reference/types/basic_outcome/assume_exception_lvalue_const.html" ><code>const exception_type &amp;assume_exception() const &amp; noexcept</code></a>
  135. <p>Narrow contract const lvalue reference observer of the stored exception. Constexpr propagating, never throws.</p><li>
  136. <a href="../reference/types/basic_outcome/assume_exception_rvalue_const.html" ><code>const exception_type &amp;&amp;assume_exception() const &amp;&amp; noexcept</code></a>
  137. <p>Narrow contract const rvalue reference observer of the stored exception. Constexpr propagating, never throws.</p><li>
  138. <a href="../reference/types/basic_outcome/assume_exception_rvalue.html" ><code>exception_type &amp;&amp;assume_exception() &amp;&amp; noexcept</code></a>
  139. <p>Narrow contract rvalue reference observer of the stored exception. Constexpr propagating, never throws.</p><li>
  140. <a href="../reference/types/basic_outcome/exception_lvalue.html" ><code>exception_type &amp;exception() &amp;</code></a>
  141. <p>Wide contract lvalue reference observer of the stored exception. Constexpr propagating.</p><li>
  142. <a href="../reference/types/basic_outcome/exception_lvalue_const.html" ><code>const exception_type &amp;exception() const &amp;</code></a>
  143. <p>Wide contract const lvalue reference observer of the stored exception. Constexpr propagating.</p><li>
  144. <a href="../reference/types/basic_outcome/exception_rvalue.html" ><code>exception_type &amp;&amp;exception() &amp;&amp;</code></a>
  145. <p>Wide contract rvalue reference observer of the stored exception. Constexpr propagating.</p><li>
  146. <a href="../reference/types/basic_outcome/exception_rvalue_const.html" ><code>const exception_type &amp;&amp;exception() const &amp;&amp;</code></a>
  147. <p>Wide contract const rvalue reference observer of the stored exception. Constexpr propagating.</p><li>
  148. <a href="../reference/types/basic_outcome/failure.html" ><code>exception_type failure() const noexcept</code></a>
  149. <p>Synthesising observer of the stored exception or error. Available if the traits <code>is_error_code_available&lt;T&gt;</code> and <code>is_exception_ptr_available&lt;T&gt;</code> are both true. Never throws.</p><li>
  150. <a href="../reference/types/basic_outcome/equality_basic_result.html" ><code>bool operator==(const basic_result&lt;A, B, C&gt; &amp;) const</code></a>
  151. <p>Returns true if this outcome compares equal to the other result. Constexpr and noexcept propagating.</p><li>
  152. <a href="../reference/types/basic_outcome/equality_basic_outcome.html" ><code>bool operator==(const basic_outcome&lt;A, B, C, D&gt; &amp;) const</code></a>
  153. <p>Returns true if this outcome compares equal to the other outcome. Constexpr and noexcept propagating.</p><li>
  154. <a href="../reference/types/basic_outcome/inequality_success_type.html" ><code>bool operator==(const success_type&lt;A&gt; &amp;) const</code></a>
  155. <p>Returns true if this result compares equal to the success type sugar. Constexpr and noexcept propagating.</p><li>
  156. <a href="../reference/types/basic_outcome/equality_failure_type.html" ><code>bool operator==(const failure_type&lt;A, B&gt; &amp;) const</code></a>
  157. <p>Returns true if this outcome compares equal to the failure type sugar. Constexpr and noexcept propagating.</p><li>
  158. <a href="../reference/types/basic_outcome/inequality_basic_result.html" ><code>bool operator!=(const basic_result&lt;A, B, C&gt; &amp;) const</code></a>
  159. <p>Returns true if this outcome does not compare equal to the other result. Constexpr and noexcept propagating.</p><li>
  160. <a href="../reference/types/basic_outcome/inequality_basic_outcome.html" ><code>bool operator!=(const basic_outcome&lt;A, B, C, D&gt; &amp;) const</code></a>
  161. <p>Returns true if this outcome does not compare equal to the other outcome. Constexpr and noexcept propagating.</p><li>
  162. <a href="../reference/types/basic_outcome/equality_success_type.html" ><code>bool operator!=(const success_type&lt;A&gt; &amp;) const</code></a>
  163. <p>Returns true if this outcome does not compare equal to the success type sugar. Constexpr and noexcept propagating.</p><li>
  164. <a href="../reference/types/basic_outcome/inequality_failure_type.html" ><code>bool operator!=(const failure_type&lt;A, B&gt; &amp;) const</code></a>
  165. <p>Returns true if this outcome does not compare equal to the failure type sugar. Constexpr and noexcept propagating.</p><li>
  166. <a href="../reference/types/basic_outcome/swap.html" ><code>void swap(basic_outcome &amp;)</code></a>
  167. <p>Swap one basic_outcome with another, with the strong guarantee. Noexcept propagating.</p><li>
  168. <a href="../reference/types/basic_outcome/as_failure_lvalue.html" ><code>failure_type&lt;error_type, exception_type&gt; as_failure() const &amp;</code></a>
  169. <p>Return the output from free function <code>failure()</code> containing a copy of any errored and/or excepted state.</p><li>
  170. <a href="../reference/types/basic_outcome/as_failure_rvalue.html" ><code>failure_type&lt;error_type, exception_type&gt; as_failure() &amp;&amp;</code></a>
  171. <p>Return the output from free function <code>failure()</code> containing a move of any errored and/or excepted state.</p></li></ol><li>
  172. <a href="../reference/types/basic_result.html" ><code>basic_result&lt;T, E, NoValuePolicy&gt;</code></a>
  173. <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&rsquo;t there.</p><ol><li>
  174. <a href="../reference/types/basic_result/default.html" ><code>basic_result() = delete</code></a>
  175. <p>The default constructor (disabled).</p><li>
  176. <a href="../reference/types/basic_result/move_constructor.html" ><code>basic_result(basic_result &amp;&amp;)</code></a>
  177. <p>Move constructor. Constexpr, triviality and noexcept propagating.</p><li>
  178. <a href="../reference/types/basic_result/copy_constructor.html" ><code>basic_result(const basic_result &amp;)</code></a>
  179. <p>Copy constructor. Constexpr, triviality and noexcept propagating.</p><li>
  180. <a href="../reference/types/basic_result/move_assignment.html" ><code>basic_result &amp;operator=(basic_result &amp;&amp;)</code></a>
  181. <p>Move assignment. Constexpr, triviality and noexcept propagating.</p><li>
  182. <a href="../reference/types/basic_result/copy_assignment.html" ><code>basic_result &amp;operator=(const basic_result &amp;)</code></a>
  183. <p>Copy assignment. Constexpr, triviality and noexcept propagating.</p><li>
  184. <a href="../reference/types/basic_result/destructor.html" ><code>~basic_result()</code></a>
  185. <p>Destructor. Constexpr, triviality and noexcept propagating.</p><li>
  186. <a href="../reference/types/basic_result/disabling_catchall.html" ><code>basic_result(Args...) = delete</code></a>
  187. <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>
  188. <a href="../reference/types/basic_result/disabling_implicit_constructor.html" ><code>basic_result(X &amp;&amp;) = delete</code></a>
  189. <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>
  190. <a href="../reference/types/basic_result/implicit_value_converting_constructor.html" ><code>basic_result(R &amp;&amp;)</code></a>
  191. <p>Implicit <code>value_type</code> constructor. Available if <code>predicate::enable_value_converting_constructor&lt;R&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  192. <a href="../reference/types/basic_result/implicit_error_converting_constructor.html" ><code>basic_result(S &amp;&amp;)</code></a>
  193. <p>Implicit <code>error_type</code> constructor. Available if <code>predicate::enable_error_converting_constructor&lt;S&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  194. <a href="../reference/types/basic_result/implicit_error_condition_converting_constructor.html" ><code>basic_result(ErrorCondEnum &amp;&amp;)</code></a>
  195. <p>Implicit <code>error_type</code> from <code>ErrorCondEnum</code> constructor. Available if <code>predicate::enable_error_condition_converting_constructor&lt;ErrorCondEnum&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  196. <a href="../reference/types/basic_result/explicit_valueorerror_converting_constructor.html" ><code>explicit basic_result(ValueOrError&lt;T, E&gt; &amp;&amp;)</code></a>
  197. <p>Explicit converting constructor from <code>ValueOrError&lt;T, E&gt;</code> concept matching types. Available if <code>convert::value_or_error&lt;&gt;</code> permits it. Constexpr, triviality and noexcept propagating.</p><li>
  198. <a href="../reference/types/basic_result/explicit_copy_converting_constructor.html" ><code>explicit basic_result(const basic_result&lt;R, S, P&gt; &amp;)</code></a>
  199. <p>Explicit converting copy constructor from compatible <code>basic_result</code>. Available if <code>predicate::enable_compatible_conversion&lt;R, S, P&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  200. <a href="../reference/types/basic_result/explicit_move_converting_constructor.html" ><code>explicit basic_result(basic_result&lt;R, S, P&gt; &amp;&amp;)</code></a>
  201. <p>Explicit converting move constructor from compatible <code>basic_result</code>. Available if <code>predicate::enable_compatible_conversion&lt;R, S, P&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  202. <a href="../reference/types/basic_result/explicit_make_error_code_copy_converting_constructor.html" ><code>explicit basic_result(const basic_result&lt;R, S, P&gt; &amp;)</code></a>
  203. <p>Explicit converting copy constructor from compatible <code>basic_result</code>. Available if <code>predicate::enable_make_error_code_compatible_conversion&lt;R, S, P&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  204. <a href="../reference/types/basic_result/explicit_make_error_code_move_converting_constructor.html" ><code>explicit basic_result(basic_result&lt;R, S, P&gt; &amp;&amp;)</code></a>
  205. <p>Explicit converting move constructor from compatible <code>basic_result</code>. Available if <code>predicate::enable_make_error_code_compatible_conversion&lt;R, S, P&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  206. <a href="../reference/types/basic_result/explicit_make_exception_ptr_copy_converting_constructor.html" ><code>explicit basic_result(const basic_result&lt;R, S, P&gt; &amp;)</code></a>
  207. <p>Explicit converting copy constructor from compatible <code>basic_result</code>. Available if <code>predicate::enable_make_exception_ptr_compatible_conversion&lt;R, S, P&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  208. <a href="../reference/types/basic_result/explicit_make_exception_ptr_move_converting_constructor.html" ><code>explicit basic_result(basic_result&lt;R, S, P&gt; &amp;&amp;)</code></a>
  209. <p>Explicit converting move constructor from compatible <code>basic_result</code>. Available if <code>predicate::enable_make_exception_ptr_compatible_conversion&lt;R, S, P&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  210. <a href="../reference/types/basic_result/explicit_inplace_value_constructor.html" ><code>explicit basic_result(in_place_type_t&lt;value_type_if_enabled&gt;, Args ...)</code></a>
  211. <p>Explicit inplace value constructor. Available if <code>predicate::enable_inplace_value_constructor&lt;Args ...&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  212. <a href="../reference/types/basic_result/explicit_inplace_value_constructor_il.html" ><code>explicit basic_result(in_place_type_t&lt;value_type_if_enabled&gt;, std::initializer_list&lt;U&gt;, Args ...)</code></a>
  213. <p>Explicit inplace value constructor. Available if <code>predicate::enable_inplace_value_constructor&lt;std::initializer_list&lt;U&gt;, Args ...&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  214. <a href="../reference/types/basic_result/explicit_inplace_error_constructor.html" ><code>explicit basic_result(in_place_type_t&lt;error_type_if_enabled&gt;, Args ...)</code></a>
  215. <p>Explicit inplace error constructor. Available if <code>predicate::enable_inplace_error_constructor&lt;Args ...&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  216. <a href="../reference/types/basic_result/explicit_inplace_error_constructor_il.html" ><code>explicit basic_result(in_place_type_t&lt;error_type_if_enabled&gt;, std::initializer_list&lt;U&gt;, Args ...)</code></a>
  217. <p>Explicit inplace error constructor. Available if <code>predicate::enable_inplace_error_constructor&lt;std::initializer_list&lt;U&gt;, Args ...&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  218. <a href="../reference/types/basic_result/implicit_inplace_value_error_constructor.html" ><code>basic_result(A1 &amp;&amp;, A2 &amp;&amp;, Args ...)</code></a>
  219. <p>Implicit inplace value or error constructor. Available if <code>predicate::enable_inplace_value_error_constructor&lt;A1, A2, Args ...&gt;</code> is true. Constexpr, triviality and noexcept propagating.</p><li>
  220. <a href="../reference/types/basic_result/implicit_success_copy_constructor.html" ><code>basic_result(const success_type&lt;T&gt; &amp;)</code></a>
  221. <p>Implicit value-from-success-type-sugar copy constructor. Available if <code>predicate::enable_compatible_conversion&lt;T, void, void&gt;</code> is true, or <code>T</code> is <code>void</code>. Constexpr, triviality and noexcept propagating.</p><li>
  222. <a href="../reference/types/basic_result/implicit_success_move_constructor.html" ><code>basic_result(success_type&lt;T&gt; &amp;&amp;)</code></a>
  223. <p>Implicit value-from-success-type-sugar move constructor. Available if <code>predicate::enable_compatible_conversion&lt;T, void, void&gt;</code> is true, or <code>T</code> is <code>void</code>. Constexpr, triviality and noexcept propagating.</p><li>
  224. <a href="../reference/types/basic_result/implicit_failure_copy_constructor.html" ><code>basic_result(const failure_type&lt;T&gt; &amp;)</code></a>
  225. <p>Implicit error-from-failure-type-sugar copy constructor. Available if <code>predicate::enable_compatible_conversion&lt;void, T, void&gt;</code> is true, or <code>T</code> is <code>void</code>. Constexpr, triviality and noexcept propagating.</p><li>
  226. <a href="../reference/types/basic_result/implicit_failure_move_constructor.html" ><code>basic_result(failure_type&lt;T&gt; &amp;&amp;)</code></a>
  227. <p>Implicit error-from-failure-type-sugar move constructor. Available if <code>predicate::enable_compatible_conversion&lt;void, T, void&gt;</code> is true, or <code>T</code> is <code>void</code>. Constexpr, triviality and noexcept propagating.</p><li>
  228. <a href="../reference/types/basic_result/implicit_failure_make_error_code_copy_constructor.html" ><code>basic_result(const failure_type&lt;T&gt; &amp;)</code></a>
  229. <p>Implicit error-from-failure-type-sugar copy constructor. Available if <code>predicate::enable_make_error_code_compatible_conversion&lt;void, T, void&gt;</code> is true, or <code>T</code> is <code>void</code>. Constexpr, triviality and noexcept propagating.</p><li>
  230. <a href="../reference/types/basic_result/implicit_failure_make_error_code_move_constructor.html" ><code>basic_result(failure_type&lt;T&gt; &amp;&amp;)</code></a>
  231. <p>Implicit error-from-failure-type-sugar move constructor. Available if <code>predicate::enable_make_error_code_compatible_conversion&lt;void, T, void&gt;</code> is true, or <code>T</code> is <code>void</code>. Constexpr, triviality and noexcept propagating.</p><li>
  232. <a href="../reference/types/basic_result/implicit_failure_make_exception_ptr_copy_constructor.html" ><code>basic_result(const failure_type&lt;T&gt; &amp;)</code></a>
  233. <p>Implicit error-from-failure-type-sugar copy constructor. Available if <code>predicate::enable_make_exception_ptr_compatible_conversion&lt;void, T, void&gt;</code> is true, or <code>T</code> is <code>void</code>. Constexpr, triviality and noexcept propagating.</p><li>
  234. <a href="../reference/types/basic_result/implicit_failure_make_exception_ptr_move_constructor.html" ><code>basic_result(failure_type&lt;T&gt; &amp;&amp;)</code></a>
  235. <p>Implicit error-from-failure-type-sugar move constructor. Available if <code>predicate::enable_make_exception_ptr_compatible_conversion&lt;void, T, void&gt;</code> is true, or <code>T</code> is <code>void</code>. Constexpr, triviality and noexcept propagating.</p><li>
  236. <a href="../reference/types/basic_result/operator_bool.html" ><code>explicit operator bool() const noexcept</code></a>
  237. <p>Returns true if a value is present. Constexpr, never throws.</p><li>
  238. <a href="../reference/types/basic_result/has_value.html" ><code>bool has_value() const noexcept</code></a>
  239. <p>Returns true if a value is present. Constexpr, never throws.</p><li>
  240. <a href="../reference/types/basic_result/has_error.html" ><code>bool has_error() const noexcept</code></a>
  241. <p>Returns true if an error is present. Constexpr, never throws.</p><li>
  242. <a href="../reference/types/basic_result/has_exception.html" ><code>bool has_exception() const noexcept</code></a>
  243. <p>Always returns false for <code>basic_result</code>. Constexpr, never throws.</p><li>
  244. <a href="../reference/types/basic_result/has_failure.html" ><code>bool has_failure() const noexcept</code></a>
  245. <p>Returns true if there is either an error or an exception. Constexpr, never throws.</p><li>
  246. <a href="../reference/types/basic_result/has_lost_consistency.html" ><code>bool has_lost_consistency() const noexcept</code></a>
  247. <p>Returns true if a preceding swap involving this object failed to preserve the strong guarantee. Constexpr, never throws.</p><li>
  248. <a href="../reference/types/basic_result/assume_value_lvalue.html" ><code>value_type &amp;assume_value() &amp; noexcept</code></a>
  249. <p>Narrow contract lvalue reference observer of any value present. Constexpr propagating, never throws.</p><li>
  250. <a href="../reference/types/basic_result/assume_value_lvalue_const.html" ><code>const value_type &amp;assume_value() const &amp; noexcept</code></a>
  251. <p>Narrow contract const lvalue reference observer of any value present. Constexpr propagating, never throws.</p><li>
  252. <a href="../reference/types/basic_result/assume_value_rvalue.html" ><code>value_type &amp;&amp;assume_value() &amp;&amp; noexcept</code></a>
  253. <p>Narrow contract rvalue reference observer of any value present. Constexpr propagating, never throws.</p><li>
  254. <a href="../reference/types/basic_result/assume_value_rvalue_const.html" ><code>const value_type &amp;&amp;assume_value() const &amp;&amp; noexcept</code></a>
  255. <p>Narrow contract const rvalue reference observer of any value present. Constexpr propagating, never throws.</p><li>
  256. <a href="../reference/types/basic_result/value_lvalue.html" ><code>value_type &amp;value() &amp;</code></a>
  257. <p>Wide contract lvalue reference observer of any value present. Constexpr propagating.</p><li>
  258. <a href="../reference/types/basic_result/value_lvalue_const.html" ><code>const value_type &amp;value() const &amp;</code></a>
  259. <p>Wide contract const lvalue reference observer of any value present. Constexpr propagating.</p><li>
  260. <a href="../reference/types/basic_result/value_rvalue.html" ><code>value_type &amp;&amp;value() &amp;&amp;</code></a>
  261. <p>Wide contract rvalue reference observer of any value present. Constexpr propagating.</p><li>
  262. <a href="../reference/types/basic_result/value_rvalue_const.html" ><code>const value_type &amp;&amp;value() const &amp;&amp;</code></a>
  263. <p>Wide contract const rvalue reference observer of any value present. Constexpr propagating.</p><li>
  264. <a href="../reference/types/basic_result/assume_error_lvalue.html" ><code>error_type &amp;assume_error() &amp; noexcept</code></a>
  265. <p>Narrow contract lvalue reference observer of the stored error. Constexpr propagating, never throws.</p><li>
  266. <a href="../reference/types/basic_result/assume_error_lvalue_const.html" ><code>const error_type &amp;assume_error() const &amp; noexcept</code></a>
  267. <p>Narrow contract const lvalue reference observer of the stored error. Constexpr propagating, never throws.</p><li>
  268. <a href="../reference/types/basic_result/assume_error_rvalue.html" ><code>error_type &amp;&amp;assume_error() &amp;&amp; noexcept</code></a>
  269. <p>Narrow contract rvalue reference observer of the stored error. Constexpr propagating, never throws.</p><li>
  270. <a href="../reference/types/basic_result/assume_error_rvalue_const.html" ><code>const error_type &amp;&amp;assume_error() const &amp;&amp; noexcept</code></a>
  271. <p>Narrow contract const rvalue reference observer of the stored error. Constexpr propagating, never throws.</p><li>
  272. <a href="../reference/types/basic_result/error_lvalue.html" ><code>error_type &amp;error() &amp;</code></a>
  273. <p>Wide contract lvalue reference observer of the stored error. Constexpr propagating.</p><li>
  274. <a href="../reference/types/basic_result/error_lvalue_const.html" ><code>const error_type &amp;error() const &amp;</code></a>
  275. <p>Wide contract const lvalue reference observer of the stored error. Constexpr propagating.</p><li>
  276. <a href="../reference/types/basic_result/error_rvalue.html" ><code>error_type &amp;&amp;error() &amp;&amp;</code></a>
  277. <p>Wide contract rvalue reference observer of the stored error. Constexpr propagating.</p><li>
  278. <a href="../reference/types/basic_result/error_rvalue_const.html" ><code>const error_type &amp;&amp;error() const &amp;&amp;</code></a>
  279. <p>Wide contract const rvalue reference observer of the stored error. Constexpr propagating.</p><li>
  280. <a href="../reference/types/basic_result/equality_basic_result.html" ><code>bool operator==(const basic_result&lt;A, B, C&gt; &amp;) const</code></a>
  281. <p>Returns true if this result compares equal to the other result. Constexpr and noexcept propagating.</p><li>
  282. <a href="../reference/types/basic_result/inequality_success_type.html" ><code>bool operator==(const success_type&lt;A&gt; &amp;) const</code></a>
  283. <p>Returns true if this result compares equal to the success type sugar. Constexpr and noexcept propagating.</p><li>
  284. <a href="../reference/types/basic_result/equality_failure_type.html" ><code>bool operator==(const failure_type&lt;A, void&gt; &amp;) const</code></a>
  285. <p>Returns true if this result compares equal to the failure type sugar. Constexpr and noexcept propagating.</p><li>
  286. <a href="../reference/types/basic_result/inequality_basic_result.html" ><code>bool operator!=(const basic_result&lt;A, B, C&gt; &amp;) const</code></a>
  287. <p>Returns true if this result does not compare equal to the other result. Constexpr and noexcept propagating.</p><li>
  288. <a href="../reference/types/basic_result/equality_success_type.html" ><code>bool operator!=(const success_type&lt;A&gt; &amp;) const</code></a>
  289. <p>Returns true if this result does not compare equal to the success type sugar. Constexpr and noexcept propagating.</p><li>
  290. <a href="../reference/types/basic_result/inequality_failure_type.html" ><code>bool operator!=(const failure_type&lt;A, void&gt; &amp;) const</code></a>
  291. <p>Returns true if this result does not compare equal to the failure type sugar. Constexpr and noexcept propagating.</p><li>
  292. <a href="../reference/types/basic_result/swap.html" ><code>void swap(basic_result &amp;)</code></a>
  293. <p>Swap one basic_result with another, with the strong guarantee. Noexcept propagating.</p><li>
  294. <a href="../reference/types/basic_result/as_failure_lvalue.html" ><code>auto as_failure() const &amp;</code></a>
  295. <p>Return the output from free function <code>failure()</code> containing a copy of any errored state.</p><li>
  296. <a href="../reference/types/basic_result/as_failure_rvalue.html" ><code>auto as_failure() &amp;&amp;</code></a>
  297. <p>Return the output from free function <code>failure()</code> containing a move of any errored state.</p></li></ol><li>
  298. <a href="../reference/types/bad_outcome_access.html" ><code>bad_outcome_access</code></a>
  299. <p>Exception type publicly inheriting from <code>std::logic_error</code> indicating an incorrect observation of value or error or exception occurred.</p><li>
  300. <a href="../reference/types/bad_result_access_with.html" ><code>bad_result_access_with&lt;EC&gt;</code></a>
  301. <p>Exception type publicly inheriting from <code>bad_result_access</code> indicating an incorrect observation of value occurred, supplying the error value.</p><li>
  302. <a href="../reference/types/bad_result_access.html" ><code>bad_result_access</code></a>
  303. <p>Exception type publicly inheriting from <code>std::logic_error</code> indicating an incorrect observation of value or error occurred.</p><li>
  304. <a href="../reference/types/failure_type.html" ><code>failure_type&lt;EC, EP = void&gt;</code></a>
  305. <p>Type sugar for constructing an unsuccessful result or outcome.</p><li>
  306. <a href="../reference/types/in_place_type_t.html" ><code>in_place_type_t&lt;T&gt;</code></a>
  307. <p>Either <code>std::in_place_type_t&lt;T&gt;</code> or a local emulation, depending on the <code>BOOST_OUTCOME_USE_STD_IN_PLACE_TYPE</code> macro.</p><li>
  308. <a href="../reference/types/success_type.html" ><code>success_type&lt;T&gt;</code></a>
  309. <p>Type sugar for constructing a successful result or outcome.</p></li></ol>
  310. </div><p><small>Last revised: December 13, 2018 at 21:10:19 UTC</small></p>
  311. <hr>
  312. <div class="spirit-nav">
  313. <a accesskey="p" href="../reference/policies/throw_bad_result_access.html"><img src="../images/prev.png" alt="Prev"></a>
  314. <a accesskey="u" href="../reference.html"><img src="../images/up.png" alt="Up"></a>
  315. <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>
  316. </html>