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