outcome/doc/html/reference/policies.html
2019-12-01 13:32:32 +00:00

79 lines
7.9 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>Policies - 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 class="spirit-nav">
<a accesskey="p" href="../reference/traits/type_can_be_used_in_basic_result.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/policies/base.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both">Policies</h1></div></div></div>
<ol class="children children-li"><li>
<a href="../reference/policies/base.html" ><code>base</code></a>
<p>Base class of most policy classes defining the narrow observer policies.</p><ol><li>
<a href="../reference/policies/base/ub.html" ><code>static void _ub(Impl &amp;&amp;)</code></a>
<p>Special function which causes noticeable hard undefined behaviour.</p><li>
<a href="../reference/policies/base/has_value.html" ><code>static bool _has_value(Impl &amp;&amp;) noexcept</code></a>
<p>Returns true if a value is present in the implementation passed in. Constexpr, never throws.</p><li>
<a href="../reference/policies/base/has_error.html" ><code>static bool _has_error(Impl &amp;&amp;) noexcept</code></a>
<p>Returns true if an error is present in the implementation passed in. Constexpr, never throws.</p><li>
<a href="../reference/policies/base/has_exception.html" ><code>static bool _has_exception(Impl &amp;&amp;) noexcept</code></a>
<p>Returns true if an exception is present in the implementation passed in. Constexpr, never throws.</p><li>
<a href="../reference/policies/base/has_error_is_errno.html" ><code>static bool _has_error_is_errno(Impl &amp;&amp;) noexcept</code></a>
<p>Returns true if the error code in the implementation passed in has a domain or category matching that of POSIX <code>errno</code>. Constexpr, never throws.</p><li>
<a href="../reference/policies/base/value.html" ><code>static auto &amp;&amp;_value(Impl &amp;&amp;) noexcept</code></a>
<p>Returns a reference to the value in the implementation passed in. Constexpr, never throws.</p><li>
<a href="../reference/policies/base/error.html" ><code>static auto &amp;&amp;_error(Impl &amp;&amp;) noexcept</code></a>
<p>Returns a reference to the error in the implementation passed in. Constexpr, never throws.</p><li>
<a href="../reference/policies/base/exception.html" ><code>static auto &amp;&amp;_exception(Impl &amp;&amp;) noexcept</code></a>
<p>Returns a reference to the exception in the implementation passed in. Constexpr, never throws.</p><li>
<a href="../reference/policies/base/set_has_value.html" ><code>static void _set_has_value(Impl &amp;&amp;, bool) noexcept</code></a>
<p>Sets whether the implementation has a value. Constexpr, never throws.</p><li>
<a href="../reference/policies/base/set_has_error.html" ><code>static void _set_has_error(Impl &amp;&amp;, bool) noexcept</code></a>
<p>Sets whether the implementation has an error. Constexpr, never throws.</p><li>
<a href="../reference/policies/base/set_has_exception.html" ><code>static void _set_has_exception(Impl &amp;&amp;, bool) noexcept</code></a>
<p>Sets whether the implementation has an exception. Constexpr, never throws.</p><li>
<a href="../reference/policies/base/set_has_error_is_errno.html" ><code>static void _set_has_exception(Impl &amp;&amp;, bool) noexcept</code></a>
<p>Sets whether the implementation&rsquo;s error code has a domain or category matching that of POSIX <code>errno</code>. Constexpr, never throws.</p><li>
<a href="../reference/policies/base/narrow_value_check.html" ><code>static void narrow_value_check(Impl &amp;&amp;) noexcept</code></a>
<p>Observer policy performing hard UB if no value is present. Constexpr, never throws.</p><li>
<a href="../reference/policies/base/narrow_error_check.html" ><code>static void narrow_error_check(Impl &amp;&amp;) noexcept</code></a>
<p>Observer policy performing hard UB if no error is present. Constexpr, never throws.</p><li>
<a href="../reference/policies/base/narrow_exception_check.html" ><code>static void narrow_exception_check(Impl &amp;&amp;) noexcept</code></a>
<p>Observer policy performing hard UB if no exception is present. Constexpr, never throws.</p></li></ol><li>
<a href="../reference/policies/all_narrow.html" ><code>all_narrow</code></a>
<p>Policy class defining that hard undefined behaviour should occur on incorrect narrow and wide value, error or exception observation. Inherits publicly from <code>base</code>.</p><li>
<a href="../reference/policies/error_code_throw_as_system_error_outcome.html" ><code>error_code_throw_as_system_error&lt;T, EC, EP&gt;</code></a>
<p>Policy class defining that <code>EP</code> ought to be rethrown if possible, then the ADL discovered free function <code>outcome_throw_as_system_error_with_payload()</code> should be called on incorrect wide value observation. Inherits publicly from <code>base</code>. Can only be used with <code>basic_outcome</code>.</p><li>
<a href="../reference/policies/error_code_throw_as_system_error_result.html" ><code>error_code_throw_as_system_error&lt;T, EC, void&gt;</code></a>
<p>Policy class defining that the ADL discovered free function <code>outcome_throw_as_system_error_with_payload()</code> should be called on incorrect wide value observation. Inherits publicly from <code>base</code>. Can only be used with <code>basic_result</code>.</p><li>
<a href="../reference/policies/exception_ptr_rethrow_outcome.html" ><code>exception_ptr_rethrow&lt;T, EC, EP&gt;</code></a>
<p>Policy class defining that the ADL discovered free function <code>rethrow_exception()</code> should be called on incorrect wide value observation. Inherits publicly from <code>base</code>. Can only be used with <code>basic_outcome</code>.</p><li>
<a href="../reference/policies/exception_ptr_rethrow_result.html" ><code>exception_ptr_rethrow&lt;T, EC, void&gt;</code></a>
<p>Policy class defining that the ADL discovered free function <code>rethrow_exception()</code> should be called on incorrect wide value observation. Inherits publicly from <code>base</code>. Can only be used with <code>basic_result</code>.</p><li>
<a href="../reference/policies/fail_to_compile_observers.html" ><code>fail_to_compile_observers</code></a>
<p>Policy class defining that a static assertion should occur upon compilation of the wide value, error or exception observation. Inherits publicly from <code>base</code>.</p><li>
<a href="../reference/policies/terminate.html" ><code>terminate</code></a>
<p>Policy class defining that <code>std::terminate()</code> should be called on incorrect wide value, error or exception observation. Inherits publicly from <code>base</code>.</p><li>
<a href="../reference/policies/throw_bad_result_access.html" ><code>throw_bad_result_access&lt;EC&gt;</code></a>
<p>Policy class defining that <code>bad_result_access_with&lt;EC&gt;</code> should be thrown on incorrect wide value observation. Inherits publicly from <code>base</code>.</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/traits/type_can_be_used_in_basic_result.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/policies/base.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>