override_outcome_exception.html 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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>void override_outcome_exception(basic_outcome&lt;T, EC, EP, NoValuePolicy&gt; *, U &amp;&amp;) noexcept - 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/functions/hooks/hook_result_move_construction.html"><img src="../../../images/prev.png" alt="Prev"></a>
  10. <a accesskey="u" href="../../../reference/functions/hooks.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/functions/hooks/set_spare_storage.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
  12. <div class="titlepage"><div><div><h1 style="clear: both"><code>void override_outcome_exception(basic_outcome&lt;T, EC, EP, NoValuePolicy&gt; *, U &amp;&amp;) noexcept</code></h1></div></div></div>
  13. <p>Overrides the exception to something other than what was constructed. You <em>almost certainly</em> never
  14. want to use this function. A much better way of overriding the exception returned is to create
  15. a custom no-value policy which lazily synthesises a custom exception object at the point of need.</p>
  16. <p>The only reason that this function exists is because some people have very corner case needs
  17. where a custom no-value policy can&rsquo;t be used, and where move-constructing a new <code>outcome</code> from
  18. an old <code>outcome</code> with the exception state replaced isn&rsquo;t possible (e.g. when the types are
  19. non-copyable and non-moveable).</p>
  20. <p>Unless you are in a situation where no other viable alternative exists, do not use this function.</p>
  21. <p><em>Overridable</em>: Not overridable.</p>
  22. <p><em>Requires</em>: Nothing.</p>
  23. <p><em>Namespace</em>: <code>BOOST_OUTCOME_V2_NAMESPACE::hooks</code></p>
  24. <p><em>Header</em>: <code>&lt;boost/outcome/basic_outcome.hpp&gt;</code></p>
  25. </div><p><small>Last revised: January 30, 2019 at 16:16:10 UTC</small></p>
  26. <hr>
  27. <div class="spirit-nav">
  28. <a accesskey="p" href="../../../reference/functions/hooks/hook_result_move_construction.html"><img src="../../../images/prev.png" alt="Prev"></a>
  29. <a accesskey="u" href="../../../reference/functions/hooks.html"><img src="../../../images/up.png" alt="Up"></a>
  30. <a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../reference/functions/hooks/set_spare_storage.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
  31. </html>