• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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>base - 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/policies.html"><img src="../../images/prev.png" alt="Prev"></a>
11    <a accesskey="u" href="../../reference/policies.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/policies/base/ub.html"><img src="../../images/next.png" alt="Next"></a></div><div id="content">
13
14  <div class="titlepage"><div><div><h1 style="clear: both"><code>base</code></h1></div></div></div>
15
16
17<p>Implements the base class of most policy classes defining the narrow observer policies.</p>
18
19<p><em>Requires</em>: Nothing.</p>
20
21<p><em>Namespace</em>: <code>BOOST_OUTCOME_V2_NAMESPACE::policy</code></p>
22
23<p><em>Header</em>: <code>&lt;boost/outcome/policy/base.hpp&gt;</code></p>
24
25<h3 id="protected-member-functions">Protected member functions</h3>
26
27<h4 id="special">Special</h4>
28
29<ol class="children children-li"><li>
30	<a href="../../reference/policies/base/ub.html" ><code>static void _ub(Impl &amp;&amp;)</code></a>
31<p>Special function which causes noticeable hard undefined behaviour.</p></li></ol>
32
33<h4 id="observers">Observers</h4>
34
35<ol class="children children-li"><li>
36    <a href="../../reference/policies/base/has_value.html" ><code>static bool _has_value(Impl &amp;&amp;) noexcept</code></a>
37<p>Returns true if a value is present in the implementation passed in. Constexpr, never throws.</p><li>
38    <a href="../../reference/policies/base/has_error.html" ><code>static bool _has_error(Impl &amp;&amp;) noexcept</code></a>
39<p>Returns true if an error is present in the implementation passed in. Constexpr, never throws.</p><li>
40    <a href="../../reference/policies/base/has_exception.html" ><code>static bool _has_exception(Impl &amp;&amp;) noexcept</code></a>
41<p>Returns true if an exception is present in the implementation passed in. Constexpr, never throws.</p><li>
42    <a href="../../reference/policies/base/has_error_is_errno.html" ><code>static bool _has_error_is_errno(Impl &amp;&amp;) noexcept</code></a>
43<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>
44    <a href="../../reference/policies/base/value.html" ><code>static auto &amp;&amp;_value(Impl &amp;&amp;) noexcept</code></a>
45<p>Returns a reference to the value in the implementation passed in. Constexpr, never throws.</p><li>
46    <a href="../../reference/policies/base/error.html" ><code>static auto &amp;&amp;_error(Impl &amp;&amp;) noexcept</code></a>
47<p>Returns a reference to the error in the implementation passed in. Constexpr, never throws.</p><li>
48    <a href="../../reference/policies/base/exception.html" ><code>static auto &amp;&amp;_exception(Impl &amp;&amp;) noexcept</code></a>
49<p>Returns a reference to the exception in the implementation passed in. Constexpr, never throws.</p></li></ol>
50
51<h4 id="modifiers">Modifiers</h4>
52
53<ol class="children children-li"><li>
54    <a href="../../reference/policies/base/set_has_value.html" ><code>static void _set_has_value(Impl &amp;&amp;, bool) noexcept</code></a>
55<p>Sets whether the implementation has a value. Constexpr, never throws.</p><li>
56    <a href="../../reference/policies/base/set_has_error.html" ><code>static void _set_has_error(Impl &amp;&amp;, bool) noexcept</code></a>
57<p>Sets whether the implementation has an error. Constexpr, never throws.</p><li>
58    <a href="../../reference/policies/base/set_has_exception.html" ><code>static void _set_has_exception(Impl &amp;&amp;, bool) noexcept</code></a>
59<p>Sets whether the implementation has an exception. Constexpr, never throws.</p><li>
60    <a href="../../reference/policies/base/set_has_error_is_errno.html" ><code>static void _set_has_exception(Impl &amp;&amp;, bool) noexcept</code></a>
61<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></ol>
62
63<h3 id="public-member-functions">Public member functions</h3>
64
65<ol class="children children-li"><li>
66    <a href="../../reference/policies/base/narrow_value_check.html" ><code>static void narrow_value_check(Impl &amp;&amp;) noexcept</code></a>
67<p>Observer policy performing hard UB if no value is present. Constexpr, never throws.</p><li>
68    <a href="../../reference/policies/base/narrow_error_check.html" ><code>static void narrow_error_check(Impl &amp;&amp;) noexcept</code></a>
69<p>Observer policy performing hard UB if no error is present. Constexpr, never throws.</p><li>
70    <a href="../../reference/policies/base/narrow_exception_check.html" ><code>static void narrow_exception_check(Impl &amp;&amp;) noexcept</code></a>
71<p>Observer policy performing hard UB if no exception is present. Constexpr, never throws.</p></li></ol>
72
73
74
75
76
77
78
79        </div><p><small>Last revised: January 22, 2019 at 01:11:40 UTC</small></p>
80<hr>
81<div class="spirit-nav">
82<a accesskey="p" href="../../reference/policies.html"><img src="../../images/prev.png" alt="Prev"></a>
83    <a accesskey="u" href="../../reference/policies.html"><img src="../../images/up.png" alt="Up"></a>
84    <a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../../reference/policies/base/ub.html"><img src="../../images/next.png" alt="Next"></a></div></body>
85</html>
86