error_code_throw_as_system_error_result.html 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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>error_code_throw_as_system_error&lt;T, EC, void&gt; - 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/error_code_throw_as_system_error_outcome.html"><img src="../../images/prev.png" alt="Prev"></a>
  10. <a accesskey="u" href="../../reference/policies.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/policies/exception_ptr_rethrow_outcome.html"><img src="../../images/next.png" alt="Next"></a></div><div id="content">
  12. <div class="titlepage"><div><div><h1 style="clear: both"><code>error_code_throw_as_system_error&lt;T, EC, void&gt;</code></h1></div></div></div>
  13. <p><em>Note</em>: This policy class specialisation can only be used with <code>basic_result</code>, not <code>basic_outcome</code>. Use <a href="../../reference/policies/error_code_throw_as_system_error_outcome.html" class="api-reference"><code>error_code_throw_as_system_error&lt;T, EC, EP&gt;</code></a>
  14. with <code>basic_outcome</code>.</p>
  15. <p>Policy class defining that the ADL discovered free function <code>outcome_throw_as_system_error_with_payload(impl.assume_error())</code> should be called on incorrect wide value observation. <a href="../../reference/functions/policy.html">Some precanned overloads of that function are listed here</a>.</p>
  16. <p>Incorrect wide error observation performs:</p>
  17. <div class="highlight"><pre class="chroma"><code class="language-c++" data-lang="c++"><span class="n">BOOST_OUTCOME_THROW_EXCEPTION</span><span class="p">(</span><span class="n">bad_result_access</span><span class="p">(</span><span class="s">&#34;no error&#34;</span><span class="p">));</span>
  18. </code></pre></div>
  19. <p>Inherits publicly from <a href="../../reference/policies/base.html" class="api-reference"><code>base</code></a>
  20. , and its narrow value, error and exception observer policies are inherited from there.</p>
  21. <p><em>Requires</em>: Nothing.</p>
  22. <p><em>Namespace</em>: <code>BOOST_OUTCOME_V2_NAMESPACE::policy</code></p>
  23. <p><em>Header</em>: <code>&lt;boost/outcome/policy/result_error_code_throw_as_system_error.hpp&gt;</code></p>
  24. </div><p><small>Last revised: February 01, 2019 at 23:42:52 UTC</small></p>
  25. <hr>
  26. <div class="spirit-nav">
  27. <a accesskey="p" href="../../reference/policies/error_code_throw_as_system_error_outcome.html"><img src="../../images/prev.png" alt="Prev"></a>
  28. <a accesskey="u" href="../../reference/policies.html"><img src="../../images/up.png" alt="Up"></a>
  29. <a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../../reference/policies/exception_ptr_rethrow_outcome.html"><img src="../../images/next.png" alt="Next"></a></div></body>
  30. </html>