2
0
mirror of https://github.com/boostorg/outcome.git synced 2026-01-19 04:22:13 +00:00

CI regenerates Boost.Outcome docs

This commit is contained in:
Jenkins nedprod CI
2026-01-08 19:21:24 +00:00
parent 8b76402279
commit d2ae02fb8f
553 changed files with 30031 additions and 0 deletions

21
doc/html/_footer.html Normal file
View File

@@ -0,0 +1,21 @@
<!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> - 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="u" href="./index.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="./requirements.html"><img src="./images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both"></h1></div></div></div>
</div><p><small>Last revised: January 01, 0001 at 00:00:00 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="./history.html"><img src="./images/prev.png" alt="Prev"></a>
<a accesskey="u" href="./index.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="./requirements.html"><img src="./images/next.png" alt="Next"></a></div></body>
</html>

22
doc/html/_header.html Normal file
View File

@@ -0,0 +1,22 @@
<!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> - 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="u" href="./index.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="./requirements.html"><img src="./images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both"></h1></div></div></div>
<p>Outcome 2.2 library documentation</p>
</div><p><small>Last revised: January 01, 0001 at 00:00:00 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="./history.html"><img src="./images/prev.png" alt="Prev"></a>
<a accesskey="u" href="./index.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="./requirements.html"><img src="./images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,95 @@
<!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>Future ABI stability guarantees - 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="./motivation/narrow_contract.html"><img src="./images/prev.png" alt="Prev"></a>
<a accesskey="u" href="./index.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="./tutorial.html"><img src="./images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both">Future ABI stability guarantees</h1></div></div></div>
<p>At the end of December 2021, <a href="./history.html">as had been intended and signposted from the beginning of development</a>, standalone Outcome v2.2.3 locked its ABI such that any code built with this Outcome release shall link, without recompilation, with any code built with any future Outcome release. This means that going forth, you are guaranteed that if your library returns an <code>outcome::</code><a href="./reference/aliases/result.html" class="api-reference"><code>result&lt;T, E = varies, NoValuePolicy = policy::default_policy&lt;T, E, void&gt;&gt;</code></a>
or <code>outcome::</code><a href="./reference/aliases/outcome.html" class="api-reference"><code>outcome&lt;T, EC = varies, EP = varies, NoValuePolicy = policy::default_policy&lt;T, EC, EP&gt;&gt;</code></a>
from a public API, consumers of your library are guaranteed 100% compatibility with unrecompiled library binaries when using any future version of Outcome in consuming code.</p>
<p>This is a critical use case for many large scale production use cases in industry, and to my knowledge, no other Outcome-like alternative implements this guarantee at the time of writing<sup class="footnote-ref" id="fnref:1"><a href="#fn:1">1</a></sup>. Note also that Boost.Outcome comes with no ABI guarantees, as the dependencies within Boost that Boost.Outcome uses do not have a stable ABI guarantee.</p>
<p>To ensure this guarantee going forth, a per commit CI step has been added which tests Outcome against the v2.2.3 ABI using these tools:</p>
<ul>
<li><a href="https://lvc.github.io/abi-compliance-checker/">The ABI compliance checker</a> (using its <code>abi-dumper</code> mode, not its translation unit parsing mode which is too brittle).</li>
<li><a href="https://sourceware.org/libabigail/manual/libabigail-tools.html">Sourceware&rsquo;s libabigail tooling</a>.</li>
</ul>
<p>Both tools are independent of one another, and whilst they test using the same mechanism (DWARF debug info extracted from an unoptimised shared library object), they have different implementations.</p>
<h4 id="abi-testing-implementation-notes">ABI testing implementation notes</h4>
<p>Outcome is a header only library, so to turn Outcome into a shared library suitable as input for these tools, we compile a dummy shared library which exports APIs which use Outcome. The coverage of that dummy shared library of Outcome is therefore what is actually ABI tested, rather than of Outcome itself. The dummy library locks the ABI for:</p>
<ul>
<li><code>basic_result&lt;trivial type, std::error_code, all policies&gt;</code> (i.e. union storage layout)</li>
<li><code>basic_outcome&lt;trivial type, std::error_code, trivial type, all policies&gt;</code></li>
<li><code>basic_result&lt;non-trivial type, std::error_code, all policies&gt;</code> (i.e. struct storage layout)</li>
<li><code>basic_outcome&lt;non-trivial type, std::error_code, std::exception_ptr, all policies&gt;</code></li>
<li><code>bad_result_access_with&lt;std::error_code&gt;</code></li>
<li><code>bad_outcome_access</code></li>
<li><code>atomic_eager&lt;int&gt;</code></li>
<li><code>atomic_eager&lt;basic_result&lt;trivial type, std::error_code, all policies&gt;&gt;</code></li>
<li><code>atomic_eager&lt;basic_result&lt;non-trivial type, std::error_code, all policies&gt;&gt;</code></li>
<li><code>atomic_lazy&lt;int&gt;</code></li>
<li><code>atomic_lazy&lt;basic_result&lt;trivial type, std::error_code, all policies&gt;&gt;</code></li>
<li><code>atomic_lazy&lt;basic_result&lt;non-trivial type, std::error_code, all policies&gt;&gt;</code></li>
<li><code>eager&lt;int&gt;</code></li>
<li><code>eager&lt;basic_result&lt;trivial type, std::error_code, all policies&gt;&gt;</code></li>
<li><code>eager&lt;basic_result&lt;non-trivial type, std::error_code, all policies&gt;&gt;</code></li>
<li><code>lazy&lt;int&gt;</code></li>
<li><code>lazy&lt;basic_result&lt;trivial type, std::error_code, all policies&gt;&gt;</code></li>
<li><code>lazy&lt;basic_result&lt;non-trivial type, std::error_code, all policies&gt;&gt;</code></li>
</ul>
<p>Obviously anything which any of these types touch in their implementation also gets locked in ABI, in so far as the ABI tool can deduce dependent types. If you examine the source code for the dummy shared library, you will see that we go out of our way to encode explicit lists of dependent types in template parameters, to ensure that the ABI tool definitely discovers everything.</p>
<div class="notices note" style="background: url('images/note.png') top left no-repeat padding-box padding-box;">
<div class="notices heading">note</div>
<div class="notices message"><p>Outcome.Experimental has no ABI guarantees, as WG21 LEWG is actively modifying its design as it approaches the C++ standard.</p>
</div>
</div>
<p>The following targets are tested for ABI stability:</p>
<ol>
<li><p>GCC 7.5 with libstdc++ configured with the C++ 14 standard and x64 architecture.</p></li>
<li><p>GCC 9.3 with libstdc++ configured with the C++ 17 standard and x64 architecture.</p></li>
</ol>
<p>At the time of writing, no POSIX implementation has guaranteed stability on its C++ 20 standard library ABI, so we do not test that.</p>
<p>There is currently no CI coverage of MSVC ABI stability. The ABI compliance checker can test MSVC binaries for ABI stability, however raising the ABI compliance checker on a Github Actions Windows test runner is quite a lot of work. Donations of sufficient test scripting would be welcome. Note that because the Windows and POSIX implementation is almost the same, ABI stability on POSIX will have strong impact on MSVC ABI stability i.e. MSVC ABI is unlikely to break, albeit without CI testing there are no guarantees.</p>
<div class="footnotes">
<hr />
<ol>
<li id="fn:1">libstdc++ implements a strong ABI stability guarantee and thus any future <code>std::expected&lt;T, E&gt;</code> implementation it provides will be ABI stable. However Expected offers only a small subset of the functionality which <code>outcome::result&lt;T, E&gt;</code> provides.
<a class="footnote-return" href="#fnref:1"><sup>[return]</sup></a></li>
</ol>
</div>
</div><p><small>Last revised: December 15, 2021 at 11:47:12 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="./motivation/narrow_contract.html"><img src="./images/prev.png" alt="Prev"></a>
<a accesskey="u" href="./index.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="./tutorial.html"><img src="./images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,45 @@
<!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>Review of Error Handling Frameworks - 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="./build.html"><img src="./images/prev.png" alt="Prev"></a>
<a accesskey="u" href="./index.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="./alternatives/exceptions.html"><img src="./images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both">Review of Error Handling Frameworks</h1></div></div></div>
<p>Outcome <a href="./history.html">started life in 2014</a>, entered Boost as Boost.Outcome in 2018, and therefore was amongst the very first of the major alternative error handling frameworks to standard exception throws in C++. Since then, and sometimes in reaction to Outcome&rsquo;s choice of design, alternative frameworks have appeared. This page tries to give a fairly even handed summary of those alternatives, and how they compare to Outcome in this author&rsquo;s opinion.</p>
<p>These are listed in order of approximate availability to the C++ ecosystem i.e. in order of appearance.</p>
<ol class="children children-li"><li>
<a href="./alternatives/exceptions.html" >std exception throws</a>
<p>Advantages and disadvantages of C++ exception throws</p><li>
<a href="./alternatives/error_code.html" >std error codes</a>
<p>Advantages and disadvantages of <code>std::error_code</code></p><li>
<a href="./alternatives/expected.html" >std expected</a>
<p>Advantages and disadvantages of <code>std::expected&lt;T, E&gt;</code></p><li>
<a href="./alternatives/outcome.html" >Outcome (proposed std result)</a>
<p>Advantages and disadvantages of Outcome and its proposed <code>std::result&lt;T&gt;</code></p><li>
<a href="./alternatives/leaf.html" >LEAF</a>
<p>Advantages and disadvantages of Lightweight Error Augmentation Framework</p></li></ol>
<p>My thanks to Emil Dotchevski for reviewing this summary and providing notes.</p>
</div><p><small>Last revised: January 10, 2022 at 14:29:13 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="./build.html"><img src="./images/prev.png" alt="Prev"></a>
<a accesskey="u" href="./index.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="./alternatives/exceptions.html"><img src="./images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,63 @@
<!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>std error codes - 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="../alternatives/exceptions.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../alternatives.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="../alternatives/expected.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both">std error codes</h1></div></div></div>
<p><code>std::error_code</code> came originally from <code>boost::error_code</code> which was designed around 2008 as part of implementing Filesystem and Networking. They are a simple trivially copyable type offering improved type safety and functionality over C enumerations. <a href="../motivation/std_error_code.html">You can read more about how <code>std::error_code</code> works here</a>. They were standardised in the C++ 11 standard, and have been available in Boost since 2008.</p>
<h4 id="pros">Pros:</h4>
<ul>
<li><p>Predictable runtime overhead on the happy path.</p></li>
<li><p>Predictable runtime overhead on the sad path.</p></li>
<li><p>Unbiased syntax equal for both success and failure requiring explicit code written to handle both.</p></li>
<li><p>Very little codegen bloat added to binaries (though there is a fixed absolute overhead for support libraries).</p></li>
<li><p>Once constructed, passing around <code>std::error_code</code> instances optimises well, often being passed in CPU registers.</p></li>
<li><p>Works well in all configurations of C++, including C++ exceptions and RTTI globally disabled.</p></li>
<li><p>Works well on all niche architectures, such as HPC, GPUs, DSPs and microcontrollers.</p></li>
<li><p>Ships with every standard library since C++ 11.</p></li>
</ul>
<h4 id="cons">Cons:</h4>
<ul>
<li><p>Failure to write handling code for failure means failures get silently dropped. This is disturbingly easy to do.</p></li>
<li><p>Results in branchy code, which is slow &ndash; though predictably so &ndash; for embedded controller CPUs.</p></li>
<li><p>Because the <code>std::error_category</code> instance used in construction comes from a magic static, the compiler inserts an atomic operation around every <code>std::error_code</code> construction (e.g. <a href="https://godbolt.org/z/oGaf4qe8a">https://godbolt.org/z/oGaf4qe8a</a>). This can impact optimisation on compilers with poor optimisation of atomics.</p></li>
<li><p>The payload of type <code>int</code> is incredibly constraining sometimes, especially on 64-bit platforms. It would have been much better if it were <code>intptr_t</code> instead of <code>int</code>.</p></li>
<li><p>The payload value of all bits zero has silent hard coded semantics which is incompatible with many C enumerations, which start from value zero. This can cause silent dropping of failures in a very hard to debug way.</p></li>
<li><p>How comparisons between disparate code categories (i.e. mapping) is supposed to work is non-obvious, and even standard library maintainers and many members of WG21 have been confused by it in the past.</p></li>
</ul>
<p>(Note that this long list of design caveats is what led to the proposed superseding of <code>std::error_code</code> with <code>std::error</code>, which you can use today in Outcome.Experimental. See <a href="../experimental.html">this page for more information</a>).</p>
</div><p><small>Last revised: January 10, 2022 at 14:29:13 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../alternatives/exceptions.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../alternatives.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="../alternatives/expected.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,57 @@
<!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>std exception throws - 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="../alternatives.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../alternatives.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="../alternatives/error_code.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both">std exception throws</h1></div></div></div>
<p>(Note that we assume a table-based EH implementation here, a SJLJ EH implementaton would have even happy and sad path runtime overhead. Table-based EH implementations are almost universal on x64, ARM and AArch64 targets).</p>
<p>C++ exception throws came in the original C++ 98 standard &ndash; at that time, not all the major compilers implemented them yet, and several of those who did did not have efficient implementations, plus in the original days some compiler vendors still patented things like EH implementation techniques to try and maintain a competitive advantage over rival compilers. Unlike other C++ features, enabling C++ exceptions on a code base not written with them in mind is not safe, so this led to the C++ ecosystem becoming bifurcated into exceptions-enabled and exceptions-disabled camps.</p>
<h4 id="pros">Pros:</h4>
<ul>
<li><p>Zero runtime overhead on the happy path.</p></li>
<li><p>Success-orientated syntax declutters code of failure control flow paths.</p></li>
<li><p>As a built-in language feature, probably has the least impact on optimisation of any failure handling mechanism here.</p></li>
<li><p>Ships with every standard toolchain (though may not work in some, and cannot be safely enabled for many codebases).</p></li>
</ul>
<h4 id="cons">Cons:</h4>
<ul>
<li><p>Unpredictable runtime overhead on the sad path.</p></li>
<li><p>Unacceptable runtime overhead on the sad path for real time applications.</p></li>
<li><p>Adds considerable bloat to produced binaries, which can be unacceptable for some use cases (embedded).</p></li>
<li><p>Requires RTTI to be enabled or non-standard behaviour results (which is further binary bloat).</p></li>
<li><p>Not available by tradition or convention in several major parts of the C++ ecosystem (embedded, games, audio, to a lesser extent financial).</p></li>
<li><p>Not available in many niche architectures such as HPC, GPUs, DSPs and microcontrollers.</p></li>
<li><p>Most codebases do not invest in adequate correctness testing of the silent proliferation of failure control flow paths which result in C++ exception throwing code (exception throws silently generate multitudes of slight variations of sad path control flows).</p></li>
</ul>
</div><p><small>Last revised: January 10, 2022 at 14:29:13 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../alternatives.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../alternatives.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="../alternatives/error_code.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,69 @@
<!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>std expected - 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="../alternatives/error_code.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../alternatives.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="../alternatives/outcome.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both">std expected</h1></div></div></div>
<p><code>std::expected&lt;T, E&gt;</code> came originally from an experimental monadic and generic programming library outside of Boost written by Boost and WG21 developers around 2013. Before Outcome v1, I deployed the then Expected into a large codebase and I was dismayed with the results, especially on build times. <a href="../history.html">You can read here how those experiences led me to develop Outcome v1</a>.</p>
<p><code>std::expected&lt;T, E&gt;</code> is a constrained variant type with a strong preference for the successful type <code>T</code> which it models like a <code>std::optional&lt;T&gt;</code>. If, however, there is no <code>T</code> value then it supplies an &lsquo;unexpected&rsquo; <code>E</code> value instead. <code>std::expected&lt;T, E&gt;</code> was standardised in the C++ 23 standard.</p>
<p>Outcome&rsquo;s Result type <a href="../faq.html#how-far-away-from-the-proposed-std-expected-t-e-is-outcome-s-checked-t-e">can be configured to act just like Expected if you want that</a>, however ultimately <a href="../faq.html#why-doesn-t-outcome-duplicate-std-expected-t-e-s-design">Outcome&rsquo;s Result doesn&rsquo;t solve the same problem as Expected</a>, plus Outcome models <code>std::variant&lt;T, E&gt;</code> rather than <code>std::optional&lt;T&gt;</code> which we think much superior for many use cases, which to summarise:</p>
<ul>
<li><p>If you are parsing input which may rarely contain unexpected values, Expected is the right choice here.</p></li>
<li><p>If you want an alternative to C++ exception handling i.e. a generalised whole-program error handling framework, Expected is an inferior choice to alternatives.</p></li>
</ul>
<p>Outcome recognises Expected-like types and will construct from them, which aids interoperability.</p>
<h4 id="pros">Pros:</h4>
<ul>
<li><p>Predictable runtime overhead on the happy path.</p></li>
<li><p>Predictable runtime overhead on the sad path.</p></li>
<li><p>Very little codegen bloat added to binaries (though there is a fixed absolute overhead for support libraries).</p></li>
<li><p>Variant storage means storage overhead is minimal, except when either <code>T</code> or <code>E</code> has a throwing move constructor which typically causes storage blowup.</p></li>
<li><p>Works well in all configurations of C++, including C++ exceptions and RTTI globally disabled.</p></li>
<li><p>Works well on all niche architectures, such as HPC, GPUs, DSPs and microcontrollers.</p></li>
<li><p>Ships with every standard library since C++ 23.</p></li>
</ul>
<h4 id="cons">Cons:</h4>
<ul>
<li><p>Success-orientated syntax makes doing anything with the <code>E</code> type is awkward and clunky.</p></li>
<li><p>Results in branchy code, which is slow &ndash; though predictably so &ndash; for embedded controller CPUs.</p></li>
<li><p>Failure to examine an Expected generates a compiler diagnostic, but failure to handle both failure and success does not. This can mean failures or successes get accidentally dropped.</p></li>
<li><p>Lack of a <code>try</code> operator makes use tedious and verbose.</p></li>
<li><p>Variant storage does have an outsize impact on build times in the same way widespread use of <code>std::variant</code> has. This is because implementing exception guarantees during copies and moves of non-trivially-copyable types in union storage involves a lot of work for the compiler on every use of copy and move.</p></li>
</ul>
</div><p><small>Last revised: January 10, 2022 at 14:29:13 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../alternatives/error_code.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../alternatives.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="../alternatives/outcome.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,84 @@
<!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>LEAF - 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="../alternatives/outcome.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../alternatives.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="../motivation.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both">LEAF</h1></div></div></div>
<p>As much as Outcome originated in a negative reaction to the then originally proposed <code>std::expected&lt;T, E&gt;</code>, <a href="https://boostorg.github.io/leaf/">LEAF</a> originated in a negative reaction to Outcome. Some of the perceived issues with Outcome were (<a href="https://boostorg.github.io/leaf/#rationale">LEAF&rsquo;s own rendition of this can be viewed here</a>):</p>
<ul>
<li><p>Outcome based code is visually cluttered, as both happy and sad paths appear in code.</p></li>
<li><p>Outcome based code generates branchy code at runtime, which impacts low end CPUs and first time code execution.</p></li>
<li><p>Outcome&rsquo;s Result type encodes the type of the error in the function signature, which could be considered as more brittle and problematic for large scale code refactoring<sup class="footnote-ref" id="fnref:1"><a href="#fn:1">1</a></sup>.</p></li>
<li><p>Outcome is more strongly opinionated about being the ultimate error handling framework in a program (i.e. all third party custom error handling is assumed to flow into Outcome via customisation point adapters), whereas LEAF is less strongly opinionated, and yet provides equivalent functionality.</p></li>
</ul>
<p>LEAF therefore looks more like standard C++ exception handling, but without the non-deterministic sad path at the cost of a slight impact on happy path runtime performance. LEAF&rsquo;s current design was completed in 2020.</p>
<p>If you need an error handling framework which has predictable sad path overhead unlike C++ exceptions, but you otherwise want similar syntax and use experience to C++ exceptions, LEAF is a very solid choice.</p>
<h4 id="pros">Pros:</h4>
<ul>
<li><p>Very low runtime overhead on the happy path.</p></li>
<li><p>Very low runtime overhead on the sad path.</p></li>
<li><p>Does not cause branchy code to the same extent as Outcome, and the sad path is deterministic unlike with C++ exceptions.</p></li>
<li><p>Very little codegen bloat added to binaries (though there is a fixed absolute overhead for support libraries, most of which can be compiled out using a macro if desired).</p></li>
<li><p>Unlike with any of the preceding options, failures nor successes cannot get unintentionally dropped. This is the same strength of guarantee as with C++ exceptions.</p></li>
<li><p>Works well in most configurations of C++, including C++ exceptions and RTTI globally disabled. Does not dynamically allocate memory.</p></li>
</ul>
<h4 id="cons">Cons:</h4>
<ul>
<li><p>Requires out of band storage for state e.g. thread local storage, or a global synchronised ring buffer<sup class="footnote-ref" id="fnref:2"><a href="#fn:2">2</a></sup>.</p>
<ul>
<li><p>If thread local storage is chosen as the out of band storage, transporting LEAF state across threads requires manual intervention.</p></li>
<li><p>If a global ring buffer is chosen as the out of band storage, thread synchronisation with global state is required and the ring buffer can wrap which drops state.</p></li>
</ul></li>
<li><p>Thread local storage can be problematic or even a showstopper in many niche architectures such as HPC, GPUs, DSPs and microcontrollers. Global synchronised state can introduce an unacceptable performance impact on those architectures.</p></li>
<li><p>Current compilers at the time of writing do not react well to use of thread local storage, it would seem that elision of code generation is inhibited if thread local state gets touched due to pessimistic assumptions about escape analysis. Given that this impacts all of C and C++ due to the same problem with <code>errno</code>, it is hoped that future compilers will improve this. Until then, any code which touches thread local storage or magic statics<sup class="footnote-ref" id="fnref:3"><a href="#fn:3">3</a></sup> will not optimise as well as code which does neither.</p></li>
</ul>
<div class="footnotes">
<hr />
<ol>
<li id="fn:1">In Outcome, it is strongly recommended that one chooses a single universal error type for all public APIs such as <code>std::error_code</code> or <code>error</code> from Experimental.Outcome, so if the programmer is disciplined then the function signature does not expose internal error types. Such single universal error types type erase the original error object, but still allow the original error object to be inspected. This avoids &lsquo;exception specifications&rsquo; which are widely known to not scale well.
<a class="footnote-return" href="#fnref:1"><sup>[return]</sup></a></li>
<li id="fn:2">A global synchronised ring buffer implementation does not ship with LEAF, however LEAF exposes customisation points for a bespoke thread local storage implementation which makes implementing one very straightforward.
<a class="footnote-return" href="#fnref:2"><sup>[return]</sup></a></li>
<li id="fn:3"><code>std::error_code</code> construction touches a magic static or calls an extern function, and therefore Outcome when combined with <code>std::error_code</code> also sees a codegen pessimisation. Experimental Outcome&rsquo;s <code>error</code> fixes this historical oversight.
<a class="footnote-return" href="#fnref:3"><sup>[return]</sup></a></li>
</ol>
</div>
</div><p><small>Last revised: January 10, 2022 at 14:29:13 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../alternatives/outcome.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../alternatives.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="../motivation.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,94 @@
<!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>Outcome (proposed std result) - 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="../alternatives/expected.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../alternatives.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="../alternatives/leaf.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both">Outcome (proposed std result)</h1></div></div></div>
<div class="toc"><dl class="toc">
<dt>
<dd><dl>
<dt>
<dd><dl>
<dt>
<dd><dl>
<dt><a href="#pros">Pros:</a></dt>
<dt><a href="#cons">Cons:</a></dt>
</dl></dd></dt>
</dl></dd></dt>
</dl></dd></dt>
</dl>
</div>
<p>Outcome (the library described by this documentation) originated in a negative reaction to then originally proposed <code>std::expected&lt;T, E&gt;</code>, though what got eventually standardised as <code>std::expected&lt;T, E&gt;</code> looks much more like Outcome&rsquo;s <code>result&lt;T, E&gt;</code> than the original Expected. <a href="../history.html">You can read here how those experiences led me to develop Outcome v1</a>. Outcome comes in both standalone and Boost editions, and its current design was completed in 2018.</p>
<p>Outcome&rsquo;s core is two workhorse types and a macro:</p>
<ul>
<li><a href="../reference/types/basic_result.html" class="api-reference"><code>basic_result&lt;T, E, NoValuePolicy&gt;</code></a>
</li>
<li><a href="../reference/types/basic_outcome.html" class="api-reference"><code>basic_outcome&lt;T, EC, EP, NoValuePolicy&gt;</code></a>
</li>
<li><a href="../reference/macros/try.html" class="api-reference"><code>BOOST_OUTCOME_TRY(var, expr)</code></a>
</li>
</ul>
<p>These three core items are then mixed into a veritable cornucopia of <a href="../reference/aliases.html">convenience typedefs</a> and variations to support a wide range of use cases, including <a href="../tutorial/essential/coroutines.html">in C++ coroutines</a>, plus there is extensive plumbing and customisation points for deciding how incompatible types ought to interact, or being notified of lifecycle events (e.g. capture a stack backtrace if a <code>result&lt;T, E&gt;</code> is constructed with an error).</p>
<p>Outcome perfectly propagates constexpr, triviality and <code>noexcept</code>-ness of each individual operation of the types you configure it with. It never touches dynamic memory allocation, and it has been carefully written so the compiler will optimise it out of codegen entirely wherever that is possible. It is capable of &lsquo;true moves&rsquo; for types which declare themselves &lsquo;move bitcopying compatible&rsquo; i.e. destructor calls on moved-from values are elided. &lsquo;True moves&rsquo; can have a game changing performance gain on types with virtual destructors.</p>
<p>Outcome takes a lot of care to have the least possible impact on build times, and it guarantees that a binary built with it will have stable ABI so it is safe to use in <em>really</em> large C++ codebases (standalone edition only). For interoperation with other languages, it guarantees that C code can work with Outcome data types, and it provides a C macro API header file to help with that.</p>
<p>Outcome recognises Expected-like types and will construct from them, which aids interoperability. <a href="https://wg21.link/P1028">A simplified Result type is proposed for standardisation as <code>std::result&lt;T&gt;</code></a> where the <code>E</code> type is hard coded to a proposed <code>std::error</code>. This proposed standardisation has been deployed on billions of devices at the time of writing, and <a href="../experimental.html">you can use it today via Experimental.Outcome</a>, the reference implementation.</p>
<h4 id="pros">Pros:</h4>
<ul>
<li><p>Predictable runtime overhead on the happy path.</p></li>
<li><p>Predictable runtime overhead on the sad path.</p></li>
<li><p>Very little codegen bloat added to binaries (though there is a fixed absolute overhead for support libraries if you use Outcome&rsquo;s bundled error types).</p></li>
<li><p>Neither success nor failure is prioritised during use &ndash; types will implicitly construct from both <code>T</code> and <code>E</code> if it is unambiguous, so no clunky added markup needed to return an <code>E</code>.</p></li>
<li><p>Sad path control flow is required to be explicitly specified in every situation. This significantly reduces the number of sad control flow paths in a code base, making it much easier to test all of them. It also means that sad paths get audited and checked during code reviews.</p></li>
<li><p>Macro <code>TRY</code> operator feels a bit unnatural to use, but is a god send to saving visual code clutter when all you want to say is &lsquo;handle this failure by asking my caller to handle it&rsquo;. It also works with non-Outcome types, and has its own suite of customisation points for third party extension.</p></li>
<li><p>Works well in all configurations of C++, including C++ exceptions and RTTI globally disabled.</p></li>
<li><p>Works well on all niche architectures, such as HPC, GPUs, DSPs and microcontrollers, and does not dynamically allocate memory.</p></li>
</ul>
<h4 id="cons">Cons:</h4>
<ul>
<li><p>Sad path control flow is required to be explicitly specified in every situation. For code where failure is extremely unlikely, or is not important because it always results in aborting the current operation, the added visual code clutter is unhelpful.</p></li>
<li><p>Results in branchy code, which is slow &ndash; though predictably so &ndash; for embedded controller CPUs.</p></li>
<li><p>Failure to examine an Outcome type generates a compiler diagnostic, but failure to handle both failure and success does not. This can mean failures or successes get accidentally dropped.</p></li>
<li><p>To prevent variant storage having an outsize impact on build times in the same way widespread use of <code>std::variant</code> has, Outcome only implements union storage when both <code>T</code> and <code>E</code> are trivially copyable or move bitcopying. Otherwise struct storage is used, which means Outcome&rsquo;s types are larger than Expected&rsquo;s. This is because implementing exception guarantees during copies and moves of non-trivially-copyable types in union storage involves a lot of work for the compiler on every use of copy and move, so by using struct storage Outcome reduces build time impact from copies and moves significantly.</p>
<p>Note that one of the major uses of Outcome types is as the return type from a function, in which case copy elision would happen in C++ 14 and is guaranteed from C++ 17 onwards. This means that the larger footprint of struct storage typically has much less impact in optimised code than might be the case if you store these types inside other types.</p></li>
</ul>
</div><p><small>Last revised: January 10, 2022 at 14:29:13 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../alternatives/expected.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../alternatives.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="../alternatives/leaf.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

220
doc/html/build.html Normal file
View File

@@ -0,0 +1,220 @@
<!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>Build and install - 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="./requirements.html"><img src="./images/prev.png" alt="Prev"></a>
<a accesskey="u" href="./index.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="./alternatives.html"><img src="./images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both">Build and install</h1></div></div></div>
<h2 id="usage-as-a-single-header-file">Usage as a single header file</h2>
<p>Outcome v2 comes in single header file form. This is regenerated per commit. To fetch
on Linux:</p>
<pre><code>wget https://github.com/ned14/outcome/raw/master/single-header/outcome.hpp
</code></pre>
<p>On BSD:</p>
<pre><code>fetch https://github.com/ned14/outcome/raw/master/single-header/outcome.hpp
</code></pre>
<p>If you have <code>curl</code> installed:</p>
<pre><code>curl -O -J -L https://github.com/ned14/outcome/raw/master/single-header/outcome.hpp
</code></pre>
<p>Otherwise, simply download the raw file from above and place it wherever it suits you.
If you might be debugging using Microsoft Visual Studio, you may find the debugger
visualisation file at <a href="https://github.com/ned14/outcome/raw/master/include/outcome/outcome.natvis">https://github.com/ned14/outcome/raw/master/include/outcome/outcome.natvis</a>
useful to include into your build.</p>
<h2 id="usage-from-the-vcpkg-package-manager">Usage from the vcpkg package manager</h2>
<p>This is particularly easy, and works on Mac OS, Linux and Microsoft Windows:</p>
<pre><code>vcpkg install outcome
</code></pre>
<p>Outcome appears at <code>&lt;boost/outcome/outcome.hpp&gt;</code>. This is a full copy of Outcome, so
Experimental Outcome and all the usual headers are where you would expect.</p>
<h2 id="usage-from-the-conan-package-manager">Usage from the Conan package manager</h2>
<p><em>(thanks to Théo Delrieu for contributing this support)</em></p>
<p>At the command line, add the bintray repo for Outcome to conan:</p>
<pre><code>conan remote add outcome https://api.bintray.com/conan/ned14/Outcome
</code></pre>
<p>Now simply add this to your Conan build:</p>
<pre><code>[requires]
Outcome/master@ned14/stable
</code></pre>
<p>Outcome will be made available by Conan at <code>&lt;outcome.hpp&gt;</code>.</p>
<h2 id="usage-from-the-cmake-hunter-package-manager">Usage from the cmake hunter package manager</h2>
<p>Outcome has not been submitted to the main cmake hunter package manager repo yet.
You can however add it as a git submodule:</p>
<pre><code>cd yourthirdpartyrepodir
git submodule add https://github.com/ned14/quickcpplib
git submodule add https://github.com/ned14/outcome
cd ..
git submodule update --init --recursive
</code></pre>
<p>Now tell cmake hunter about a git submoduled cmake hunter package by
adding to your project&rsquo;s <code>cmake/Hunter/config.cmake</code>:</p>
<pre><code>hunter_config(quickcpplib GIT_SUBMODULE &quot;yourthirdpartyrepodir/quickcpplib&quot;)
hunter_config(outcome GIT_SUBMODULE &quot;yourthirdpartyrepodir/outcome&quot;)
</code></pre>
<p>&hellip; and finally to your <code>CMakeLists.txt</code>, now add outcome as if it were
an ordinary cmake hunter package:</p>
<pre><code>hunter_add_package(quickcpplib)
find_package(quickcpplib CONFIG REQUIRED)
hunter_add_package(outcome)
find_package(outcome CONFIG REQUIRED)
</code></pre>
<p>Now you tell cmake to link to outcome as usual (see below for cmake targets):</p>
<pre><code>target_link_libraries(mytarget outcome::hl)
</code></pre>
<h2 id="usage-as-a-git-submodule">Usage as a git submodule</h2>
<p>If you are very keen on tracking very latest Outcome, you can add it as a git
submodule to your project so you can keep abreast of bug fixes. Here is how:</p>
<pre><code>git submodule add https://github.com/ned14/outcome
cd outcome
git checkout master
git submodule update --init --recursive
</code></pre>
<p>After this you can bring Outcome into your code using:</p>
<pre><code>#include &quot;outcome/single-header/outcome.hpp&quot;
</code></pre>
<p>That&rsquo;s it, you are ready to go. From time to time, you may wish to update to
latest:</p>
<pre><code>cd outcome
git pull
git submodule update
</code></pre>
<h2 id="usage-as-a-stable-source-tarball">Usage as a stable source tarball</h2>
<p>If you would prefer a single source tarball of the stable and develop branches
known to have had all unit tests passing on all platforms, containing all the
documentation, tests and sources, this can always be retrieved from:</p>
<p><a href="https://github.com/ned14/outcome/releases">https://github.com/ned14/outcome/releases</a></p>
<p>This tarball is automatically generated when Outcome fully compiles and passes
all unit tests on all platforms tested by the CIs. This currently includes:</p>
<ul>
<li>Linux: GCC 7.5, clang 9, clang 11</li>
<li>MacOS: XCode 12</li>
<li>Windows: VS2019.7</li>
</ul>
<p>All unit tests are executed under the Address and Undefined Behaviour sanitisers.</p>
<p>It should be emphasised that newer compilers are not tested, so there is
an unlikely chance that the tarball may not work on a newer compiler.</p>
<hr>
<h1 id="running-the-unit-test-suite">Running the unit test suite</h1>
<p>To run the unit test suite you will need cmake 3.3 or later installed.</p>
<pre><code>mkdir build
cd build
cmake ..
cmake --build .
ctest
</code></pre>
<p>On some cmake generators (Visual Studio, Xcode) you may need to tell cmake build a configuration
like Release or Debug. Similarly, ctest needs to be told the same e.g.</p>
<pre><code>mkdir build
cd build
cmake ..
cmake --build . --config Release
ctest -C Release
</code></pre>
<p><a href="http://my.cdash.org/index.php?project=Boost.Outcome">Per commit, tests are run by Travis and uploaded to a CDash dashboard here</a>.</p>
<hr>
<h1 id="cmake-find-package-imported-targets-support">CMake <code>find_package()</code> imported targets support</h1>
<p>Outcome fully complies with cmake install, so by installing Outcome, it can be
found by cmake&rsquo;s <code>find_package()</code>.</p>
<pre><code>mkdir build
cd build
cmake ..
cmake --build .
sudo cmake --build . --target install
</code></pre>
<h1 id="modular-cmake-build-support">Modular CMake build support</h1>
<p>If you are using Outcome in a CMake project, Outcome is a &ldquo;modular cmake&rdquo; project
using only modern cmake 3 throughout. This lets you add the Outcome directory as a
cmake subdirectory with no unexpected consequence on the rest of your cmake. You will need
to be using cmake 3.3 or better.</p>
<pre><code>add_subdirectory(
&quot;${CMAKE_CURRENT_SOURCE_DIR}/outcome&quot; # path to outcome source
&quot;${CMAKE_CURRENT_BINARY_DIR}/outcome&quot; # your choice of where to put binaries
EXCLUDE_FROM_ALL # please only lazy build outcome on demand
)
</code></pre>
<p>Outcome&rsquo;s cmake has the following useful products:</p>
<ul>
<li><code>outcome::hl</code> (target): the Outcome header-only library. Add this to any
<code>target_link_libraries()</code> in your cmake to bring in Outcome as a header-only library. This will also
add to your link (via <code>PUBLIC</code>) any debugger visualisation support files, any system library
dependencies and also force all consuming executables to be configured with a minimum
of C++ 14 as Outcome requires a minimum of that.</li>
<li><code>outcome_TEST_TARGETS</code> (list): a list of targets which generate Outcome&rsquo;s test
suite. You can append this to your own test suite if you wish to run Outcome&rsquo;s test
suite along with your own.</li>
</ul>
</div><p><small>Last revised: April 02, 2021 at 11:06:20 &#43;0100</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="./requirements.html"><img src="./images/prev.png" alt="Prev"></a>
<a accesskey="u" href="./index.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="./alternatives.html"><img src="./images/next.png" alt="Next"></a></div></body>
</html>

67
doc/html/categories.html Normal file
View File

@@ -0,0 +1,67 @@
<!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>Categories - 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="h" href="./index.html"><img src="./images/home.png" alt="Home"></a><a accesskey="n" href="./requirements.html"><img src="./images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<span class="page-number"> 1 2</span>
<a class="older-posts" href="./categories/page/2.html"> &rarr;</a>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<span class="page-number"> 1 2</span>
<a class="older-posts" href="./categories/page/2.html"> &rarr;</a>
</nav>
</div><p><small>Last revised: March 03, 2019 at 00:11:47 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="./history.html"><img src="./images/prev.png" alt="Prev"></a>
<a accesskey="h" href="./index.html"><img src="./images/home.png" alt="Home"></a><a accesskey="n" href="./requirements.html"><img src="./images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,51 @@
<!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>Assignment - 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="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<span class="page-number"> 1 1</span>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<span class="page-number"> 1 1</span>
</nav>
</div><p><small>Last revised: March 03, 2019 at 00:11:47 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../history.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>/categories/assignment.html</title><link rel="canonical" href="/categories/assignment.html"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=/categories/assignment.html" /></head></html>

View File

@@ -0,0 +1,67 @@
<!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>Comparisons - 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="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<span class="page-number"> 1 2</span>
<a class="older-posts" href="../categories/comparisons/page/2.html"> &rarr;</a>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<span class="page-number"> 1 2</span>
<a class="older-posts" href="../categories/comparisons/page/2.html"> &rarr;</a>
</nav>
</div><p><small>Last revised: January 20, 2019 at 16:02:33 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../history.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>/categories/comparisons.html</title><link rel="canonical" href="/categories/comparisons.html"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=/categories/comparisons.html" /></head></html>

View File

@@ -0,0 +1,56 @@
<!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>Comparisons - 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="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/comparisons.html">&larr; </a>
<span class="page-number"> 2 2</span>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/comparisons.html">&larr; </a>
<span class="page-number"> 2 2</span>
</nav>
</div><p><small>Last revised: January 31, 2019 at 01:07:35 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,67 @@
<!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>Constructors - 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="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<span class="page-number"> 1 7</span>
<a class="older-posts" href="../categories/constructors/page/2.html"> &rarr;</a>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<span class="page-number"> 1 7</span>
<a class="older-posts" href="../categories/constructors/page/2.html"> &rarr;</a>
</nav>
</div><p><small>Last revised: December 17, 2020 at 11:27:06 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../history.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>/categories/constructors.html</title><link rel="canonical" href="/categories/constructors.html"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=/categories/constructors.html" /></head></html>

View File

@@ -0,0 +1,72 @@
<!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>Constructors - 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="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/constructors.html">&larr; </a>
<span class="page-number"> 2 7</span>
<a class="older-posts" href="../../../categories/constructors/page/3.html"> &rarr;</a>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/constructors.html">&larr; </a>
<span class="page-number"> 2 7</span>
<a class="older-posts" href="../../../categories/constructors/page/3.html"> &rarr;</a>
</nav>
</div><p><small>Last revised: March 03, 2019 at 00:11:47 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,72 @@
<!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>Constructors - 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="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/constructors/page/2.html">&larr; </a>
<span class="page-number"> 3 7</span>
<a class="older-posts" href="../../../categories/constructors/page/4.html"> &rarr;</a>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/constructors/page/2.html">&larr; </a>
<span class="page-number"> 3 7</span>
<a class="older-posts" href="../../../categories/constructors/page/4.html"> &rarr;</a>
</nav>
</div><p><small>Last revised: December 17, 2020 at 11:27:06 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,72 @@
<!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>Constructors - 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="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/constructors/page/3.html">&larr; </a>
<span class="page-number"> 4 7</span>
<a class="older-posts" href="../../../categories/constructors/page/5.html"> &rarr;</a>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/constructors/page/3.html">&larr; </a>
<span class="page-number"> 4 7</span>
<a class="older-posts" href="../../../categories/constructors/page/5.html"> &rarr;</a>
</nav>
</div><p><small>Last revised: December 17, 2020 at 11:27:06 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,72 @@
<!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>Constructors - 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="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/constructors/page/4.html">&larr; </a>
<span class="page-number"> 5 7</span>
<a class="older-posts" href="../../../categories/constructors/page/6.html"> &rarr;</a>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/constructors/page/4.html">&larr; </a>
<span class="page-number"> 5 7</span>
<a class="older-posts" href="../../../categories/constructors/page/6.html"> &rarr;</a>
</nav>
</div><p><small>Last revised: December 17, 2020 at 11:27:06 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,72 @@
<!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>Constructors - 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="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/constructors/page/5.html">&larr; </a>
<span class="page-number"> 6 7</span>
<a class="older-posts" href="../../../categories/constructors/page/7.html"> &rarr;</a>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/constructors/page/5.html">&larr; </a>
<span class="page-number"> 6 7</span>
<a class="older-posts" href="../../../categories/constructors/page/7.html"> &rarr;</a>
</nav>
</div><p><small>Last revised: December 17, 2020 at 11:27:06 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,52 @@
<!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>Constructors - 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="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/constructors/page/6.html">&larr; </a>
<span class="page-number"> 7 7</span>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/constructors/page/6.html">&larr; </a>
<span class="page-number"> 7 7</span>
</nav>
</div><p><small>Last revised: December 17, 2020 at 11:27:06 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,67 @@
<!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>Converting Constructors - 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="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<span class="page-number"> 1 3</span>
<a class="older-posts" href="../categories/converting-constructors/page/2.html"> &rarr;</a>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<span class="page-number"> 1 3</span>
<a class="older-posts" href="../categories/converting-constructors/page/2.html"> &rarr;</a>
</nav>
</div><p><small>Last revised: December 17, 2020 at 11:27:06 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../history.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>/categories/converting-constructors.html</title><link rel="canonical" href="/categories/converting-constructors.html"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=/categories/converting-constructors.html" /></head></html>

View File

@@ -0,0 +1,72 @@
<!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>Converting Constructors - 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="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/converting-constructors.html">&larr; </a>
<span class="page-number"> 2 3</span>
<a class="older-posts" href="../../../categories/converting-constructors/page/3.html"> &rarr;</a>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/converting-constructors.html">&larr; </a>
<span class="page-number"> 2 3</span>
<a class="older-posts" href="../../../categories/converting-constructors/page/3.html"> &rarr;</a>
</nav>
</div><p><small>Last revised: December 17, 2020 at 11:27:06 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,52 @@
<!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>Converting Constructors - 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="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/converting-constructors/page/2.html">&larr; </a>
<span class="page-number"> 3 3</span>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/converting-constructors/page/2.html">&larr; </a>
<span class="page-number"> 3 3</span>
</nav>
</div><p><small>Last revised: December 17, 2020 at 11:27:06 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,47 @@
<!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>Copy Assignment - 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="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<span class="page-number"> 1 1</span>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<span class="page-number"> 1 1</span>
</nav>
</div><p><small>Last revised: March 03, 2019 at 00:11:47 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../history.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>/categories/copy-assignment.html</title><link rel="canonical" href="/categories/copy-assignment.html"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=/categories/copy-assignment.html" /></head></html>

View File

@@ -0,0 +1,47 @@
<!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>Copy Constructors - 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="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<span class="page-number"> 1 1</span>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<span class="page-number"> 1 1</span>
</nav>
</div><p><small>Last revised: March 03, 2019 at 00:11:47 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../history.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>/categories/copy-constructors.html</title><link rel="canonical" href="/categories/copy-constructors.html"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=/categories/copy-constructors.html" /></head></html>

View File

@@ -0,0 +1,47 @@
<!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>Default Constructors - 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="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<span class="page-number"> 1 1</span>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<span class="page-number"> 1 1</span>
</nav>
</div><p><small>Last revised: December 15, 2018 at 17:49:37 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../history.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>/categories/default-constructors.html</title><link rel="canonical" href="/categories/default-constructors.html"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=/categories/default-constructors.html" /></head></html>

View File

@@ -0,0 +1,47 @@
<!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>Destructors - 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="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<span class="page-number"> 1 1</span>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<span class="page-number"> 1 1</span>
</nav>
</div><p><small>Last revised: December 15, 2018 at 17:49:37 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../history.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>/categories/destructors.html</title><link rel="canonical" href="/categories/destructors.html"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=/categories/destructors.html" /></head></html>

View File

@@ -0,0 +1,51 @@
<!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>Disabling Constructors - 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="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<span class="page-number"> 1 1</span>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<span class="page-number"> 1 1</span>
</nav>
</div><p><small>Last revised: December 15, 2018 at 17:49:37 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../history.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>/categories/disabling-constructors.html</title><link rel="canonical" href="/categories/disabling-constructors.html"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=/categories/disabling-constructors.html" /></head></html>

View File

@@ -0,0 +1,67 @@
<!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>Explicit Constructors - 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="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<span class="page-number"> 1 3</span>
<a class="older-posts" href="../categories/explicit-constructors/page/2.html"> &rarr;</a>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<span class="page-number"> 1 3</span>
<a class="older-posts" href="../categories/explicit-constructors/page/2.html"> &rarr;</a>
</nav>
</div><p><small>Last revised: December 17, 2020 at 11:27:06 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../history.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>/categories/explicit-constructors.html</title><link rel="canonical" href="/categories/explicit-constructors.html"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=/categories/explicit-constructors.html" /></head></html>

View File

@@ -0,0 +1,72 @@
<!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>Explicit Constructors - 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="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/explicit-constructors.html">&larr; </a>
<span class="page-number"> 2 3</span>
<a class="older-posts" href="../../../categories/explicit-constructors/page/3.html"> &rarr;</a>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/explicit-constructors.html">&larr; </a>
<span class="page-number"> 2 3</span>
<a class="older-posts" href="../../../categories/explicit-constructors/page/3.html"> &rarr;</a>
</nav>
</div><p><small>Last revised: December 17, 2020 at 11:27:06 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,56 @@
<!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>Explicit Constructors - 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="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/explicit-constructors/page/2.html">&larr; </a>
<span class="page-number"> 3 3</span>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/explicit-constructors/page/2.html">&larr; </a>
<span class="page-number"> 3 3</span>
</nav>
</div><p><small>Last revised: December 17, 2020 at 11:27:06 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,67 @@
<!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>Implicit Constructors - 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="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<span class="page-number"> 1 4</span>
<a class="older-posts" href="../categories/implicit-constructors/page/2.html"> &rarr;</a>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<span class="page-number"> 1 4</span>
<a class="older-posts" href="../categories/implicit-constructors/page/2.html"> &rarr;</a>
</nav>
</div><p><small>Last revised: December 17, 2020 at 11:27:06 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../history.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>/categories/implicit-constructors.html</title><link rel="canonical" href="/categories/implicit-constructors.html"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=/categories/implicit-constructors.html" /></head></html>

View File

@@ -0,0 +1,72 @@
<!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>Implicit Constructors - 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="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/implicit-constructors.html">&larr; </a>
<span class="page-number"> 2 4</span>
<a class="older-posts" href="../../../categories/implicit-constructors/page/3.html"> &rarr;</a>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/implicit-constructors.html">&larr; </a>
<span class="page-number"> 2 4</span>
<a class="older-posts" href="../../../categories/implicit-constructors/page/3.html"> &rarr;</a>
</nav>
</div><p><small>Last revised: December 17, 2020 at 11:27:06 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,72 @@
<!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>Implicit Constructors - 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="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/implicit-constructors/page/2.html">&larr; </a>
<span class="page-number"> 3 4</span>
<a class="older-posts" href="../../../categories/implicit-constructors/page/4.html"> &rarr;</a>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/implicit-constructors/page/2.html">&larr; </a>
<span class="page-number"> 3 4</span>
<a class="older-posts" href="../../../categories/implicit-constructors/page/4.html"> &rarr;</a>
</nav>
</div><p><small>Last revised: January 17, 2019 at 21:24:36 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,56 @@
<!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>Implicit Constructors - 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="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/implicit-constructors/page/3.html">&larr; </a>
<span class="page-number"> 4 4</span>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/implicit-constructors/page/3.html">&larr; </a>
<span class="page-number"> 4 4</span>
</nav>
</div><p><small>Last revised: December 17, 2020 at 11:27:06 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,67 @@
<!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>Inplace Constructors - 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="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<span class="page-number"> 1 2</span>
<a class="older-posts" href="../categories/inplace-constructors/page/2.html"> &rarr;</a>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<span class="page-number"> 1 2</span>
<a class="older-posts" href="../categories/inplace-constructors/page/2.html"> &rarr;</a>
</nav>
</div><p><small>Last revised: December 17, 2020 at 11:27:06 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../history.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>/categories/inplace-constructors.html</title><link rel="canonical" href="/categories/inplace-constructors.html"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=/categories/inplace-constructors.html" /></head></html>

View File

@@ -0,0 +1,52 @@
<!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>Inplace Constructors - 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="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/inplace-constructors.html">&larr; </a>
<span class="page-number"> 2 2</span>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/inplace-constructors.html">&larr; </a>
<span class="page-number"> 2 2</span>
</nav>
</div><p><small>Last revised: December 17, 2020 at 11:27:06 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,59 @@
<!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>Modifiers - 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="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<span class="page-number"> 1 1</span>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<span class="page-number"> 1 1</span>
</nav>
</div><p><small>Last revised: June 25, 2019 at 17:01:21 &#43;0100</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../history.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>/categories/modifiers.html</title><link rel="canonical" href="/categories/modifiers.html"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=/categories/modifiers.html" /></head></html>

View File

@@ -0,0 +1,47 @@
<!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>Move Assignment - 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="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<span class="page-number"> 1 1</span>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<span class="page-number"> 1 1</span>
</nav>
</div><p><small>Last revised: March 03, 2019 at 00:11:47 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../history.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>/categories/move-assignment.html</title><link rel="canonical" href="/categories/move-assignment.html"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=/categories/move-assignment.html" /></head></html>

View File

@@ -0,0 +1,47 @@
<!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>Move Constructors - 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="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<span class="page-number"> 1 1</span>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<span class="page-number"> 1 1</span>
</nav>
</div><p><small>Last revised: March 03, 2019 at 00:11:47 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../history.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>/categories/move-constructors.html</title><link rel="canonical" href="/categories/move-constructors.html"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=/categories/move-constructors.html" /></head></html>

View File

@@ -0,0 +1,67 @@
<!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>Observer 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="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<span class="page-number"> 1 2</span>
<a class="older-posts" href="../categories/observer-policies/page/2.html"> &rarr;</a>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<span class="page-number"> 1 2</span>
<a class="older-posts" href="../categories/observer-policies/page/2.html"> &rarr;</a>
</nav>
</div><p><small>Last revised: December 17, 2020 at 11:27:06 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../history.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>/categories/observer-policies.html</title><link rel="canonical" href="/categories/observer-policies.html"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=/categories/observer-policies.html" /></head></html>

View File

@@ -0,0 +1,56 @@
<!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>Observer 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="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/observer-policies.html">&larr; </a>
<span class="page-number"> 2 2</span>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/observer-policies.html">&larr; </a>
<span class="page-number"> 2 2</span>
</nav>
</div><p><small>Last revised: December 17, 2020 at 11:27:06 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,67 @@
<!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>Observers - 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="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<span class="page-number"> 1 7</span>
<a class="older-posts" href="../categories/observers/page/2.html"> &rarr;</a>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<span class="page-number"> 1 7</span>
<a class="older-posts" href="../categories/observers/page/2.html"> &rarr;</a>
</nav>
</div><p><small>Last revised: February 12, 2019 at 16:36:24 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../history.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>/categories/observers.html</title><link rel="canonical" href="/categories/observers.html"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=/categories/observers.html" /></head></html>

View File

@@ -0,0 +1,72 @@
<!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>Observers - 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="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/observers.html">&larr; </a>
<span class="page-number"> 2 7</span>
<a class="older-posts" href="../../../categories/observers/page/3.html"> &rarr;</a>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/observers.html">&larr; </a>
<span class="page-number"> 2 7</span>
<a class="older-posts" href="../../../categories/observers/page/3.html"> &rarr;</a>
</nav>
</div><p><small>Last revised: February 12, 2019 at 16:36:24 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,72 @@
<!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>Observers - 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="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/observers/page/2.html">&larr; </a>
<span class="page-number"> 3 7</span>
<a class="older-posts" href="../../../categories/observers/page/4.html"> &rarr;</a>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/observers/page/2.html">&larr; </a>
<span class="page-number"> 3 7</span>
<a class="older-posts" href="../../../categories/observers/page/4.html"> &rarr;</a>
</nav>
</div><p><small>Last revised: February 12, 2019 at 16:36:24 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,72 @@
<!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>Observers - 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="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/observers/page/3.html">&larr; </a>
<span class="page-number"> 4 7</span>
<a class="older-posts" href="../../../categories/observers/page/5.html"> &rarr;</a>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/observers/page/3.html">&larr; </a>
<span class="page-number"> 4 7</span>
<a class="older-posts" href="../../../categories/observers/page/5.html"> &rarr;</a>
</nav>
</div><p><small>Last revised: February 12, 2019 at 16:36:24 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,72 @@
<!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>Observers - 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="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/observers/page/4.html">&larr; </a>
<span class="page-number"> 5 7</span>
<a class="older-posts" href="../../../categories/observers/page/6.html"> &rarr;</a>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/observers/page/4.html">&larr; </a>
<span class="page-number"> 5 7</span>
<a class="older-posts" href="../../../categories/observers/page/6.html"> &rarr;</a>
</nav>
</div><p><small>Last revised: February 12, 2019 at 16:36:24 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,72 @@
<!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>Observers - 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="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/observers/page/5.html">&larr; </a>
<span class="page-number"> 6 7</span>
<a class="older-posts" href="../../../categories/observers/page/7.html"> &rarr;</a>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/observers/page/5.html">&larr; </a>
<span class="page-number"> 6 7</span>
<a class="older-posts" href="../../../categories/observers/page/7.html"> &rarr;</a>
</nav>
</div><p><small>Last revised: January 22, 2019 at 01:11:40 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,50 @@
<!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>Observers - 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="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/observers/page/6.html">&larr; </a>
<span class="page-number"> 7 7</span>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/observers/page/6.html">&larr; </a>
<span class="page-number"> 7 7</span>
</nav>
</div><p><small>Last revised: February 12, 2019 at 16:36:24 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,51 @@
<!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>Operators - 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="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<span class="page-number"> 1 1</span>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<span class="page-number"> 1 1</span>
</nav>
</div><p><small>Last revised: March 03, 2019 at 00:11:47 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../history.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>/categories/operators.html</title><link rel="canonical" href="/categories/operators.html"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=/categories/operators.html" /></head></html>

View File

@@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>/categories.html</title><link rel="canonical" href="/categories.html"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=/categories.html" /></head></html>

View File

@@ -0,0 +1,68 @@
<!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>Categories - 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="../../history.html"><img src="../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../../requirements.html"><img src="../../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../categories.html">&larr; </a>
<span class="page-number"> 2 2</span>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../categories.html">&larr; </a>
<span class="page-number"> 2 2</span>
</nav>
</div><p><small>Last revised: December 17, 2020 at 11:27:06 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../history.html"><img src="../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../../requirements.html"><img src="../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,45 @@
<!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>Special - 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="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<span class="page-number"> 1 1</span>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<span class="page-number"> 1 1</span>
</nav>
</div><p><small>Last revised: December 16, 2023 at 20:51:26 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../history.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>/categories/special.html</title><link rel="canonical" href="/categories/special.html"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=/categories/special.html" /></head></html>

View File

@@ -0,0 +1,67 @@
<!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>Tagged Constructors - 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="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<span class="page-number"> 1 2</span>
<a class="older-posts" href="../categories/tagged-constructors/page/2.html"> &rarr;</a>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<span class="page-number"> 1 2</span>
<a class="older-posts" href="../categories/tagged-constructors/page/2.html"> &rarr;</a>
</nav>
</div><p><small>Last revised: December 17, 2020 at 11:27:06 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../history.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../requirements.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>/categories/tagged-constructors.html</title><link rel="canonical" href="/categories/tagged-constructors.html"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=/categories/tagged-constructors.html" /></head></html>

View File

@@ -0,0 +1,64 @@
<!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>Tagged Constructors - 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="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
<div class="extra-pagination inner">
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/tagged-constructors.html">&larr; </a>
<span class="page-number"> 2 2</span>
</nav>
</div>
<div style="margin-bottom:2rem"></div>
<nav class="pagination" role="navigation">
<a class="newer-posts" href="../../../categories/tagged-constructors.html">&larr; </a>
<span class="page-number"> 2 2</span>
</nav>
</div><p><small>Last revised: December 17, 2020 at 11:27:06 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../history.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../requirements.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
</html>

980
doc/html/changelog.html Normal file
View File

@@ -0,0 +1,980 @@
<!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>Changelog - 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="./videos.html"><img src="./images/prev.png" alt="Prev"></a>
<a accesskey="u" href="./index.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="./changelog/upgrade_v21_v22.html"><img src="./images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both">Changelog</h1></div></div></div>
<div class="toc"><dl class="toc">
<dt>
<dd><dl>
<dt><a href="#v2-2-15-boost-1-91-release-https-github-com-ned14-outcome-releases-tag-v2-2-15">v2.2.15 ? (Boost 1.91) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.15">[release]</a></a>
<dd><dl>
<dt><a href="#enhancements">Enhancements:</a></dt>
<dt><a href="#bug-fixes">Bug fixes:</a></dt>
</dl></dd></dt>
<dt><a href="#v2-2-14-10th-december-2025-boost-1-90-release-https-github-com-ned14-outcome-releases-tag-v2-2-14">v2.2.14 10th December 2025 (Boost 1.90) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.14">[release]</a></a>
<dd><dl>
<dt><a href="#enhancements-1">Enhancements:</a></dt>
</dl></dd></dt>
<dt><a href="#v2-2-13-6th-august-2025-boost-1-89-release-https-github-com-ned14-outcome-releases-tag-v2-2-13">v2.2.13 6th August 2025 (Boost 1.89) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.13">[release]</a></a>
<dd><dl>
<dt><a href="#enhancements-2">Enhancements:</a></dt>
</dl></dd></dt>
<dt><a href="#v2-2-12-10th-april-2025-boost-1-88-release-https-github-com-ned14-outcome-releases-tag-v2-2-12">v2.2.12 10th April 2025 (Boost 1.88) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.12">[release]</a></a>
<dd><dl>
<dt><a href="#bug-fixes-1">Bug fixes:</a></dt>
</dl></dd></dt>
<dt><a href="#v2-2-11-12th-december-2024-boost-1-87-release-https-github-com-ned14-outcome-releases-tag-v2-2-11">v2.2.11 12th December 2024 (Boost 1.87) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.11">[release]</a></a>
<dd><dl>
<dt><a href="#enhancements-3">Enhancements:</a></dt>
<dt><a href="#bug-fixes-2">Bug fixes:</a></dt>
</dl></dd></dt>
<dt><a href="#v2-2-10-14th-august-2024-boost-1-86-release-https-github-com-ned14-outcome-releases-tag-v2-2-10">v2.2.10 14th August 2024 (Boost 1.86) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.10">[release]</a></a>
<dd><dl>
<dt><a href="#enhancements-4">Enhancements:</a></dt>
<dt><a href="#bug-fixes-3">Bug fixes:</a></dt>
</dl></dd></dt>
<dt><a href="#v2-2-9-15th-april-2024-boost-1-85-release-https-github-com-ned14-outcome-releases-tag-v2-2-9">v2.2.9 15th April 2024 (Boost 1.85) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.9">[release]</a></a>
<dd><dl>
<dt><a href="#enhancements-5">Enhancements:</a></dt>
</dl></dd></dt>
<dt><a href="#v2-2-8-13th-december-2023-boost-1-84-release-https-github-com-ned14-outcome-releases-tag-v2-2-8">v2.2.8 13th December 2023 (Boost 1.84) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.8">[release]</a></a>
<dd><dl>
<dt><a href="#enhancements-6">Enhancements:</a></dt>
<dt><a href="#bug-fixes-4">Bug fixes:</a></dt>
</dl></dd></dt>
<dt><a href="#v2-2-7-13th-august-2023-boost-1-83-release-https-github-com-ned14-outcome-releases-tag-v2-2-7">v2.2.7 13th August 2023 (Boost 1.83) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.7">[release]</a></a>
<dd><dl>
<dt><a href="#enhancements-7">Enhancements:</a></dt>
<dt><a href="#bug-fixes-5">Bug fixes:</a></dt>
</dl></dd></dt>
<dt><a href="#v2-2-6-24th-march-2023-boost-1-82-release-https-github-com-ned14-outcome-releases-tag-v2-2-6">v2.2.6 24th March 2023 (Boost 1.82) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.6">[release]</a></a>
<dd><dl>
<dt><a href="#enhancements-8">Enhancements:</a></dt>
<dt><a href="#bug-fixes-6">Bug fixes:</a></dt>
</dl></dd></dt>
<dt><a href="#v2-2-4-11th-august-2022-boost-1-80-release-https-github-com-ned14-outcome-releases-tag-v2-2-4">v2.2.4 11th August 2022 (Boost 1.80) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.4">[release]</a></a>
<dd><dl>
<dt><a href="#enhancements-9">Enhancements:</a></dt>
<dt><a href="#bug-fixes-7">Bug fixes:</a></dt>
</dl></dd></dt>
<dt><a href="#v2-2-3-17th-march-2022-boost-1-79-release-https-github-com-ned14-outcome-releases-tag-v2-2-3">v2.2.3 17th March 2022 (Boost 1.79) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.3">[release]</a></a>
<dd><dl>
<dt><a href="#enhancements-10">Enhancements:</a></dt>
<dt><a href="#bug-fixes-8">Bug fixes:</a></dt>
</dl></dd></dt>
<dt><a href="#v2-2-2-8th-december-2021-boost-1-78-release-https-github-com-ned14-outcome-releases-tag-v2-2-2">v2.2.2 8th December 2021 (Boost 1.78) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.2">[release]</a></a>
<dd><dl>
<dt><a href="#enhancements-11">Enhancements:</a></dt>
<dt><a href="#bug-fixes-9">Bug fixes:</a></dt>
</dl></dd></dt>
<dt><a href="#v2-2-1-13th-august-2021-boost-1-77-release-https-github-com-ned14-outcome-releases-tag-v2-2-1">v2.2.1 13th August 2021 (Boost 1.77) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.1">[release]</a></a>
<dd><dl>
<dt><a href="#bug-fixes-10">Bug fixes:</a></dt>
</dl></dd></dt>
<dt><a href="#v2-2-0-16th-april-2021-boost-1-76-release-https-github-com-ned14-outcome-releases-tag-v2-2-0">v2.2.0 16th April 2021 (Boost 1.76) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.0">[release]</a></a>
<dd><dl>
<dt><a href="#enhancements-12">Enhancements:</a></dt>
<dt><a href="#bug-fixes-11">Bug fixes:</a></dt>
</dl></dd></dt>
<dt><a href="#v2-1-5-11th-december-2020-boost-1-75-release-https-github-com-ned14-outcome-releases-tag-v2-1-5">v2.1.5 11th December 2020 (Boost 1.75) <a href="https://github.com/ned14/outcome/releases/tag/v2.1.5">[release]</a></a>
<dd><dl>
<dt><a href="#enhancements-13">Enhancements:</a></dt>
<dt><a href="#bug-fixes-12">Bug fixes:</a></dt>
</dl></dd></dt>
<dt><a href="#v2-1-4-14th-august-2020-boost-1-74-release-https-github-com-ned14-outcome-releases-tag-v2-1-4">v2.1.4 14th August 2020 (Boost 1.74) <a href="https://github.com/ned14/outcome/releases/tag/v2.1.4">[release]</a></a>
<dd><dl>
<dt><a href="#enhancements-14">Enhancements:</a></dt>
<dt><a href="#bug-fixes-13">Bug fixes:</a></dt>
</dl></dd></dt>
<dt><a href="#v2-1-3-29th-april-2020-boost-1-73-release-https-github-com-ned14-outcome-releases-tag-v2-1-3">v2.1.3 29th April 2020 (Boost 1.73) <a href="https://github.com/ned14/outcome/releases/tag/v2.1.3">[release]</a></a>
<dd><dl>
<dt><a href="#enhancements-15">Enhancements:</a></dt>
<dt><a href="#bug-fixes-14">Bug fixes:</a></dt>
</dl></dd></dt>
<dt><a href="#v2-1-2-11th-december-2019-boost-1-72-release-https-github-com-ned14-outcome-releases-tag-v2-1-2">v2.1.2 11th December 2019 (Boost 1.72) <a href="https://github.com/ned14/outcome/releases/tag/v2.1.2">[release]</a></a>
<dd><dl>
<dt><a href="#enhancements-16">Enhancements:</a></dt>
<dt><a href="#bug-fixes-15">Bug fixes:</a></dt>
</dl></dd></dt>
<dt><a href="#v2-1-1-19th-august-2019-boost-1-71-release-https-github-com-ned14-outcome-releases-tag-v2-1-1">v2.1.1 19th August 2019 (Boost 1.71) <a href="https://github.com/ned14/outcome/releases/tag/v2.1.1">[release]</a></a>
<dd><dl>
<dt><a href="#enhancements-17">Enhancements:</a></dt>
<dt><a href="#bug-fixes-16">Bug fixes:</a></dt>
</dl></dd></dt>
<dt><a href="#v2-1-12th-apr-2019-boost-1-70-release-https-github-com-ned14-outcome-releases-tag-v2-1">v2.1 12th Apr 2019 (Boost 1.70) <a href="https://github.com/ned14/outcome/releases/tag/v2.1">[release]</a></a></dt>
<dt><a href="#v2-0-18th-jan-2018-release-https-github-com-ned14-outcome-releases-tag-v2-0-boost-peer-review">v2.0 18th Jan 2018 <a href="https://github.com/ned14/outcome/releases/tag/v2.0-boost-peer-review">[release]</a></a></dt>
</dl></dd></dt>
</dl>
</div>
<hr />
<h2 id="v2-2-15-boost-1-91-release-https-github-com-ned14-outcome-releases-tag-v2-2-15">v2.2.15 ? (Boost 1.91) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.15">[release]</a></h2>
<h3 id="enhancements">Enhancements:</h3>
<ul>
<li><p>Added the beginnings of a complete reimplementation of Experimental Outcome
from scratch, but written 100% in C. This reimplementation will be usable from
any ISO C right back to 1989, and it is 100% ABI compatible with this C++
implementation i.e. you can cast pointers to the types from one
implementation to the other if you wish, and virtual functions do correctly
call into 100% C implementations and vice versa.</p></li>
<li><p>The C reimplementation required that the C++ <code>status_code_domain</code>&rsquo;s virtual
and thunk functions had to be refactored so calling them with <code>__thiscall</code>
would also work when called with <code>__cdecl</code> on all major architectures and
calling conventions. I also made them able to return failure without throwing
a C++ exception. If you have created your own <code>status_code_domain</code>&rsquo;s
you will need to update your code (the refactoring is very minor), otherwise
you shouldn&rsquo;t notice any change.</p></li>
<li><p>The C reimplementation simplified the implementation of <code>atomic_refcounted_string_ref</code>,
and the C++ implementation was updated to match. The biggest change is that the
input string is now ALWAYS COPIED and is no longer a <code>malloc</code> pointer whose
ownership is taken. If you have used <code>atomic_refcounted_string_ref</code> in your own
code, you&rsquo;ll need to refactor it to no longer allocate the input buffer using
<code>malloc</code> and instead pass in the original <code>char</code> buffer.</p></li>
<li><p>The complete C reimplementation is currently <strong>NOT YET FIT FOR PRODUCTION USE</strong> and
you should use instead the current, mature, C API to the C++ implementation.
The documentation currently makes no reference to the complete C reimplementation,
though if/when it becomes production ready, it will be updated.</p></li>
<li><p>Finally, the C reimplementation is what is being proposed for standardisation
into the C standard library, so expect the usual renaming and other mild changes
that standards committees like to do. As I no longer serve on WG21 C++ standards,
I don&rsquo;t expect any further changes from that standards commitee.</p></li>
</ul>
<h3 id="bug-fixes">Bug fixes:</h3>
<ul>
<li>In Experimental.Outcome, the <code>make_status_code()</code> ADL customisation point in
<code>status_code</code> kinda supported transforming between kinds of status code, but it
also kinda didn&rsquo;t. Now it definitely does. This fix may cause corner case breakage.</li>
</ul>
<hr />
<h2 id="v2-2-14-10th-december-2025-boost-1-90-release-https-github-com-ned14-outcome-releases-tag-v2-2-14">v2.2.14 10th December 2025 (Boost 1.90) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.14">[release]</a></h2>
<h3 id="enhancements-1">Enhancements:</h3>
<p><a href="https://github.com/ned14/outcome/issues/314">#314</a>
- Bump Boost min cmake required to 3.10 to match standalone Outcome. Also bump minium cmake to 3.10
everywhere else in Outcome, as CI is now failing due to us requested too old a cmake.</p>
<hr />
<h2 id="v2-2-13-6th-august-2025-boost-1-89-release-https-github-com-ned14-outcome-releases-tag-v2-2-13">v2.2.13 6th August 2025 (Boost 1.89) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.13">[release]</a></h2>
<h3 id="enhancements-2">Enhancements:</h3>
<p><a href="https://github.com/ned14/outcome/issues/312">#312</a>
- <code>iostream_support.hpp</code> has been split into <code>iostream_support_result.hpp</code> and <code>iostream_support.hpp</code>.</p>
<p><a href="https://github.com/ned14/outcome/issues/313">#313</a>
- Bump min cmake required to 3.10 amongst other cmake modernisation fixes to please cmake 4.0.</p>
<hr />
<h2 id="v2-2-12-10th-april-2025-boost-1-88-release-https-github-com-ned14-outcome-releases-tag-v2-2-12">v2.2.12 10th April 2025 (Boost 1.88) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.12">[release]</a></h2>
<h3 id="bug-fixes-1">Bug fixes:</h3>
<ul>
<li>The Android build had become broken, fixed.</li>
</ul>
<hr />
<h2 id="v2-2-11-12th-december-2024-boost-1-87-release-https-github-com-ned14-outcome-releases-tag-v2-2-11">v2.2.11 12th December 2024 (Boost 1.87) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.11">[release]</a></h2>
<h3 id="enhancements-3">Enhancements:</h3>
<ul>
<li>Outcome.Experimental has had C representation support since the beginning, however it had
been mainly intended that C++ would originate Results, they would pass through C, and back
into C++. It hadn&rsquo;t really been expected that C would want to do much with Results other than
inspect them for happy or sad path.</li>
</ul>
<p>It turns out there is more demand than expected for a more functional Result from within C,
so this release adds the power to create Results in success and two types of failure, semantic
comparison of Results, and printing of Result messages. You can also wrap a C enum into a
quick status code from enum, allowing easy custom C error coding from 100% within C.</p>
<p><a href="./experimental/c-api.html">The documentation for the C support</a> has been updated
to reflect the new facilities.</p>
<h3 id="bug-fixes-2">Bug fixes:</h3>
<ul>
<li>This was fixed in Standalone Outcome in the last release, but the fix came too late for Boost.Outcome
which ended up shipping with inline GDB pretty printers with the wrong escaping which caused
failure to load.</li>
</ul>
<hr />
<h2 id="v2-2-10-14th-august-2024-boost-1-86-release-https-github-com-ned14-outcome-releases-tag-v2-2-10">v2.2.10 14th August 2024 (Boost 1.86) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.10">[release]</a></h2>
<h3 id="enhancements-4">Enhancements:</h3>
<ul>
<li>Something I&rsquo;ve been meaning to do for far too long now is make the GDB pretty printers
auto-loading so you don&rsquo;t have to set up <code>.gdbinit</code>. This is now done. I also improved
the pretty printers to also pretty print the C result type which can be very useful if
working with that type, as it will print the error message in GDB.</li>
</ul>
<p>Experimental Outcome&rsquo;s <code>status_code</code> has also gained its own auto-loading GDB pretty printer
with display of <code>strerror()</code> if the code domain is POSIX or generic.</p>
<h3 id="bug-fixes-3">Bug fixes:</h3>
<ul>
<li>The <code>status</code> enumeration used to track state internally did not list all possible enum
values. This caused static analysers to complain.</li>
</ul>
<hr />
<h2 id="v2-2-9-15th-april-2024-boost-1-85-release-https-github-com-ned14-outcome-releases-tag-v2-2-9">v2.2.9 15th April 2024 (Boost 1.85) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.9">[release]</a></h2>
<h3 id="enhancements-5">Enhancements:</h3>
<p><a href="https://github.com/ned14/outcome/issues/293">#293</a>
- Some users wished that Outcome would be clean with <code>-Wpedantic</code>, this is now turned on for
the test suite.</p>
<p><a href="https://github.com/ned14/outcome/issues/294">#294</a>
- All use of <code>assert()</code> has been replaced with <code>BOOST_OUTCOME_ASSERT</code>, which can be user overridden
at compile time.</p>
<p><a href="https://github.com/ned14/outcome/issues/295">#295</a>
- In git commit 12b14e1533848e9a0f7f3c38e41da0ee4e819770 (Aug 11 2022) status code had its
paths changed due to its headers not previously having the right path convention. It was not
realised at the time that in Boost.Outcome this resulted in
<code>&lt;boost/outcome/experimental/status-code/status-code/headers.hpp&gt;</code> which is not desirable.
This has now been remedied to remove the double <code>status-code</code>, which will obviously break
any Boost.Outcome code which relies on the double <code>status-code</code>. Standalone Outcome is unaffected.</p>
<hr />
<h2 id="v2-2-8-13th-december-2023-boost-1-84-release-https-github-com-ned14-outcome-releases-tag-v2-2-8">v2.2.8 13th December 2023 (Boost 1.84) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.8">[release]</a></h2>
<h3 id="enhancements-6">Enhancements:</h3>
<ul>
<li>cmake 3.9 is now the minimum required for standalone Outcome. This fixes a long standing
cmake issue with probing for standard library facilities. cmake 3.9 is what RHEL7 ships with,
when RHEL7 EOLs we may raise the minimum cmake version at that point.</li>
</ul>
<h3 id="bug-fixes-4">Bug fixes:</h3>
<ul>
<li>There was a bug in the Outcome C++ coroutine awaitables whereby we were over eagerly resuming
execution of coroutines which return one of our awaitables. It is surprising how many years have
passed before this was noticed, but it is now fixed. It is believed that this has been fixed
without affecting ABI stability, however mixing old Outcome and new Outcome in the same binary
without recompiling all the C++ coroutine code to use new Outcome will not fix the bug.</li>
</ul>
<p><a href="https://github.com/ned14/outcome/issues/291">#291</a>
- A Result or Outcome with <code>void</code> value type and move-only non-value type was only usable in
const use cases, due to the lack of provision of non-const member functions in relevant observers
injection layers for the <code>void</code> specialisation. The missing non-const member functions have now
been added.</p>
<hr />
<h2 id="v2-2-7-13th-august-2023-boost-1-83-release-https-github-com-ned14-outcome-releases-tag-v2-2-7">v2.2.7 13th August 2023 (Boost 1.83) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.7">[release]</a></h2>
<h3 id="enhancements-7">Enhancements:</h3>
<ul>
<li><p>Update the list of known compiler issues in the docs.</p></li>
<li><p>Update Outcome.Experimental to match latest changes requested of <code>status_code</code> by WG21.
This as usual will cause minor breakage due to LEWG renaming of things.</p></li>
<li><p>Outcome previously took addresses of things not using <code>std::addressof()</code>, and until now
nobody complained because custom <code>operator&amp;</code> which doesn&rsquo;t return an address is an
abomination not used in much modern C++. But finally someone did complain, so
for both normal Outcome and Experimental.Outcome, if you set <code>BOOST_OUTCOME_USE_STD_ADDRESSOF = 1</code>,
Outcome will use <code>std::addressof()</code></p></li>
</ul>
<h3 id="bug-fixes-5">Bug fixes:</h3>
<p><a href="https://github.com/ned14/outcome/issues/273">#273</a>
- Changes to other Boost libraries had caused Boost.Outcome&rsquo;s test suite to fail to compile for some
compiler and C++ language configurations in recent releases. Thanks to work contributed by @alandefreitas
and @pdimov, Boost.Outcome now CI tests a wide range of compilers and configurations and it
is believed all those corner case issues have been fixed or worked around, for the compilers
and configurations within that CI matrix.</p>
<p>Standalone Outcome&rsquo;s test suite was never affected, as it did not have Boost changing underneath it.
Nevertheless, a few of the compiler parse bug workarounds will have improved compatibility there
too for atyical toolchain choices.</p>
<ul>
<li>Experimental.Outcome now supports big endian architectures. Implementation for them simply wasn&rsquo;t done
before under the assumption that nobody would be using Experimental.Outcome on big endian architectures.
Turns out that was a wrong assumption!</li>
</ul>
<hr />
<h2 id="v2-2-6-24th-march-2023-boost-1-82-release-https-github-com-ned14-outcome-releases-tag-v2-2-6">v2.2.6 24th March 2023 (Boost 1.82) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.6">[release]</a></h2>
<h3 id="enhancements-8">Enhancements:</h3>
<ul>
<li>Update to latest <code>status-code</code> in Experimental.Outcome, which relocates its header files and may
cause some end user inclusions to need path changes.</li>
</ul>
<h3 id="bug-fixes-6">Bug fixes:</h3>
<ul>
<li>Latest <code>status-code</code> fixes a number of nasty bugs, some mild build breakage in Experimental.Outcome
may occur as a result. See its commit log for more information.</li>
</ul>
<hr />
<h2 id="v2-2-4-11th-august-2022-boost-1-80-release-https-github-com-ned14-outcome-releases-tag-v2-2-4">v2.2.4 11th August 2022 (Boost 1.80) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.4">[release]</a></h2>
<h3 id="enhancements-9">Enhancements:</h3>
<ul>
<li><p>Update to latest <code>status-code</code> in Experimental.Outcome, which has some breaking changes and important
bug fixes.</p></li>
<li><p>Add <a href="./reference/types/awaitables/generator.html" class="api-reference"><code>generator&lt;T, Executor = void&gt;</code></a>
to coroutine awaitables.</p></li>
<li><p>Add optional <code>Executor</code> template parameter to all Outcome awaitable types for improved compatibility
with third party software such as <a href="https://think-async.com/Asio/">ASIO</a>.</p></li>
<li><p>To Experimental.Outcome add <code>clone()</code> for <code>basic_result</code> and <code>basic_outcome</code> types whose <code>EC</code> is
a <code>status_code</code>. Erased status codes are move-only which makes the Result/Outcome type move-only, but
they provide a cloning function, so this convenience function both clones the status code and propagates
the spare storage so stack backtraces etc are also cloned.</p></li>
<li><p>Add type constraints to <code>success()</code> and <code>failure()</code> to disable them if they aren&rsquo;t available.</p></li>
<li><p>Work around a bug in GCC&rsquo;s C++ Coroutines implementation whereby one gets an ICE from <code>gimplify_expr</code>
in any <code>BOOST_OUTCOME_CO_TRY</code> taking even a mildly complex expression, which obviously is a showstopper.
The work around assigns the failure type to a stack temporary before <code>co_return</code>-ing that
temporary. Thanks to RVO pre-17 and copy elision since, this should add no runtime overhead.</p></li>
</ul>
<h3 id="bug-fixes-7">Bug fixes:</h3>
<dl>
<dt><a href="https://github.com/ned14/outcome/issues/261">#261</a></dt>
<dd>Move assignable with move constructible not available did not work with <code>void</code>.</dd>
</dl>
<hr />
<h2 id="v2-2-3-17th-march-2022-boost-1-79-release-https-github-com-ned14-outcome-releases-tag-v2-2-3">v2.2.3 17th March 2022 (Boost 1.79) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.3">[release]</a></h2>
<h3 id="enhancements-10">Enhancements:</h3>
<dl>
<dt>Standalone Outcome permanently locks ABI to v2.2.3 release</dt>
<dd>From this release onwards, you are guaranteed that any code compiled with v2.2.3 Outcome
or newer will link without issue with any code compiled with a different version of Outcome
after v2.2.3. As a result, <code>BOOST_OUTCOME_UNSTABLE_VERSION</code> is no longer defined by default, and
therefore <code>BOOST_OUTCOME_V2_NAMESPACE</code> is now hard coded to <code>outcome_v2</code> rather than a namespace
which permutes per commit.</dd>
</dl>
<h3 id="bug-fixes-8">Bug fixes:</h3>
<dl>
<dt><a href="https://github.com/ned14/outcome/issues/259">#255</a></dt>
<dd>Fix enabling of move assignable was not calculated correctly.</dd>
</dl>
<hr />
<h2 id="v2-2-2-8th-december-2021-boost-1-78-release-https-github-com-ned14-outcome-releases-tag-v2-2-2">v2.2.2 8th December 2021 (Boost 1.78) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.2">[release]</a></h2>
<h3 id="enhancements-11">Enhancements:</h3>
<dl>
<dt><a href="https://github.com/ned14/outcome/issues/255">#255</a></dt>
<dd>Restore Experimental Outcome constexpr compatibility in C++ 20 which was an undocumented
property of the Outcome v2.1 series, and which had been dropped in the v2.2 series.</dd>
<dt>GCC Coroutines support</dt>
<dd>Coroutine support in GCCs after 10 is now correctly detected.</dd>
</dl>
<h3 id="bug-fixes-9">Bug fixes:</h3>
<ul>
<li>None.</li>
</ul>
<hr />
<h2 id="v2-2-1-13th-august-2021-boost-1-77-release-https-github-com-ned14-outcome-releases-tag-v2-2-1">v2.2.1 13th August 2021 (Boost 1.77) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.1">[release]</a></h2>
<h3 id="bug-fixes-10">Bug fixes:</h3>
<dl>
<dt><a href="https://github.com/ned14/outcome/issues/251">#251</a></dt>
<dd><p>Fix failure to compile Boost.Outcome when the compiler declares support for C++ modules.</p></dd>
<dd><p>Don&rsquo;t use <code>[[likely]]</code> in GCCs before 9.</p></dd>
<dt><a href="https://github.com/ned14/outcome/issues/253">#251</a></dt>
<dd><p>Make support for C++ modules opt-in.</p></dd>
</dl>
<hr />
<h2 id="v2-2-0-16th-april-2021-boost-1-76-release-https-github-com-ned14-outcome-releases-tag-v2-2-0">v2.2.0 16th April 2021 (Boost 1.76) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.0">[release]</a></h2>
<dl>
<dt>BREAKING CHANGE As announced for a year and three Boost releases, Outcome v2.2 became the default, replacing v2.1.</dt>
<dd>All v2.1 Outcome code will need to be upgraded as described in <a href="./changelog/upgrade_v21_v22.html">the v2.1 =&gt; v2.2 upgrade guide</a>.
This branch has a number of major breaking changes to Outcome v2.1, see
<a href="./changelog/v22.html">the list of v2.2 major changes</a>.</dd>
</dl>
<h3 id="enhancements-12">Enhancements:</h3>
<dl>
<dt>VS2019.8 compatibility</dt>
<dd>VS2019.8 changed how to enable Coroutines, which caused Outcome to not compile on that compiler.</dd>
<dt><a href="https://github.com/ned14/outcome/issues/237">#237</a></dt>
<dd>If on C++ 20, we now use C++ 20 <code>[[likely]]</code> instead of compiler-specific markup to indicate
when TRY has likely success or failure.</dd>
<dt>BREAKING CHANGE <a href="https://github.com/ned14/outcome/issues/247">#247</a></dt>
<dd><p>Previously the value of <a href="./reference/functions/hooks/spare_storage.html" class="api-reference"><code>spare_storage(const basic_result|basic_outcome *) noexcept</code></a>
was
not propagated over <code>BOOST_OUTCOME_TRY</code>, which causes things like stack backtraces captured at the point of
construction of an errored result to get dropped at every <code>TRY</code> point. This has been fixed by adding
an optional <code>spare_storage</code> to <a href="./reference/types/success_type.html" class="api-reference"><code>success_type&lt;T&gt;</code></a>
and <a href="./reference/traits/is_failure_type.html" class="api-reference"><code>failure_type&lt;T&gt;</code></a>
, as well
as to <a href="./reference/functions/success.html" class="api-reference"><code>auto success(T &amp;&amp;, ...)</code></a>
and <a href="./reference/functions/failure.html" class="api-reference"><code>auto failure(T &amp;&amp;, ...)</code></a>
.</p>
<p>You should not notice this in your code, except that where before spare storage values did not
propagate through TRY, now they do, which is a breaking change.</p></dd>
</dl>
<h3 id="bug-fixes-11">Bug fixes:</h3>
<dl>
<dt>BREAKING CHANGE <a href="https://github.com/ned14/outcome/issues/244">#244</a></dt>
<dd><p>It came as a shock to learn that <code>BOOST_OUTCOME_TRY</code> had been broken since the inception of this
library for certain corner case code:</p>
<div class="highlight"><pre class="chroma"><code class="language-c++" data-lang="c++"><span class="n">outcome</span><span class="o">::</span><span class="n">result</span><span class="o">&lt;</span><span class="n">Foo</span><span class="o">&gt;</span> <span class="n">get_foo</span><span class="p">();</span>
<span class="n">outcome</span><span class="o">::</span><span class="n">result</span><span class="o">&lt;</span><span class="n">Foo</span><span class="o">&gt;</span> <span class="n">filter1</span><span class="p">(</span><span class="n">outcome</span><span class="o">::</span><span class="n">result</span><span class="o">&lt;</span><span class="n">Foo</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span><span class="p">);</span>
<span class="n">outcome</span><span class="o">::</span><span class="n">result</span><span class="o">&lt;</span><span class="n">Foo</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">filter2</span><span class="p">(</span><span class="n">outcome</span><span class="o">::</span><span class="n">result</span><span class="o">&lt;</span><span class="n">Foo</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span><span class="p">);</span>
<span class="c1">// This works fine, and always has
</span><span class="c1"></span><span class="n">BOOST_OUTCOME_TRY</span><span class="p">(</span><span class="k">auto</span> <span class="n">v</span><span class="p">,</span> <span class="n">filter1</span><span class="p">(</span><span class="n">get_foo</span><span class="p">()))</span>
<span class="c1">// This causes UB due to result&lt;Foo&gt; being destructed before move of value into v
</span><span class="c1"></span><span class="n">BOOST_OUTCOME_TRY</span><span class="p">(</span><span class="k">auto</span> <span class="n">v</span><span class="p">,</span> <span class="n">filter2</span><span class="p">(</span><span class="n">get_foo</span><span class="p">()))</span>
</code></pre></div>
<p>Whilst reference passthrough filter functions are not common, they can turn up in highly generic
code, where destruction before copy/move is not helpful.</p>
<p>The cause is that TRY used to work by binding the result of the expression to an <code>auto &amp;&amp;unique</code>,
testing if that unique if successful or not, and if successful then moving from <code>unique.value()</code>
into the user&rsquo;s output variable. If the expression returned is a prvalue, the Result&rsquo;s lifetime is
extended by the bound reference to outside of the statement, and all is good. If the expression
returned is an xvalue or lvalue, then the lifetime extension does not exceed that of the statement,
and the Result is destructed after the semicolon succeeding the assignment to <code>auto &amp;&amp;unique</code>.</p>
<p>This bug has been fixed by TRY deducing the <a href="https://en.cppreference.com/w/cpp/language/value_category">value category</a>
of its input expression as follows:</p>
<ul>
<li>prvalues =&gt; <code>auto unique = (expr)</code> (breaking change)</li>
<li>xvalue =&gt; <code>auto unique = (expr)</code> (breaking change)</li>
<li>lvalue =&gt; <code>auto unique = (expr)</code> (breaking change)</li>
</ul>
<p>This ensures that xvalue and lvalue inputs do not cause unhelpfully early lifetime end, though it
does silently change the behaviour of existing code which relied on rvalues and lvalues being passed
through, as a new construct-move-destruct or construct-copy-destruct cycle is introduced to where
there was none before. Also, before C++ 17, there is now an added copy/move for prvalue inputs,
which does not affect runtime codegen due to Return Value Optimisation (RVO), but does cause
Results containing non-copying non-moving types to fail to compile, which is a breaking change
from beforehand.</p>
<p>If one wishes rvalues or lvalues to be passed through, one can avail of a new TRY syntax based on
preprocessor overloading:</p>
<ul>
<li><code>BOOST_OUTCOME_TRY((refspec, varname), expr)</code></li>
<li><code>BOOST_OUTCOME_TRYV2(refspec, expr)</code></li>
</ul>
<p>Here <code>refspec</code> is the storage to be used for <strong>both</strong> the internal temporary unique, AND <code>varname</code>.
So if you write:</p>
<div class="highlight"><pre class="chroma"><code class="language-c++" data-lang="c++"><span class="n">Foo</span> <span class="o">&amp;&amp;</span><span class="n">foo</span><span class="p">;</span>
<span class="n">BOOST_OUTCOME_TRY</span><span class="p">((</span><span class="k">auto</span> <span class="o">&amp;&amp;</span><span class="p">,</span> <span class="n">v</span><span class="p">),</span> <span class="n">filter2</span><span class="p">(</span><span class="n">foo</span><span class="p">))</span>
</code></pre></div>
<p>&hellip; then the internal unique is declared as <code>auto &amp;&amp;unique = (filter2(foo))</code>, and the output variable
is declared as <code>auto &amp;&amp;v = std::move(unique).assume_value()</code>. This passes through the rvalue referencing,
and completely avoids copies and moves of <code>Foo</code>. If you wish to not extract the value but also
specify unique storage, there is a new <code>BOOST_OUTCOME_TRYV2(refspec, expr)</code>.</p>
<p>My thanks to KamilCuk from <a href="https://stackoverflow.com/questions/66069152/token-detection-within-a-c-preprocessor-macro-argument">https://stackoverflow.com/questions/66069152/token-detection-within-a-c-preprocessor-macro-argument</a>
for all their help in designing the new overloaded TRY syntax. My thanks also to vasama for reporting this
issue and working through how best to fix it with me.</p></dd>
<dt><a href="https://github.com/ned14/outcome/issues/249">#249</a></dt>
<dd><p>The preprocessor logic for choosing when to use <code>bool</code> with <code>concept</code> on GCC was yet again refactored.
This should fix those choices of GCC configuration which caused failure due to the wrong combination
being chosen.</p></dd>
</dl>
<hr />
<h2 id="v2-1-5-11th-december-2020-boost-1-75-release-https-github-com-ned14-outcome-releases-tag-v2-1-5">v2.1.5 11th December 2020 (Boost 1.75) <a href="https://github.com/ned14/outcome/releases/tag/v2.1.5">[release]</a></h2>
<h3 id="enhancements-13">Enhancements:</h3>
<dl>
<dt><a href="./tutorial/advanced/hooks.html">The ADL discovered event hooks</a> have been replaced with policy-specified event hooks instead</dt>
<dd>This is due to brittleness (where hooks would quietly
self-disable if somebody changed something), compiler bugs (a difference in compiler settings causes
the wrong hooks, or some but not all hooks, to get discovered), and end user difficulty in using
them at all. The policy-specified event hooks can be told to default to ADL discovered hooks for
backwards compatibility: set <a href="./reference/macros/enable_legacy_support_for.html" class="api-reference"><code>BOOST_OUTCOME_ENABLE_LEGACY_SUPPORT_FOR</code></a>
to less than <code>220</code> to
enable emulation.</dd>
<dt>Improve configuring <code>BOOST_OUTCOME_GCC6_CONCEPT_BOOL</code></dt>
<dd>Older GCCs had boolean based concepts syntax, whereas newer GCCs are standards conforming.
However the precise logic of when to use legacy and conforming syntax was not well understood,
which caused Outcome to fail to compile depending on what options you pass to GCC. The new logic
always uses the legacy syntax if on GCC 8 or older, otherwise we use conforming syntax if and
only if GCC is in C++ 20 mode or later. This hopefully will resolve the corner case build
failures on GCC.</dd>
</dl>
<h3 id="bug-fixes-12">Bug fixes:</h3>
<dl>
<dt>Boost.Outcome should now compile with <code>BOOST_NO_EXCEPTIONS</code> defined</dt>
<dd>Thanks to Emil, maintainer of Boost.Exception, making a change for me, Boost.Outcome
should now compile with C++ exceptions globally disabled. You won&rsquo;t be able to use
<code>boost::exception_ptr</code> as it can&rsquo;t be included if C++ exceptions are globally disabled.</dd>
<dt><a href="https://github.com/ned14/outcome/issues/236">#236</a></dt>
<dd>In the Coroutine support the <code>final_suspend()</code> was not <code>noexcept</code>, despite being required
to be so in the C++ 20 standard. This has been fixed, but only if your compiler implements
<code>noop_coroutine</code>. Additionally, if <code>noop_coroutine</code> is available, we use the much more
efficient coroutine handle returning variant of <code>await_suspend()</code> which should significantly
improve codegen and context switching performance.</dd>
</dl>
<hr />
<h2 id="v2-1-4-14th-august-2020-boost-1-74-release-https-github-com-ned14-outcome-releases-tag-v2-1-4">v2.1.4 14th August 2020 (Boost 1.74) <a href="https://github.com/ned14/outcome/releases/tag/v2.1.4">[release]</a></h2>
<h3 id="enhancements-14">Enhancements:</h3>
<dl>
<dt>BREAKING CHANGE <code>void</code> results and outcomes no longer default construct types during explicit construction</dt>
<dd>Previously if you explicitly constructed a <code>result&lt;T&gt;</code> from a non-errored
<code>result&lt;void&gt;</code>, it default constructed <code>T</code>. This was found to cause unhelpful
surprise, so it has been disabled.</dd>
<dt>New macro <code>BOOST_OUTCOME_ENABLE_LEGACY_SUPPORT_FOR</code></dt>
<dd>The macro <a href="./reference/macros/enable_legacy_support_for.html" class="api-reference"><code>BOOST_OUTCOME_ENABLE_LEGACY_SUPPORT_FOR</code></a>
can be used to
enable aliasing of older naming and features to newer naming and features when
using a newer version of Outcome.</dd>
<dt>Concepts now have snake case style naming instead of camel case style</dt>
<dd>When Outcome was first implemented, it was thought that C++ 20 concepts were
going to have camel case style. This was changed before the C++ 20 release, and
Outcome&rsquo;s concepts have been renamed similarly. This won&rsquo;t break any code in
Outcome v2.1, as compatibility aliases are provided. However code compiled
against Outcome v2.2 will need to be upgraded, unless <code>BOOST_OUTCOME_ENABLE_LEGACY_SUPPORT_FOR</code>
is set to less than <code>220</code>.</dd>
<dt>Concepts now live in <code>BOOST_OUTCOME_V2_NAMESPACE::concepts</code> namespace</dt>
<dd>Previously concepts lived in the <code>convert</code> namespace, now they live in their
own namespace.</dd>
<dt>New concepts <a href="./reference/concepts/basic_result.html" class="api-reference"><code>basic_result&lt;T&gt;</code></a>
and <a href="./reference/concepts/basic_outcome.html" class="api-reference"><code>basic_outcome&lt;T&gt;</code></a>
added</dt>
<dd>End users were finding an unhelpful gap in between <a href="./reference/traits/is_basic_result.html" class="api-reference"><code>is_basic_result&lt;T&gt;</code></a>
and <a href="./reference/concepts/value_or_error.html" class="api-reference"><code>value_or_error&lt;T&gt;</code></a>
where they wanted a concept that matched
types which were <code>basic_result</code>, but not exactly one of those. Concepts filling
that gap were added.</dd>
<dt>Operation <code>TRY</code> works differently from Outcome v2.2 onwards</dt>
<dd>This is a severely code breaking change which change the syntax of how one uses
<code>BOOST_OUTCOME_TRY()</code>. A regular expression suitable for upgrading code can be found in
the list of changes between Outcome v2.1 and v2.2.</dd>
</dl>
<h3 id="bug-fixes-13">Bug fixes:</h3>
<dl>
<dt><a href="https://github.com/ned14/outcome/issues/224">#224</a></dt>
<dd>The clang Apple ships in Xcode 11.4 (currently the latest) has not been patched
with the fixes to LLVM clang that fix <code>noexcept(std::is_constructible&lt;T, void&gt;)</code>
failing to compile which I originally submitted years ago. So give up waiting on
Apple to fix their clang, add a workaround to Outcome.</dd>
<dt>Use of <code>void</code> in <code>T</code> or <code>E</code> caused <code>noexcept(false)</code></dt>
<dd>Direct traits examination of <code>void</code> was causing nothrow detection to return false,
fixed.</dd>
<dt>Spare storage could not be used from within no-value policy classes</dt>
<dd>Due to an obvious brain fart when writing the code at the time, the spare storage
APIs had the wrong prototype which prevented them working from within policy classes.
Sorry.</dd>
</dl>
<hr />
<h2 id="v2-1-3-29th-april-2020-boost-1-73-release-https-github-com-ned14-outcome-releases-tag-v2-1-3">v2.1.3 29th April 2020 (Boost 1.73) <a href="https://github.com/ned14/outcome/releases/tag/v2.1.3">[release]</a></h2>
<h3 id="enhancements-15">Enhancements:</h3>
<dl>
<dt>Performance of Outcome-based code compiled by clang has been greatly improved</dt>
<dd><p>The previous implementation of Outcome&rsquo;s status bitfield confused clang&rsquo;s
optimiser, which caused low quality codegen. Unlike most codegen issues, this was
noticeably in empirical benchmarks of real world code, as was shown by
<a href="https://wg21.link/P1886">P1886 <em>Error speed benchmarking</em></a>.</p>
<p>The safe part of the <a href="https://github.com/ned14/outcome/tree/better_optimisation"><code>better_optimisation</code></a>
Outcome v2.2.0 future branch was merged to Outcome v2.1.3 which includes a new
status bitfield implementation. This appears to not confuse clang&rsquo;s optimiser,
and clang 9 produces code which routinely beats GCC 9&rsquo;s code for various canned
use cases.</p></dd>
<dt>Precompiled headers are automatically enabled on new enough cmake&rsquo;s for standalone Outcome</dt>
<dd><p>If on cmake 3.16 or later, its new precompiled headers build support is used
to tell consumers of the <code>outcome::hl</code> cmake target to precompile Outcome, <strong>if
and only if</strong> <code>outcome_IS_DEPENDENCY</code> is false. <code>outcome_IS_DEPENDENCY</code> is set
by Outcome&rsquo;s CMakeLists.txt if it detects that it was included using
<code>add_subdirectory()</code>, so for the vast majority of Outcome end users, the use
of precompiled headers will NOT be enabled.</p>
<p>Exported targets do NOT request precompilation of headers, as it is
assumed that importers of the Outcome cmake targets will configure their own
precompiled headers which incorporate Outcome.</p></dd>
<dt>Installability is now CI tested per commit</dt>
<dd><p>Due to installability of standalone Outcome (e.g. <code>make install</code>) breaking
itself rather more frequently than is ideal, installability is now tested on CI
per commit.</p></dd>
<dt>Coroutines support has been documented</dt>
<dd><p>The coroutines support added in v2.1.2 has now been properly documented.</p></dd>
</dl>
<h3 id="bug-fixes-14">Bug fixes:</h3>
<dl>
<dt><a href="https://github.com/ned14/outcome/issues/214">#214</a></dt>
<dd>Newer Concepts implementing compilers were unhappy with the early check for
destructibility of <code>T</code> and <code>E</code>, so removed template constraints, falling back
to static assert which runs later in the type instantiation sequence.</dd>
<dt><a href="https://github.com/ned14/outcome/issues/215">#215</a></dt>
<dd>For standalone Outcome, <code>CMAKE_TOOLCHAIN_FILE</code> is now passed through during
dependency superbuild. This should solve build issues for some embedded toolchain
users.</dd>
<dt><a href="https://github.com/ned14/outcome/issues/220">#220</a></dt>
<dd>A false positive undefined behaviour sanitiser failure in some use cases of
Experimental Outcome was worked around to avoid the failure message.</dd>
<dt><a href="https://github.com/ned14/outcome/issues/221">#221</a></dt>
<dd>Restored compatibility with x86 on Windows, which was failing with link errors.
It was quite surprising that this bug was not reported sooner, but obviously
almost nobody is using Outcome with x86 on Windows.</dd>
<dt><a href="https://github.com/ned14/outcome/issues/223">#223</a></dt>
<dd>Fix a segfault in Debug builds only when cloning a <code>status_code_ptr</code> in
Experimental.Outcome only.</dd>
</dl>
<hr />
<h2 id="v2-1-2-11th-december-2019-boost-1-72-release-https-github-com-ned14-outcome-releases-tag-v2-1-2">v2.1.2 11th December 2019 (Boost 1.72) <a href="https://github.com/ned14/outcome/releases/tag/v2.1.2">[release]</a></h2>
<h3 id="enhancements-16">Enhancements:</h3>
<dl>
<dt>Improved compatibility with cmake tooling</dt>
<dd>Standalone outcome is now <code>make install</code>-able, and cmake <code>find_package()</code> can find it.
Note that you must separately install and <code>find_package()</code> Outcome&rsquo;s dependency, quickcpplib,
else <code>find_package()</code> of Outcome will fail.</dd>
<dt>Non-permissive parsing is now default in Visual Studio</dt>
<dd>The default targets in standalone Outcome&rsquo;s cmake now enable non-permissive parsing.
This was required partially because VS2019 16.3&rsquo;s quite buggy Concepts implementation is
unusuable in permissive parsing mode. Even then, lazy ADL two phase lookup is broken
in VS2019 16.3 with <code>/std:latest</code>, you may wish to use an earlier language standard.</dd>
<dt><strong>Breaking change!</strong></dt>
<dd>The git submodule mechanism used by standalone Outcome of specifying dependent libraries
has been replaced with a cmake superbuild of dependencies mechanism instead. Upon cmake
configure, an internal copy of quickcpplib will be git cloned, built and installed into the
build directory from where an internal <code>find_package()</code> uses it. This breaks the use of
the unconfigured Outcome repo as an implementation of Outcome, one must now do one of:
<ol>
<li>Add Outcome as subdirectory to cmake build.</li>
<li>Use cmake superbuild (i.e. <code>ExternalProject_Add()</code>) to build and install Outcome into
a local installation.</li>
<li>Use one of the single header editions.</li>
</ol></dd>
<dt><strong>Breaking change!</strong></dt>
<dd>For standalone Outcome, the current compiler is now checked for whether it will compile
code containing C++ Concepts, and if it does, all cmake consumers of Outcome will enable
C++ Concepts. Set the cmake variable <code>BOOST_OUTCOME_C_CONCEPTS_FLAGS</code> to an empty string to prevent
auto detection and enabling of C++ Concepts support occurring.</dd>
<dt><code>BOOST_OUTCOME_TRY</code> operation now hints to the compiler that operation will be successful</dt>
<dd><a href="https://wg21.link/P1886">P1886 <em>Error speed benchmarking</em></a> showed that there is
considerable gain in very small functions by hinting to the compiler whether the expression
is expected to be successful or not. <code>BOOST_OUTCOME_TRY</code> previously did not hint to the compiler
at all, but now it does. A new suite of macros <code>BOOST_OUTCOME_TRY_FAILURE_LIKELY</code> hint to the
compiler that failure is expected. If you wish to return to the previously unhinted
behaviour, define <code>BOOST_OUTCOME_TRY_LIKELY(expr)</code> to <code>(!!expr)</code>.</dd>
<dt><a href="https://github.com/ned14/outcome/issues/199">#199</a></dt>
<dd>Support for C++ Coroutines has been added. This comes in two parts, firstly there is
now an <code>BOOST_OUTCOME_CO_TRY()</code> operation suitable for performing the <code>TRY</code> operation from
within a C++ Coroutine. Secondly, in the header <code>outcome/coroutine_support.hpp</code> there are
implementations of <code>eager&lt;OutcomeType&gt;</code> and <code>lazy&lt;OutcomeType&gt;</code> which let you more
naturally and efficiently use <code>basic_result</code> or <code>basic_outcome</code> from within C++
Coroutines &ndash; specifically, if the result or outcome will construct from an exception
pointer, exceptions thrown in the coroutine return an errored or excepted result with
the thrown exception instead of throwing the exception through the coroutine machinery
(which in current compilers, has a high likelihood of blowing up the program). Both
<code>eager&lt;T&gt;</code> and <code>lazy&lt;T&gt;</code> can accept any <code>T</code> as well. Both have been tested and found
working on VS2019 and clang 9.</dd>
<dt><a href="https://github.com/ned14/outcome/issues/210">#210</a></dt>
<dd><code>make_error_code()</code> and <code>make_exception_ptr()</code> are now additionally considered for
compatible copy and move conversions for <code>basic_result&lt;&gt;</code>. This lets you construct
a <code>basic_result&lt;T, E&gt;</code> into a <code>basic_result&lt;T, error_code&gt;</code>, where <code>E</code> is a
custom type which has implemented the ADL discovered free function
<code>error_code make_error_code(E)</code>, but is otherwise unrelated to <code>error_code</code>.
The same availability applies for <code>exception_ptr</code> with <code>make_exception_ptr()</code> being
the ADL discovered free function. <code>basic_outcome&lt;&gt;</code> has less support for this than
<code>basic_result&lt;&gt;</code> in order to keep constructor count down, but it will accept via
this mechanism conversions from <code>basic_result&lt;&gt;</code> and <code>failure_type&lt;&gt;</code>.</dd>
</dl>
<h3 id="bug-fixes-15">Bug fixes:</h3>
<dl>
<dt><a href="https://github.com/ned14/outcome/issues/207">#184</a></dt>
<dd>The detection of <code>[[nodiscard]]</code> support in the compiler was very mildly broken.</dd>
</dl>
<hr />
<h2 id="v2-1-1-19th-august-2019-boost-1-71-release-https-github-com-ned14-outcome-releases-tag-v2-1-1">v2.1.1 19th August 2019 (Boost 1.71) <a href="https://github.com/ned14/outcome/releases/tag/v2.1.1">[release]</a></h2>
<h3 id="enhancements-17">Enhancements:</h3>
<dl>
<dt><a href="https://github.com/ned14/outcome/issues/184">#184</a></dt>
<dd>As per request from Boost release managers, relocated <code>version.hpp</code> and
<code>revision.hpp</code> into detail, and added the Boost licence boilerplate to the top
of every source file which was missing one (I think). Also took the opportunity
to run the licence restamping script over all Outcome, so copyright dates are now
up to date.</dd>
<dt><a href="https://github.com/ned14/outcome/issues/185">#185</a></dt>
<dd>Add FAQ item explaining issue #185, and why we will do nothing to
fix it right now.</dd>
<dt><a href="https://github.com/ned14/outcome/issues/189">#189</a></dt>
<dd>Refactored the <code>BOOST_OUTCOME_TRY</code> implementation to use more clarified
customisation points capable of accepting very foreign inputs. Removed the
<code>std::experimental::expected&lt;T, E&gt;</code> specialisations, as those are no longer
necessary. Fixed the documentation for the customisation points which
previously claimed that they are ADL discovered, which they are not. Added
a recipe describing how to add in support for foreign input types.</dd>
<dt><a href="https://github.com/ned14/outcome/issues/183">#183</a></dt>
<dd>Added a separate <code>motivation/plug_error_code</code> specifically for Boost.</dd>
</dl>
<h3 id="bug-fixes-16">Bug fixes:</h3>
<dl>
<dt>-</dt>
<dd><code>BOOST_OUTCOME_VERSION_MINOR</code> hadn&rsquo;t been updated to 1.</dd>
<dt><a href="https://github.com/ned14/outcome/issues/181">#181</a></dt>
<dd>Fix issue #181 where Outcome didn&rsquo;t actually implement the strong swap guarantee,
despite being documented as doing so.</dd>
<dt><a href="https://github.com/ned14/outcome/issues/190">#190</a></dt>
<dd>Fix issue #190 in Boost edition where unit test suite was not runnable from
the Boost release distro.</dd>
<dt><a href="https://github.com/ned14/outcome/issues/182">#182</a></dt>
<dd>Fix issue #182 where <code>trait::is_exception_ptr_available&lt;T&gt;</code> was always true,
thus causing much weirdness, like not printing diagnostics and trying to feed
everything to <code>make_exception_ptr()</code>.</dd>
<dt><a href="https://github.com/ned14/outcome/issues/192">#194</a></dt>
<dd>Fix issue #192 where the <code>std::basic_outcome_failure_exception_from_error()</code>
was being defined twice for translation units which combine standalone and
Boost Outcome&rsquo;s.</dd>
</dl>
<hr />
<h2 id="v2-1-12th-apr-2019-boost-1-70-release-https-github-com-ned14-outcome-releases-tag-v2-1">v2.1 12th Apr 2019 (Boost 1.70) <a href="https://github.com/ned14/outcome/releases/tag/v2.1">[release]</a></h2>
<ul>
<li><p><a href="https://github.com/ned14/outcome/issues/180">#180</a></p>
<ul>
<li><code>success()</code> and <code>failure()</code> now produce types marked <code>[[nodiscard]]</code>.</li>
</ul></li>
<li><p><code>include/outcome/outcome.natvis</code> is now namespace permuted like the rest of
Outcome, so debugging Outcome based code in Visual Studio should look much
prettier than before.</p></li>
<li><p><a href="https://github.com/ned14/outcome/issues/162">#162</a></p>
<ul>
<li><code>.has_failure()</code> was returning false at times when it should have returned true.</li>
</ul></li>
<li><p><a href="https://github.com/ned14/outcome/issues/152">#152</a></p>
<ul>
<li>GCC 5 no longer can compile Outcome at all due to <a href="https://stackoverflow.com/questions/45607450/gcc5-nested-variable-template-is-not-a-function-template">https://stackoverflow.com/questions/45607450/gcc5-nested-variable-template-is-not-a-function-template</a>.
Added explicit version trap for GCC 5 to say it can not work. Note this is not a
breaking change, GCC 5 was never supported officially in any v2 Outcome.</li>
</ul></li>
<li><p><a href="https://github.com/ned14/outcome/issues/150">#150</a></p>
<ul>
<li><strong>BREAKING CHANGE</strong> <code>result&lt;T, E&gt;</code>, <code>boost_result&lt;T, E&gt;</code> and <code>std_result&lt;T, E&gt;</code>
no longer implement hard UB on fetching a value from a valueless instance if <code>E</code> is
a UDT, they now fail to compile with a useful error message. If you wish hard UB,
use <code>unchecked&lt;T, E&gt;</code>, <code>boost_unchecked&lt;T, E&gt;</code> or <code>std_unchecked&lt;T, E&gt;</code> instead.</li>
</ul></li>
<li><p><a href="https://github.com/ned14/outcome/issues/140">#140</a></p>
<ul>
<li>Fixed a nasty corner case bug where value type&rsquo;s without a copy constructor
but with a move constructor would indicate via traits that copy construction
was available. Thanks to Microsoft&rsquo;s compiler team for reporting this issue.</li>
</ul></li>
<li><p>Added experimental <code>status_result</code> and <code>status_outcome</code> based on experimental
<code>status_code</code>.</p></li>
<li><p>Boost edition is now 100% Boost, so defaults for <code>result</code> and <code>outcome</code> are
<code>boost::system::error_code::errc_t</code> and <code>boost::exception_ptr</code>. Moreover,
the test suite in the Boost edition now exclusively tests the Boost edition.
One can, of course, freely use the standalone edition with Boost, and the Boost
edition with <code>std</code> types.</p></li>
<li><p>Renamed ADL discovered customisation point <code>throw_as_system_error_with_payload()</code>
to <code>outcome_throw_as_system_error_with_payload()</code>.</p></li>
<li><p><a href="https://github.com/ned14/outcome/issues/135">#135</a></p>
<ul>
<li>Added much clearer compile failure when user tries <code>result&lt;T, T&gt;</code> or <code>outcome</code>
where two or more types are identical. Thanks to Andrzej Krzemieński
for suggesting a technique which combines SFINAE correctness with
the remaining ability for <code>result&lt;T, T&gt;</code> etc to be a valid type, but
not constructible.</li>
</ul></li>
<li><p><a href="https://github.com/ned14/outcome/issues/67">#67</a></p>
<ul>
<li>Fixed one of the oldest long open bugs in Outcome, that the noexcept
unit tests failed on OS X for an unknown reason.</li>
</ul></li>
<li><p><a href="https://github.com/ned14/outcome/issues/115">#115</a></p>
<ul>
<li>Outcome did not construct correctly from <code>failure_type</code>.</li>
</ul></li>
<li><p>Inexplicably outcome&rsquo;s error + exception constructor had been removed.
Nobody noticed during the Boost peer review, which is worrying seeing as that
constructor is needed for one of the main advertised features to Boost!</p></li>
<li><p><a href="https://github.com/ned14/outcome/issues/107">#107</a> and <a href="https://github.com/ned14/outcome/issues/116">#116</a></p>
<ul>
<li><code>operator==</code> and <code>operator!=</code> now become disabled if the value, error and
exception types do not implement the same operator.</li>
<li>Relatedly, both comparison operators simply didn&rsquo;t work right. Fixed.</li>
</ul></li>
<li><p><a href="https://github.com/ned14/outcome/issues/109">#109</a></p>
<ul>
<li><code>swap()</code> now has correct <code>noexcept</code> calculation and now correctly orders
the swaps to be whichever is the throwing swap first.</li>
</ul></li>
<li><p>Added reference dump of v2.1 ABI so we can check if ABI breakage detection
works in the next set of changes, plus Travis job to check ABI and API compatibility
per commit.</p></li>
<li><p><a href="https://github.com/ned14/outcome/issues/124">#124</a></p>
<ul>
<li><code>BOOST_OUTCOME_TRY</code> is now overloaded and selects <code>void</code> or <code>auto</code> edition
according to input parameter count.</li>
</ul></li>
<li><p><a href="https://github.com/ned14/outcome/issues/120">#120</a></p>
<ul>
<li>Fix generation of double underscored temporary variables in
<code>BOOST_OUTCOME_UNIQUE_NAME</code>, which is UB.</li>
</ul></li>
<li><p><a href="https://github.com/ned14/outcome/issues/110">#110</a></p>
<ul>
<li>Separated <code>result</code> from its hard coded dependency on the <code>&lt;system_error&gt;</code> header.</li>
<li>Renamed <code>result</code> and <code>outcome</code> to <code>basic_result</code> and <code>basic_outcome</code>.</li>
<li>Renamed <code>result.hpp</code> into <code>basic_result.hpp</code>.</li>
<li>Moved <code>&lt;system_error&gt;</code> and <code>&lt;exception&gt;</code> dependent code into new
<code>std_result.hpp</code> and <code>std_outcome.hpp</code> header files.</li>
<li>Added <code>boost_result.hpp</code> and <code>boost_outcome.hpp</code> which use Boost.System
and Boost.Exception (these are <code>result.hpp</code> and <code>outcome.hpp</code> in the Boost edition).</li>
</ul></li>
</ul>
<hr />
<h2 id="v2-0-18th-jan-2018-release-https-github-com-ned14-outcome-releases-tag-v2-0-boost-peer-review">v2.0 18th Jan 2018 <a href="https://github.com/ned14/outcome/releases/tag/v2.0-boost-peer-review">[release]</a></h2>
<ul>
<li>Boost peer review edition. This is what was reviewed.</li>
<li>Changelog from v1 can be found in the release notes for this release.</li>
</ul>
</div><p><small>Last revised: January 08, 2026 at 18:51:10 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="./videos.html"><img src="./images/prev.png" alt="Prev"></a>
<a accesskey="u" href="./index.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="./changelog/upgrade_v21_v22.html"><img src="./images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,107 @@
<!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>Upgrade guide v2.1 =&gt; v2.2 - 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="../changelog.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../changelog.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="../changelog/v22.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both">Upgrade guide v2.1 =&gt; v2.2</h1></div></div></div>
<p>In the start of 2020, after a year of listening to user feedback since
entering Boost, Outcome v2.2 was published with a number of breaking source
changes from Outcome v2.1 The full year of 2020 (three Boost releases) was given to
announcing those upcoming changes, and testing the v2.2 branch in
production. In late December 2020, Outcome v2.2 became the default Outcome,
and all Outcome v2.1 code shall need to be upgraded to work with v2.2.</p>
<p>To upgrade an Outcome v2.1 based codebase to Outcome v2.2 is very easy:</p>
<ol>
<li><p>You will need a tool capable of finding regular expressions in all source
files in a directory tree and replacing them &ndash; most IDEs such as Visual Studio
have such a tool with GUI, on POSIX a shell script such as this ought to work:</p>
<pre><code>find /path/to/project -type f -name &quot;*.hpp&quot; | xargs sed -i &quot;s/_TRY\(([^(]*?),(.*?)\);/_TRY((auto &amp;&amp;, \1),\2);/g&quot;
find /path/to/project -type f -name &quot;*.cpp&quot; | xargs sed -i &quot;s/_TRY\(([^(]*?),(.*?)\);/_TRY((auto &amp;&amp;, \1),\2);/g&quot;
find /path/to/project -type f -name &quot;*.hpp&quot; | xargs sed -i &quot;s/_TRY\(([^(]*?)\);/_TRYV2(auto &amp;&amp;, \1);/g&quot;
find /path/to/project -type f -name &quot;*.cpp&quot; | xargs sed -i &quot;s/_TRY\(([^(]*?)\);/_TRYV2(auto &amp;&amp;, \1);/g&quot;
</code></pre>
<p>The transformation needed are the regular expressions <code>_TRY\(([^(]*?),(.*?)\);</code> =&gt;
<code>_TRY((auto &amp;&amp;, \1),\2);</code> and <code>TRY\(([^(]*?)\);</code> =&gt; <code>_TRYV2(auto &amp;&amp;, \1);</code>.
This is because in Outcome v2.2 onwards, <code>BOOST_OUTCOME_TRY(var, expr)</code>
no longer implicitly declares the variable created as <code>auto&amp;&amp;</code> on your behalf,
now you must specify the storage of the variable. It also declares the internal
uniquely named temporary as a value rather than as a reference, the initial
brackets overrides this to force the use of a rvalue reference for the internal
uniquely named temporary instead.</p>
<p>This makes use of Outcome&rsquo;s <a href="../tutorial/essential/result/try_ref.html">new TRY syntax</a>
to tell the TRY operation to use references rather than values for the internal
uniquely named temporary, thus avoiding any copies and moves. The only way to
override the storage of the internal uniquely named temporary for non-value
outputting TRY is via the new <code>BOOST_OUTCOME_TRYV2()</code> which takes the storage specifier
you desire as its first parameter.</p>
<p>The principle advantage of this change is that you can now assign to
existing variables the successful results of expressions, instead of being
forced to TRY into a new variable, and move that variable into the destination
you intended. Also, because you can now specify storage, you can now assign
the result of a TRYied operation into static or thread local storage.</p></li>
<li><p>The find regex and replace rule above is to preserve exact semantics with
Outcome v2.1 whereby the internal uniquely named temporary and the variable for
the value are both rvalue references. If you&rsquo;re feeling like more work, it is
safer if you convert as many <code>BOOST_OUTCOME_TRY((auto &amp;&amp;, v), expr)</code> to
<code>BOOST_OUTCOME_TRY(auto &amp;&amp;v, expr)</code> as possible. This will mean that TRY &lsquo;consumes&rsquo;
<code>expr</code> i.e. moves it into the internal uniquely named temporary, if expr is
an rvalue reference. Usually this does not affect existing code, but occasionally
it can, generally a bit of code reordering will fix it.</p></li>
<li><p>If your code uses <a href="../tutorial/advanced/hooks.html">the ADL discovered event hooks</a>
to intercept when <code>basic_result</code> and <code>basic_outcome</code> is constructed, copies or
moved, you will need to either define the macro <a href="../reference/macros/enable_legacy_support_for.html" class="api-reference"><code>BOOST_OUTCOME_ENABLE_LEGACY_SUPPORT_FOR</code></a>
to less than <code>220</code> to enable emulation, or upgrade the code to use the new mechanism.</p>
<p>The hooks themselves have identical signature, <a href="../tutorial/advanced/hooks.html">only the name and location has
changed</a>. Therefore upgrade is usually
a case of copy-pasting the hook implementation into a custom <code>NoValuePolicy</code>
implementation, and changing the ADL free function&rsquo;s name from <code>hook_*</code> to <code>on_*</code>.</p>
<p>You are recommended to upgrade if possible, as the ADL discovered hooks were
found in real world code usage to be brittle and surprising.</p></li>
<li><p>Any usage of CamelCase named concepts from Outcome must be replaced with snake_case
named concepts instead:</p>
<ul>
<li><code>concepts::ValueOrError&lt;T&gt;</code> =&gt; <code>concepts::value_or_error&lt;T&gt;</code></li>
<li><code>concepts::ValueOrNone&lt;T&gt;</code> =&gt; <code>concepts::value_or_none&lt;T&gt;</code></li>
</ul>
<p>The CamelCase naming is aliased to the snake_case naming if the macro
<a href="../reference/macros/enable_legacy_support_for.html" class="api-reference"><code>BOOST_OUTCOME_ENABLE_LEGACY_SUPPORT_FOR</code></a>
is defined to less than <code>220</code>.
Nevertheless you ought to upgrade here is possible, as due to a late change
in C++ 20 all standard concepts are now snake_case named.</p></li>
<li><p>Finally, despite that Outcome does not currently offer a stable ABI guarantee
(hoped to begin in 2022), v2.1 had a stable storage layout for <code>basic_result</code> and
<code>basic_outcome</code>. In v2.2 that storage layout has changed, so the ABIs generated by
use of v2.1 and v2.2 are incompatible i.e. you will need to recompile everything
using Outcome after you upgrade to v2.2.</p></li>
</ol>
</div><p><small>Last revised: February 23, 2021 at 17:37:27 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../changelog.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../changelog.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="../changelog/v22.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,83 @@
<!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>v2.2 major changes - 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="../changelog/upgrade_v21_v22.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../changelog.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="../history.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both">v2.2 major changes</h1></div></div></div>
<p>Major changes in v2.2 over v2.1 are listed here.</p>
<ol>
<li><p>A new trait <code>is_move_bitcopying&lt;T&gt;</code> is added, which opts types into a library-based emulation of
<a href="https://wg21.link/P1029">P1029 <em>move = bitcopies</em></a>. <a href="https://wg21.link/P1028">Experimental <code>std::error</code></a> is opted in by default.
If this trait is true for your <code>T</code> or <code>E</code> type, Outcome will track moved-from status for your type,
and will only call your type&rsquo;s destructor if it was not moved from. If your compiler&rsquo;s optimiser is
sufficiently able to fold code, this improves codegen quality for Experimental Outcome very considerably,
approaching the same gains as P1029 types would have. Note that the empirical performance difference
will likely be nil, but the codegen does look much more elegant.</p></li>
<li><p>If for <code>basic_result&lt;T, E&gt;</code> both <code>T</code> and <code>E</code> are trivially copyable, union-based rather than
struct-based storage will be used. This significantly improves performance in synthetic benchmarks
which do nothing in deep call stacks of function calls except create and return <code>result&lt;T, E&gt;</code>, and
makes Outcome return competitive results to alternative error handling choices, improving comparative
optics. It is not expected that the performance difference will be detectable empirically in real
world code. It is expected that the build time impact of union storage won&rsquo;t be noticeable, as
union storage for trivially copyable types is much easier than for non-TC types.</p>
<p>Note that storage remains struct-based if either <code>T</code> or <code>E</code> is neither trivially copyable nor for
which trait <code>is_move_bitcopying&lt;T&gt;</code> is true. This is because union-based storage for complex
types has significant build time impact, as anyone who has deployed <code>std::variant</code> or
<code>std::expected</code> into globally visible public APIs will have noticed.</p></li>
<li><p>The compile time requirement for <code>E</code> types to have a default constructor is removed.</p></li>
<li><p><code>BOOST_OUTCOME_TRY(var, expr)</code> no longer always declares <code>var</code> as <code>auto &amp;&amp;var</code>, but simply uses it
as is. This allows <code>TRY</code> to initialise or assign. You can use the macro <code>OUTCOME21_TRY</code> if you
want the pre-Outcome v2.2 behaviour. You may find the regular expression <code>_TRY\(([^(]*?),(.*?)\);</code> =&gt;
<code>_TRY(auto &amp;&amp;\1,\2);</code> of use to you when upgrading code.</p></li>
<li><p><code>BOOST_OUTCOME_TRY</code> now declares its internal uniquely named temporary variable which holds the result
of the expression as <code>auto unique = expr</code> instead of <code>auto &amp;&amp;unique = expr</code>. This will cause TRY of
<code>result&lt;UncopyableAndImmovable&gt;</code> and <code>outcome&lt;UncopyableAndImmovable&gt;</code> to fail to compile, whereas
previously they did compile. Another big change in semantic is that TRY now will &lsquo;consume&rsquo; values
moved into it, whereas previously it did not/ The reason for this change was that the previous behaviour
produced undefined behaviour in various corner use cases, particulary in generic code. You can tell
TRY to use references instead of values for its uniquely named temporary <a href="../tutorial/essential/result/try_ref.html">using a special
syntax</a>.</p></li>
<li><p><code>BOOST_OUTCOME_TRY</code> now propagates the value from <a href="../reference/functions/hooks/spare_storage.html" class="api-reference"><code>spare_storage(const basic_result|basic_outcome *) noexcept</code></a>
of the input Result/Outcome into any <a href="../reference/traits/is_failure_type.html" class="api-reference"><code>failure_type&lt;T&gt;</code></a>
returned by TRY. Result/Outcome
now sets its spare storage value from any <a href="../reference/types/success_type.html" class="api-reference"><code>success_type&lt;T&gt;</code></a>
or <a href="../reference/traits/is_failure_type.html" class="api-reference"><code>failure_type&lt;T&gt;</code></a>
from which it is constructed. This is a breaking change, as spare storage values were not propagated
beforehand. However this change means that any stack backtrace identifier captured by a failed
result construction hook is now fully propagated from failure point up through all TRY operations
to the code which handles the failure.</p></li>
<li><p><a href="../tutorial/advanced/hooks.html">The ADL discovered event hooks</a> have been replaced
with policy-specified event hooks instead. This is due to brittleness (where hooks would quietly
self-disable if somebody changed something), compiler bugs (a difference in compiler settings causes
the wrong hooks, or some but not all hooks, to get discovered), and end user difficulty in using
them at all. The policy-specified event hooks can be told to default to ADL discovered hooks for
backwards compatibility: set <a href="../reference/macros/enable_legacy_support_for.html" class="api-reference"><code>BOOST_OUTCOME_ENABLE_LEGACY_SUPPORT_FOR</code></a>
to less than <code>220</code> to
enable emulation.</p></li>
</ol>
</div><p><small>Last revised: February 23, 2021 at 17:37:27 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../changelog/upgrade_v21_v22.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../changelog.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="../history.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

228
doc/html/credits.html Normal file
View File

@@ -0,0 +1,228 @@
<!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>Acknowledgements - 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="u" href="./index.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="./requirements.html"><img src="./images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both">Acknowledgements</h1></div></div></div>
<h2 id="github-contributors">github contributors</h2>
<style type="text/css">
.ghContributors{
display:flex;
flex-flow: wrap;
align-content: flex-start
}
.ghContributors > div{
width: 50% ;
display: inline-flex;
margin-bottom: 5px;
}
.ghContributors > div label{
padding-left: 4px ;
}
.ghContributors > div span{
font-size: x-small;
padding-left: 4px ;
}
</style>
<div class="ghContributors">
<div>
<img src="https://avatars.githubusercontent.com/u/230408?v=4" class="inline" width="32" height="32" style="height: 32px;height: 32px;margin-bottom:.25em; vertical-align:middle; ">
<label><a href="https://github.com/ned14">@ned14</a></label>
<span class="contributions">1550 commits</span>
</div>
<div>
<img src="https://avatars.githubusercontent.com/u/2912717?v=4" class="inline" width="32" height="32" style="height: 32px;height: 32px;margin-bottom:.25em; vertical-align:middle; ">
<label><a href="https://github.com/akrzemi1">@akrzemi1</a></label>
<span class="contributions">45 commits</span>
</div>
<div>
<img src="https://avatars.githubusercontent.com/u/10555060?v=4" class="inline" width="32" height="32" style="height: 32px;height: 32px;margin-bottom:.25em; vertical-align:middle; ">
<label><a href="https://github.com/cstratopoulos">@cstratopoulos</a></label>
<span class="contributions">9 commits</span>
</div>
<div>
<img src="https://avatars.githubusercontent.com/u/63265?v=4" class="inline" width="32" height="32" style="height: 32px;height: 32px;margin-bottom:.25em; vertical-align:middle; ">
<label><a href="https://github.com/hazelnusse">@hazelnusse</a></label>
<span class="contributions">7 commits</span>
</div>
<div>
<img src="https://avatars.githubusercontent.com/u/5796962?v=4" class="inline" width="32" height="32" style="height: 32px;height: 32px;margin-bottom:.25em; vertical-align:middle; ">
<label><a href="https://github.com/BurningEnlightenment">@BurningEnlightenment</a></label>
<span class="contributions">7 commits</span>
</div>
<div>
<img src="https://avatars.githubusercontent.com/u/47703951?v=4" class="inline" width="32" height="32" style="height: 32px;height: 32px;margin-bottom:.25em; vertical-align:middle; ">
<label><a href="https://github.com/libbooze">@libbooze</a></label>
<span class="contributions">2 commits</span>
</div>
<div>
<img src="https://avatars.githubusercontent.com/u/10340167?v=4" class="inline" width="32" height="32" style="height: 32px;height: 32px;margin-bottom:.25em; vertical-align:middle; ">
<label><a href="https://github.com/johnthagen">@johnthagen</a></label>
<span class="contributions">2 commits</span>
</div>
<div>
<img src="https://avatars.githubusercontent.com/u/12157332?v=4" class="inline" width="32" height="32" style="height: 32px;height: 32px;margin-bottom:.25em; vertical-align:middle; ">
<label><a href="https://github.com/menuet">@menuet</a></label>
<span class="contributions">2 commits</span>
</div>
<div>
<img src="https://avatars.githubusercontent.com/u/8223327?v=4" class="inline" width="32" height="32" style="height: 32px;height: 32px;margin-bottom:.25em; vertical-align:middle; ">
<label><a href="https://github.com/amerry">@amerry</a></label>
<span class="contributions">1 commits</span>
</div>
<div>
<img src="https://avatars.githubusercontent.com/u/801922?v=4" class="inline" width="32" height="32" style="height: 32px;height: 32px;margin-bottom:.25em; vertical-align:middle; ">
<label><a href="https://github.com/ecatmur">@ecatmur</a></label>
<span class="contributions">1 commits</span>
</div>
<div>
<img src="https://avatars.githubusercontent.com/u/51795?v=4" class="inline" width="32" height="32" style="height: 32px;height: 32px;margin-bottom:.25em; vertical-align:middle; ">
<label><a href="https://github.com/gix">@gix</a></label>
<span class="contributions">1 commits</span>
</div>
<div>
<img src="https://avatars.githubusercontent.com/u/6080778?v=4" class="inline" width="32" height="32" style="height: 32px;height: 32px;margin-bottom:.25em; vertical-align:middle; ">
<label><a href="https://github.com/norbertwenzel">@norbertwenzel</a></label>
<span class="contributions">1 commits</span>
</div>
<div>
<img src="https://avatars.githubusercontent.com/u/865914?v=4" class="inline" width="32" height="32" style="height: 32px;height: 32px;margin-bottom:.25em; vertical-align:middle; ">
<label><a href="https://github.com/vinipsmaker">@vinipsmaker</a></label>
<span class="contributions">1 commits</span>
</div>
<div>
<img src="https://avatars.githubusercontent.com/u/5369819?v=4" class="inline" width="32" height="32" style="height: 32px;height: 32px;margin-bottom:.25em; vertical-align:middle; ">
<label><a href="https://github.com/alandefreitas">@alandefreitas</a></label>
<span class="contributions">1 commits</span>
</div>
<div>
<img src="https://avatars.githubusercontent.com/u/5228?v=4" class="inline" width="32" height="32" style="height: 32px;height: 32px;margin-bottom:.25em; vertical-align:middle; ">
<label><a href="https://github.com/andoks">@andoks</a></label>
<span class="contributions">1 commits</span>
</div>
<div>
<img src="https://avatars.githubusercontent.com/u/375302?v=4" class="inline" width="32" height="32" style="height: 32px;height: 32px;margin-bottom:.25em; vertical-align:middle; ">
<label><a href="https://github.com/catskul">@catskul</a></label>
<span class="contributions">1 commits</span>
</div>
<div>
<img src="https://avatars.githubusercontent.com/u/11360975?v=4" class="inline" width="32" height="32" style="height: 32px;height: 32px;margin-bottom:.25em; vertical-align:middle; ">
<label><a href="https://github.com/hyeongyukim">@hyeongyukim</a></label>
<span class="contributions">1 commits</span>
</div>
<div>
<img src="https://avatars.githubusercontent.com/u/5522782?v=4" class="inline" width="32" height="32" style="height: 32px;height: 32px;margin-bottom:.25em; vertical-align:middle; ">
<label><a href="https://github.com/jenkins-nedprod">@jenkins-nedprod</a></label>
<span class="contributions">1 commits</span>
</div>
<div>
<img src="https://avatars.githubusercontent.com/u/1257803?v=4" class="inline" width="32" height="32" style="height: 32px;height: 32px;margin-bottom:.25em; vertical-align:middle; ">
<label><a href="https://github.com/sdarwin">@sdarwin</a></label>
<span class="contributions">1 commits</span>
</div>
</div>
<h2 id="this-pretty-modern-c-documentation">This pretty, modern C++ documentation</h2>
<ul>
<li><a href="https://gohugo.io">Hugo</a> - static website generator of this documentation.</li>
<li><a href="https://github.com/vjeantet/hugo-theme-docdock">hugo-theme-docdock</a> - the Hugo theme used by this documentation.</li>
<li><a href="https://github.com/foonathan/standardese">Standardese</a> - the API reference generator (up until Outcome v2.0)</li>
</ul>
<h1 id="special-thanks-for-outcome-v2-1">Special thanks for Outcome v2.1</h1>
<p>Once again Andrzej Krzemienski stands out for a never ceasing flow of excellent questions,
&ldquo;what if?&rdquo;&rsquo;s, eagle eyed spotting of corner case logic bugs, and design contradictions.
Thank you Andrzej!</p>
<p>My thanks to the Microsoft Visual C++ compiler team for incorporating Outcome into the
MSVC test suite, and thus finding many interesting corner case quirks in how best to
interpret the C++ standard. In some cases, Outcome was refactored to be less ambiguous;
in others, defects had to be submitted to WG21 because the standard wording was not clear.
The Visual C++ compiler team were particularly generous with their time in helping track
down the cause of these issues, complete with submitting pull requests with bug fixes.
I am very grateful to them.</p>
<h1 id="special-thanks-for-outcome-v2-0">Special thanks for Outcome v2.0</h1>
<p>For a second time, Charley Bay stepped up as review manager. Given how much work it was
for the v1 review, I can only say <strong>thank you</strong>.</p>
<p>Andrzej Krzemienski went far beyond the call of duty in the development of Outcome v2.
He wrote the front page, and the start of the tutorial. He thus set the tone, pacing,
style and form of the tutorial which I merely continued for the rest of the tutorial.
He also volunteered considerable amounts of his time as as primary peer reviewer for
the v2 design and implementation, asking many very valuable &ldquo;stupid questions&rdquo; at least
one of which caused a major rethink and refactor. If Outcome v2 passes its second peer
review, it&rsquo;s because of Andrzej. Thank you.</p>
<p>Jonathan Müller invested countless hours in his doxygen replacement tool Standardese
which Outcome uses to generate the reference API docs, and a not insignificant number
of those went on fixing issues for Outcome. Thank you.</p>
<h1 id="special-thanks-for-outcome-v1">Special thanks for Outcome v1</h1>
<p>To Paul Bristow who <a href="https://lists.boost.org/Archives/boost/2015/05/222687.php">
proposed the name &ldquo;Outcome&rdquo;</a> for the library after a very extended
period of name bikeshedding on boost-dev. I had been minded to call the library &ldquo;Boost.Donkey&rdquo;
just to shut everyone up because the name bike shedding was getting ridiculous. But
Outcome is a lot nicer, so thank you Paul.</p>
<p>My heartfelt thanks to Charley Bay for acting as review manager for Outcome in May 2017.
It is becoming ever harder to find a Boost review manager, so thank you! My thanks also
to the CppCast team Rob Irving and Jason Turner for so quickly getting me on to CppCast
to discuss <code>expected&lt;T, E&gt;</code> during the Outcome peer review to help publicise the review.</p>
<p>More general thanks are due to those on boost-dev, Reddit and SG14 for extensive and often very detailed
feedback on the library pretty much from its beginning. You are all too numerous to
remember, but certainly Tongari and Andrzej Krzemienski come to mind as having engaged
in particularly long discussion threads with tons of useful feedback which clarified my
thinking. Andrzej also went through the documentation with a fine toothed comb before the
review, finding many small errata and confusing wording.</p>
<p>Finally, my thanks to Vicente for driving Expected from its beginnings to hopefully
standardisation before 2020. It&rsquo;s many years of work getting something standardised, even
more years than getting a library into Boost which as you can see from the history above
took about three years.</p>
</div><p><small>Last revised: January 25, 2019 at 23:04:27 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="./history.html"><img src="./images/prev.png" alt="Prev"></a>
<a accesskey="u" href="./index.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="./requirements.html"><img src="./images/next.png" alt="Next"></a></div></body>
</html>

1126
doc/html/css/boost.css Normal file

File diff suppressed because it is too large Load Diff

169
doc/html/css/local.css Normal file
View File

@@ -0,0 +1,169 @@
body {
text-align: justify;
}
h2, h3, h4, h5, h6 {
text-align: left;
}
article section.page h1:first-of-type {
font-weight: 900;
text-transform: inherit;
line-height: 3.25rem;
}
article > aside .menu {
text-align: left;
}
article > aside .menu code {
border-left: 0.25em solid transparent;
border-right: 0.25em solid transparent;
}
h1 {
font-weight: inherit;
line-height: 3.25rem;
}
h2 {
text-transform: none;
font-weight: inherit;
line-height: 2.55rem;
}
h4 {
line-height: 1.9rem;
font-size: small;
}
dd {
margin-inline-start: 40px;
}
blockquote {
border-left: 4px solid #ccc;
background: #f9f9f9;
font-style: italic;
padding-left: 4em;
padding-right: 4em;
quotes: "\201C""\201D""\2018""\2019";
}
figure figcaption {
margin-top: -2em;
}
figure figcaption h4 {
text-align: center;
}
code, pre {
text-align: left;
}
a code {
color: inherit;
}
a.api-reference {
font-family: monospace;
}
div.footnotes {
font-size: 85%;
}
article section.page pre .copy-to-clipboard {
background-color: #eee;
}
div.code-snippet {
position: relative;
}
div.code-snippet a.code-snippet-url {
font-size: small;
position: absolute;
right: 3em;
top: 0.7em;
}
/*nav#TableOfContents {
width: 30em;
float: right;
text-align: left;
font-size: inherit !important;
}
nav#TableOfContents > ul {
list-style: none;
}
nav#TableOfContents > ul > li > ul {
border-radius: 5px;
box-shadow: 0px 0px 10px #000000;
background-color: white;
padding-right: 1em;
list-style-type: lower-roman;
}
nav#TableOfContents > ul > li > ul > li {
line-height: normal;
margin-top: 0.25em;
margin-bottom: 0.25em;
}
nav#TableOfContents > ul > li > ul > li > a.highlight {
display: inline;
}
nav#TableOfContents > ul > li > ul > li > a.highlight code {
vertical-align: inherit;
}*/
#navigation a {
color: blue;
}
.children p {
font-size: small;
margin-top: 0px;
margin-bottom: 0px;
padding-top: 0px;
padding-bottom: 0px;
}
.children-li p {
font-size: small;
font-style: italic;
}
ol.children li {
margin-top: 0.75em;
}
ol.children ol {
list-style-type: lower-alpha;
}
ol.children ol li {
margin-top: 0;
}
/* Background */ .chroma { background-color: #ffffff }
/* Error */ .chroma .err { }
/* LineTableTD */ .chroma .lntd { ; vertical-align: top; padding: 0; margin: 0; border: 0; }
/* LineTable */ .chroma .lntable { ; border-spacing: 0; padding: 0; margin: 0; border: 0; width: 100%; overflow: auto; display: block; }
/* LineHighlight */ .chroma .hl { background-color: #ffffcc; display: block; width: 100% }
/* LineNumbersTable */ .chroma .lnt { ; margin-right: 0.4em; padding: 0 0.4em 0 0.4em; display: block; }
/* LineNumbers */ .chroma .ln { ; margin-right: 0.4em; padding: 0 0.4em 0 0.4em; }
/* Keyword */ .chroma .k { color: #0000ff }
/* KeywordConstant */ .chroma .kc { color: #0000ff }
/* KeywordDeclaration */ .chroma .kd { color: #0000ff }
/* KeywordNamespace */ .chroma .kn { color: #0000ff }
/* KeywordPseudo */ .chroma .kp { color: #0000ff }
/* KeywordReserved */ .chroma .kr { color: #0000ff }
/* KeywordType */ .chroma .kt { color: #2b91af }
/* NameClass */ .chroma .nc { color: #2b91af }
/* LiteralString */ .chroma .s { color: #a31515 }
/* LiteralStringAffix */ .chroma .sa { color: #a31515 }
/* LiteralStringBacktick */ .chroma .sb { color: #a31515 }
/* LiteralStringChar */ .chroma .sc { color: #a31515 }
/* LiteralStringDelimiter */ .chroma .dl { color: #a31515 }
/* LiteralStringDoc */ .chroma .sd { color: #a31515 }
/* LiteralStringDouble */ .chroma .s2 { color: #a31515 }
/* LiteralStringEscape */ .chroma .se { color: #a31515 }
/* LiteralStringHeredoc */ .chroma .sh { color: #a31515 }
/* LiteralStringInterpol */ .chroma .si { color: #a31515 }
/* LiteralStringOther */ .chroma .sx { color: #a31515 }
/* LiteralStringRegex */ .chroma .sr { color: #a31515 }
/* LiteralStringSingle */ .chroma .s1 { color: #a31515 }
/* LiteralStringSymbol */ .chroma .ss { color: #a31515 }
/* OperatorWord */ .chroma .ow { color: #0000ff }
/* Comment */ .chroma .c { color: #008000 }
/* CommentHashbang */ .chroma .ch { color: #008000 }
/* CommentMultiline */ .chroma .cm { color: #008000 }
/* CommentSingle */ .chroma .c1 { color: #008000 }
/* CommentSpecial */ .chroma .cs { color: #008000 }
/* CommentPreproc */ .chroma .cp { color: #0000ff }
/* CommentPreprocFile */ .chroma .cpf { color: #0000ff }
/* GenericEmph */ .chroma .ge { font-style: italic }
/* GenericHeading */ .chroma .gh { font-weight: bold }
/* GenericPrompt */ .chroma .gp { font-weight: bold }
/* GenericStrong */ .chroma .gs { font-weight: bold }
/* GenericSubheading */ .chroma .gu { font-weight: bold }

112
doc/html/experimental.html Normal file
View File

@@ -0,0 +1,112 @@
<!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>Experimental - 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="./recipes/rust.html"><img src="./images/prev.png" alt="Prev"></a>
<a accesskey="u" href="./index.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="./experimental/advantages.html"><img src="./images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both">Experimental</h1></div></div></div>
<p>In <code>&lt;boost/outcome/experimental&gt;</code>, there ships an Outcome-based simulation of
the proposed <a href="https://wg21.link/P1095">P1095 <em>Zero overhead deterministic failure</em></a>
specific implementation of <a href="http://wg21.link/P0709">P0709 <em>Zero overhead exceptions: Throwing values</em></a>.
This library-only implementation lets you use a close simulacrum
of potential future C++ lightweight exceptions today in <a href="./requirements.html">any C++ 14 compiler
which Outcome supports</a>.</p>
<p>This Experimental Outcome implementation has been in production use for some
years now. It has shipped on at least one billion devices, as part of a
games suite very popular on Microsoft Windows, Apple iOS and Google Android
devices. It powers big iron enterprise applications as well, indeed all
trades including futures in the United States are captured live into a database
for the SEC by an Experimental Outcome based codebase. Finally, Experimental
Outcome is used in the firmware of parts of driver assisting cars where its
particularly rich and flexible failure added information combined with
compatibility with globally disabled C++ exceptions proved to be a big win.</p>
<p>The base for failure handling in future C++ might be <code>std::error</code> from <a href="https://wg21.link/P1028">P1028
<code>status_code</code></a>. This proposal is currently being
refined before WG21&rsquo;s Library Evolution Working Group with the expectation that
it will be standardised as a large enhancement and backwards compatible superset
of <code>std::error_code</code> which is also capable of transporting any move-only type
such as <code>std::exception_ptr</code>. Like <code>std::error_code</code>, proposed <code>std::error</code>
occupies exactly two CPU registers of layout, and thus is extremely lightweight.
It can wrap arbitrary third party error handling systems, and automatically
constructs from <code>std::error_code</code> and <code>std::exception_ptr</code>, propagating the
original underlying implementations (no matter how customised) exactly (e.g.
<code>boost::exception_ptr</code>). Unlike <code>&lt;system_error&gt;</code>, <code>std::error</code> does not have
dependencies on expensive standard library headers, so including it into your
global build has a very low build time impact. <code>std::error</code> knows how to throw
itself as a conventional C++ exception, and knows how to losslessly consume
arbitrary C++ exception throws. Finally, <code>std::error</code> is ABI stable, and is
a <a href="https://wg21.link/P1029">P1029 move bitcopying</a> type whereby moved-from
objects do not need to be destroyed.</p>
<hr />
<p>Experimental Outcome uses the <a href="https://wg21.link/P1028">same proposed <code>std::error</code> object as P1095 would do
for its <code>E</code> type</a> by bundling internally a copy of
<a href="https://ned14.github.io/status-code/">https://ned14.github.io/status-code/</a>, the reference implementation library
for proposed <code>std::error</code>. Outcome emulates move bitcopying semantics for types
declaring themselves move bitcopying via the trait <a href="./reference/traits/is_move_bitcopying.html" class="api-reference"><code>is_move_bitcopying&lt;T&gt;</code></a>
,
and status codes opt into this. This greatly improves codegen to be no worse
than with <code>std::error_code</code> (a trivially copyable type), as <a href="https://godbolt.org/z/GEdEGc">https://godbolt.org/z/GEdEGc</a>
demonstrates, despite that proposed <code>std::error</code> is a move-only type with
a non-trivial destructor.</p>
<p>Outcome binds <code>status_code</code> into <code>basic_result</code> and <code>basic_outcome</code> customisations
via the following headers:</p>
<ul>
<li><code>&lt;boost/outcome/experimental/status_result.hpp&gt;</code></li>
<li><code>&lt;boost/outcome/experimental/status_outcome.hpp&gt;</code></li>
</ul>
<p>These headers import the entire contents of the <code>BOOST_OUTCOME_SYSTEM_ERROR2_NAMESPACE</code>
namespace into the <code>BOOST_OUTCOME_V2_NAMESPACE::experimental</code> namespace. You
can thus address everything in <code>BOOST_OUTCOME_SYSTEM_ERROR2_NAMESPACE</code> via
<code>BOOST_OUTCOME_V2_NAMESPACE::experimental</code>.</p>
<p>As P1095 also proposes C language support for lightweight C++ exceptions,
experimental Outcome also has a macro-based C interface that enables C
code to work with the C-compatible subset of <code>status_result&lt;T, E&gt;</code>:</p>
<ul>
<li><code>&lt;boost/outcome/experimental/result.h&gt;</code></li>
</ul>
<p>For non-Windows non-POSIX platforms such as some embedded systems, standalone
Experimental Outcome can be used with the <code>BOOST_OUTCOME_SYSTEM_ERROR2_NOT_POSIX</code> macro
defined. This does not include POSIX headers, and makes available a high fidelity,
fully deterministic, alternative to C++ exceptions on such platforms.</p>
<p>Finally, there is a single include edition of Experimental Outcome, which
can be found at <a href="https://github.com/ned14/outcome/blob/develop/single-header/outcome-experimental.hpp">https://github.com/ned14/outcome/blob/develop/single-header/outcome-experimental.hpp</a>.
You can play with this on godbolt by <code>#include &lt;outcome-experimental.hpp&gt;</code>.</p>
<div class="notices warning" style="background: url('images/warning.png') top left no-repeat padding-box padding-box;">
<div class="notices heading">warning</div>
<div class="notices message"><p><b>It is stressed, in the strongest possible terms, that any item inside
<code>&lt;boost/outcome/experimental&gt;</code> is subject to unannounced breaking change based
on WG21 standards committee feedback</b>. That said, the chances are high
that most of those breaking changes will be to naming rather than to
fundamental semantics, so you can upgrade with a bit of find and replace.</p>
</div>
</div>
</div><p><small>Last revised: December 17, 2020 at 11:27:06 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="./recipes/rust.html"><img src="./images/prev.png" alt="Prev"></a>
<a accesskey="u" href="./index.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="./experimental/advantages.html"><img src="./images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,70 @@
<!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>The main advantages - 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="../experimental.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../experimental.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="../experimental/map.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both">The main advantages</h1></div></div></div>
<p>The main advantages of choosing <code>&lt;boost/outcome/experimental&gt;</code> over default Outcome:</p>
<ol>
<li><p>Codegen is tighter and less verbose<sup class="footnote-ref" id="fnref:1"><a href="#fn:1">1</a></sup>, sometimes remarkably so.</p></li>
<li><p>Build time impact is markedly lower, barely above the inclusion of naked
<code>&lt;basic_result.hpp&gt;</code>, as the STL allocator machinery and <code>std::string</code> et al
is not dragged into inclusion by including <code>&lt;system_error&gt;</code>. Note that
<code>&lt;boost/outcome/experimental/status_outcome.hpp&gt;</code> bring in <code>&lt;exception&gt;</code>,
however <code>&lt;boost/outcome/experimental/status_result.hpp&gt;</code> brings in no extra system
headers.</p></li>
<li><p>More discipline is imposed on your use of Outcome, leading to
less ambiguous code which is easier to optimise by the compiler,
lower cost to maintain, and lower cognitive load to audit code based on
experimental Outcome for correctness.</p></li>
<li><p>Code written to <code>&lt;boost/outcome/experimental&gt;</code> can be fairly easily dual
targeted, with just a few switching type aliases, to default Outcome.
This author has several Outcome-based libraries with identical source code which
can target either configuration of Outcome. The experimental Outcome
build regularly beats the default Outcome build in benchmarks by 2-3%,
and the dual target source code, being written to tighter discipline,
is faster and more deterministic in the default target than it was before
the (non-trivial) port to <code>&lt;boost/outcome/experimental&gt;</code>.</p></li>
<li><p>If you want &lsquo;official&rsquo; C support, experimental Outcome is able to
provide that in a way not possible for default Outcome which cannot make
sufficiently strong C compatibility assumptions about <code>std::error_code</code>.</p></li>
</ol>
<p>If you are building a codebase on top of Outcome expecting long term
maintenance, the author&rsquo;s personal recommendation is that you design, write, test and
optimise it for <code>&lt;boost/outcome/experimental&gt;</code>. What you ship to your customers
ought to be targeted at default Outcome however, so employ type aliases and
macros as appropriate to switch the build configuration for production releases.
This is what the Outcome author does himself, to date with great success,
despite the fundamental architectural differences between <code>&lt;system_error&gt;</code>
and proposed <code>&lt;system_error2&gt;</code>.</p>
<div class="footnotes">
<hr />
<ol>
<li id="fn:1">Boost.System&rsquo;s <code>error_code</code> has incorporated some of the design improvements of experimental <code>status_code</code>, and produces codegen somewhere in between experimental <code>status_code</code> and <code>std::error_code</code>.
<a class="footnote-return" href="#fnref:1"><sup>[return]</sup></a></li>
</ol>
</div>
</div><p><small>Last revised: July 16, 2024 at 21:33:35 &#43;0100</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../experimental.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../experimental.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="../experimental/map.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,58 @@
<!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>Using Outcome from C code - 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="../experimental/worked-example-long/implicit_conversion.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../experimental.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="../experimental/c-api/from-cxx.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both">Using Outcome from C code</h1></div></div></div>
<p>A long standing problem for C code (or more usually nowadays, the many other programming
languages which can speak the C ABI but not the C++ ABI) is how to interpret C++ exception throws. The answer
is of course that they cannot, thus requiring one to write C shim code on the C++ side
of things of the form:</p>
<div class="highlight"><pre class="chroma"><code class="language-c++" data-lang="c++"><span class="c1">// The API we wish to expose to C
</span><span class="c1"></span><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="nf">get_value</span><span class="p">(</span><span class="kt">double</span> <span class="n">v</span><span class="p">);</span>
<span class="c1">// The C shim function for the C++ get_value() function.
</span><span class="c1"></span><span class="k">extern</span> <span class="s">&#34;C&#34;</span> <span class="kt">int</span> <span class="n">c_get_value</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span> <span class="o">**</span><span class="n">ret</span><span class="p">,</span> <span class="kt">double</span> <span class="n">v</span><span class="p">)</span>
<span class="p">{</span>
<span class="k">try</span>
<span class="p">{</span>
<span class="o">*</span><span class="n">ret</span> <span class="o">=</span> <span class="n">get_value</span><span class="p">(</span><span class="n">v</span><span class="p">);</span>
<span class="k">return</span> <span class="mi">0</span><span class="p">;</span> <span class="c1">// success
</span><span class="c1"></span> <span class="p">}</span>
<span class="k">catch</span><span class="p">(</span><span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">range_error</span> <span class="o">&amp;</span><span class="p">)</span>
<span class="p">{</span>
<span class="k">return</span> <span class="n">ERANGE</span><span class="p">;</span>
<span class="p">}</span>
<span class="c1">// More catch clauses may go in here ...
</span><span class="c1"></span> <span class="k">catch</span><span class="p">(...)</span>
<span class="p">{</span>
<span class="k">return</span> <span class="n">EAGAIN</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre></div>
<p>This is sufficiently painful that most reach for a bindings generator tool like
<a href="http://www.swig.org/">SWIG</a> to automate this sort of tedious boilerplate generation.
And this is fine for larger projects, but for smaller projects the cost of
setting up and configuring SWIG is also non-trivial.</p>
<p>What would be really great is if <code>result&lt;T&gt;</code> returning <code>noexcept</code> C++ functions
could be used straight from C. And indeed Experimental Outcome provides just that facility
which this section covers next.</p>
</div><p><small>Last revised: February 05, 2019 at 17:14:18 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../experimental/worked-example-long/implicit_conversion.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../experimental.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="../experimental/c-api/from-cxx.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,64 @@
<!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>C Results - 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="../../experimental/c-api/from-cxx/example2.html"><img src="../../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../../experimental/c-api.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="../../experimental/c-api/from-c/system_code.html"><img src="../../images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both">C Results</h1></div></div></div>
<p>The C macro API header <code>&lt;boost/outcome/experimental/result.h&gt;</code> has some macros for working with any kind of Result:</p>
<dl>
<dt><code>BOOST_OUTCOME_C_DECLARE_RESULT(ident, T, E)</code>
<dd>Declares to C a <code>basic_result<T, E></code> type uniquely
identified by <code>ident</code>. <code>T</code> is available at the
member variable <code>.value</code>, and <code>E</code> is available
at the member variable <code>.error</code>. If you call this from within
C++, make SURE it is not within a <code>extern "C"</code> block!
<dt><code>BOOST_OUTCOME_C_RESULT(ident)</code>
<dd>A reference to a previously declared <code>result</code> type with
unique <code>ident</code>.
<dt><code>BOOST_OUTCOME_C_RESULT_HAS_VALUE(r)</code>
<dd>Evaluates to 1 (true) if the input <code>result</code> has a value.
<dt><code>BOOST_OUTCOME_C_RESULT_HAS_ERROR(r)</code>
<dd>Evaluates to 1 (true) if the input <code>result</code> has an error.
<dt><code>BOOST_OUTCOME_C_RESULT_ERROR_IS_ERRNO(r)</code>
<dd>Evaluates to 1 (true) if the input <code>result</code>'s error value
is a code in the POSIX <code>errno</code> domain.
</dl>
<p>The above let you work, somewhat awkwardly, with any C-compatible
<code>basic_result&lt;T, E&gt;</code>. <code>basic_result&lt;T, E&gt;</code> is trivially copyable and
standard layout if its <code>T</code> and <code>E</code> are both so, and it has the C layout:</p>
<div class="highlight"><pre class="chroma"><code class="language-c++" data-lang="c++"><span class="k">struct</span> <span class="n">cxx_result_</span><span class="cp">##ident
</span><span class="cp"></span><span class="p">{</span>
<span class="k">union</span>
<span class="p">{</span>
<span class="n">T</span> <span class="n">value</span><span class="p">;</span>
<span class="n">E</span> <span class="n">error</span><span class="p">;</span>
<span class="p">};</span>
<span class="kt">unsigned</span> <span class="n">flags</span><span class="p">;</span>
<span class="p">};</span>
</code></pre></div>
<p>Note that this layout is different to that of <a href="../../experimental/c-api/from-c.html"><code>BOOST_OUTCOME_C_DECLARE_STATUS_CODE</code></a>
as the C++ <code>result</code> has a different layout if <code>E</code> is a status code.</p>
</div><p><small>Last revised: July 17, 2024 at 17:54:05 &#43;0100</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../experimental/c-api/from-cxx/example2.html"><img src="../../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../../experimental/c-api.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="../../experimental/c-api/from-c/system_code.html"><img src="../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,52 @@
<!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>Declare a Result - 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="../../../experimental/c-api/from-c/system_code.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../../../experimental/c-api/from-c.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="../../../experimental/c-api/from-c/use.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both">Declare a Result</h1></div></div></div>
<div class="code-snippet"><div class="highlight"><pre class="chroma"><code class="language-c++" data-lang="c++"><span class="c1">// Declare to C a Result with a happy value of intptr_t
</span><span class="c1"></span><span class="n">BOOST_OUTCOME_C_DECLARE_RESULT_SYSTEM</span><span class="p">(</span><span class="n">result_int</span><span class="p">,</span> <span class="n">intptr_t</span><span class="p">)</span>
<span class="c1">// Save oneself typing out BOOST_OUTCOME_C_RESULT_SYSTEM(result_int) all the time
</span><span class="c1"></span><span class="k">typedef</span> <span class="n">BOOST_OUTCOME_C_RESULT_SYSTEM</span><span class="p">(</span><span class="n">result_int</span><span class="p">)</span> <span class="n">result</span><span class="p">;</span>
<span class="c1">// Our custom C enum
</span><span class="c1"></span><span class="k">enum</span> <span class="n">c_enum</span>
<span class="p">{</span>
<span class="n">c_enum_not_found</span><span class="p">,</span>
<span class="n">c_enum_bad_argument</span>
<span class="p">};</span>
<span class="c1">// Make a custom status code domain for this C enum
</span><span class="c1"></span><span class="n">BOOST_OUTCOME_C_DECLARE_RESULT_SYSTEM_FROM_ENUM</span><span class="p">(</span><span class="n">result_int</span><span class="p">,</span> <span class="c1">// The C Result type declared above
</span><span class="c1"></span> <span class="n">c_enum</span><span class="p">,</span> <span class="c1">// The C enum we wish to wrap
</span><span class="c1"></span> <span class="s">&#34;{74ceb994-7622-3a21-07f0-b016aa705585}&#34;</span><span class="p">,</span> <span class="c1">// Unique UUID for this domain
</span><span class="c1"></span> <span class="c1">// Mappings of C enum values to textual description and semantic equivalances to generic codes
</span><span class="c1"></span> <span class="p">{</span><span class="n">c_enum</span><span class="o">::</span><span class="n">c_enum_not_found</span><span class="p">,</span> <span class="s">&#34;item not found&#34;</span><span class="p">,</span> <span class="p">{</span><span class="n">errc</span><span class="o">::</span><span class="n">no_such_file_or_directory</span><span class="p">}},</span>
<span class="p">{</span><span class="n">c_enum</span><span class="o">::</span><span class="n">c_enum_bad_argument</span><span class="p">,</span> <span class="s">&#34;invoked wrong&#34;</span><span class="p">,</span> <span class="p">{</span><span class="n">errc</span><span class="o">::</span><span class="n">invalid_argument</span><span class="p">}})</span>
<span class="c1">// Make helper macros
</span><span class="c1"></span><span class="cp">#define SUCCESS(v) BOOST_OUTCOME_C_MAKE_RESULT_SYSTEM_SUCCESS(result_int, (v))
</span><span class="cp">#define FAILURE(v) BOOST_OUTCOME_C_MAKE_RESULT_SYSTEM_FROM_ENUM(result_int, c_enum, (v))
</span><span class="cp"></span></code></pre></div><a href="https://github.com/boostorg/outcome/tree/master/doc/src/snippets/c_api2.cpp#L39" class="code-snippet-url" target="_blank">View this code on Github</a></div>
<p>The key to making C programming easy is to alias the long complex things
into short easy thing. Obviously <code>SUCCESS(expr)</code> and <code>FAILURE(expr)</code> is too
generic, but for the purposes of this documentation it makes thing easier.</p>
</div><p><small>Last revised: July 16, 2024 at 21:33:35 &#43;0100</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../experimental/c-api/from-c/system_code.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../../../experimental/c-api/from-c.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="../../../experimental/c-api/from-c/use.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,117 @@
<!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>C system error results - 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="../../../experimental/c-api/from-c.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../../../experimental/c-api/from-c.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="../../../experimental/c-api/from-c/declare.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both">C system error results</h1></div></div></div>
<p>In v2.2.11, C Result support went from second tier to first tier status, and
now you can create, query and manipulate a subset of Result types entirely from
within C by including <code>&lt;boost/outcome/experimental/result.h&gt;</code>.</p>
<p>The subset supported are those <code>result&lt;T, E&gt;</code> which are <a href="../../../experimental/status_result.html">a <code>status_result&lt;T&gt;</code></a>
i.e. the <code>E</code> is hardcoded to <code>experimental::error</code> which is the type erased runtime
polymorphic holder for any errored <code>status_code</code> whose payload is not bigger
than an <code>intptr_t</code>. This is the most useful subset of Outcome Experimental&rsquo;s
possible Result types, allowing arbitrary custom error coding schemes from
any unknown source to work seamlessly with all others, including errors from
the system or third party libraries.</p>
<p>The operations available to C are:</p>
<dl>
<dt><code>BOOST_OUTCOME_C_DECLARE_RESULT_SYSTEM(ident, T)</code>
<dd>Declares to C a <code>status_result<T></code> type uniquely
identified by <code>ident</code>. <code>T</code> is available at the
member variable <code>.value</code>, and <code>struct cxx_status_code_system</code>
is available at the member variable <code>.error</code>. If in C++,
implements C extern functions for making successful and failure results
of this type. If you call this from within
C++, make SURE it is not within a <code>extern "C"</code> block!
<dt><code>BOOST_OUTCOME_C_RESULT_SYSTEM(ident)</code>
<dd>A reference to a previously declared <code>status_result</code> type with
unique <code>ident</code>.
<dt><code>BOOST_OUTCOME_C_MAKE_RESULT_SYSTEM_SUCCESS(ident, expr)</code> (needs C++ counterpart linked into final binary)
<dd>This invokes the aforementioned extern function which creates a <code>status_result</code>
with a successful value of type <code>T</code>.
<dt><code>BOOST_OUTCOME_C_MAKE_RESULT_SYSTEM_FAILURE_POSIX(ident, expr)</code> (needs C++ counterpart linked into final binary)
<dd>This invokes the aforementioned extern function which creates a <code>status_result</code>
with a failure of type <code>posix_code</code> representing a POSIX <code>errno</code>.
<dt><code>BOOST_OUTCOME_C_MAKE_RESULT_SYSTEM_FAILURE_SYSTEM(ident, expr)</code> (needs C++ counterpart linked into final binary)
<dd>This invokes the aforementioned extern function which creates a <code>status_result</code>
with a failure of type <code>posix_code</code> representing a POSIX <code>errno</code>
if on POSIX; if on Windows then a failure of type <code>win32_code</code>
representing a Win32 error code from a Windows API.
<br><br>
<dt><code>BOOST_OUTCOME_C_RESULT_HAS_VALUE(r)</code>
<dd>Evaluates to 1 (true) if the input <code>result</code> has a value.
<dt><code>BOOST_OUTCOME_C_RESULT_HAS_ERROR(r)</code>
<dd>Evaluates to 1 (true) if the input <code>result</code> has an error.
<dt><code>BOOST_OUTCOME_C_RESULT_ERROR_IS_ERRNO(r)</code>
<dd>Evaluates to 1 (true) if the input <code>result</code>'s error value
is a code in the POSIX <code>errno</code> domain.
<br><br>
<dt><code>BOOST_OUTCOME_C_RESULT_SYSTEM_TRY(expr)</code>
<dd>If the <code>status_result</code> returned by <code>expr</code> is
errored, exit the current function returning the result. This obviously
requires that the return type of the current function matches that of <code>
expr</code>.
<dt><code>BOOST_OUTCOME_C_RESULT_SYSTEM_TRY(cleanup, expr)</code>
<dd>Same as the above, but execute <code>cleanup</code> just before exiting the function
if returning failure.
<dt><code>BOOST_OUTCOME_C_RESULT_SYSTEM_TRY(var, cleanup, expr)</code>
<dd>Same as the above, but set <code>var</code> equal to the result's <code>.value</code> on success.
<dt><code>BOOST_OUTCOME_C_RESULT_SYSTEM_TRY(var, ident, cleanup, expr)</code>
<dd>Same as the above, but use <code>ident</code> as the return type instead. This allows
the return type of the calling function to differ from that of <code>expr</code>.
<br><br>
<dt><code>BOOST_OUTCOME_C_DECLARE_RESULT_SYSTEM_FROM_ENUM(ident, enum_name, uuid, {enum mapping-sequence, ...})</code>
<dd>This declares to C an extern function which creates a <code>status_result</code>
from a C enum. If in C++, it implements a <code>quick_status_code_from_enum</code> for
the C enum and the associated extern function, and you will need to supply <code>uuid</code>
and the appropriate enum value mapping sequence <a href="../../../experimental/worked-example.html">
as per the <code>quick_status_code_from_enum</code> documentation</a>.
<dt><code>BOOST_OUTCOME_C_MAKE_RESULT_SYSTEM_FROM_ENUM(ident, enum_name, expr)</code> (needs C++ counterpart linked into final binary)
<dd>This invokes the aforementioned extern function which creates a <code>status_result</code>
from a C enum.
</dl>
<p>The operations available to C++ are:</p>
<dl>
<dt><code>BOOST_OUTCOME_C_TO_RESULT_SYSTEM_CODE(ident, status_code&lt;T&gt;)</code>
<dd>Returns a previously declared C Result from its matching C++ <code>status_code</code>.
NOTE that the destructor of the C++ status code is NOT called. If this is important
to your status code, it is 100% on you to ensure that your C Result reenters a C++
Result at the end of its lifetime.
<dt><code>to_result(any C Result)</code>
<dd>This is an overloaded C++ free function which returns the C++ status_code&lt;T&gt;
matching its input C Result.
</dl>
<p>Using the above you can write C code using Outcome.Experimental&rsquo;s Result type
quite effectively. Let&rsquo;s look at an example of use next.</p>
</div><p><small>Last revised: July 17, 2024 at 17:54:05 &#43;0100</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../experimental/c-api/from-c.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../../../experimental/c-api/from-c.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="../../../experimental/c-api/from-c/declare.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,43 @@
<!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>TRY a C Result - 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="../../../experimental/c-api/from-c/use.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../../../experimental/c-api/from-c.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.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both">TRY a C Result</h1></div></div></div>
<p>Thanks to much of the magic of <a href="../../../reference/macros/try.html" class="api-reference"><code>BOOST_OUTCOME_TRY(var, expr)</code></a>
being implemented
using C preprocessor metaprogramming, we can offer a very similar experience for the
C try operation and without needing anything compiled in C++ as support functions:</p>
<div class="code-snippet"><div class="highlight"><pre class="chroma"><code class="language-c++" data-lang="c++"><span class="n">result</span> <span class="nf">test2</span><span class="p">(</span><span class="kt">int</span> <span class="n">x</span><span class="p">)</span>
<span class="p">{</span>
<span class="n">BOOST_OUTCOME_C_RESULT_SYSTEM_TRY</span><span class="p">(</span><span class="kt">int</span> <span class="n">v</span><span class="p">,</span> <span class="c1">// what to set to value if successful
</span><span class="c1"></span> <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">&#34;Positive numbers only!</span><span class="se">\n</span><span class="s">&#34;</span><span class="p">),</span> <span class="c1">// what cleanup to run if unsuccessful
</span><span class="c1"></span> <span class="n">positive_only</span><span class="p">(</span><span class="n">x</span><span class="p">));</span>
<span class="k">return</span> <span class="n">SUCCESS</span><span class="p">(</span><span class="n">v</span> <span class="o">+</span> <span class="mi">1</span><span class="p">);</span>
<span class="p">}</span>
</code></pre></div><a href="https://github.com/boostorg/outcome/tree/master/doc/src/snippets/c_api2.cpp#L91" class="code-snippet-url" target="_blank">View this code on Github</a></div>
<p>The principle difference is that you can specify a cleanup routine to perform if
failure is encountered. This is especially useful in C, which has no stack unwinding.</p>
<p>Also due to lack of type sugaring and user defined implicit conversions, if your
callers result type isn&rsquo;t your callee&rsquo;s, you may need to specify what your caller&rsquo;s
result type is so the error state can be correctly propagated.</p>
</div><p><small>Last revised: July 16, 2024 at 21:33:35 &#43;0100</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../experimental/c-api/from-c/use.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../../../experimental/c-api/from-c.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.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,53 @@
<!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>Using a Result - 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="../../../experimental/c-api/from-c/declare.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../../../experimental/c-api/from-c.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="../../../experimental/c-api/from-c/try.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both">Using a Result</h1></div></div></div>
<p>This models <a href="../../../experimental/worked-example/implicit-construction.html">the earlier C++ example of use</a>,
and its C equivalent isn&rsquo;t much more verbose thanks to our helper typedefs and macros:</p>
<div class="code-snippet"><div class="highlight"><pre class="chroma"><code class="language-c++" data-lang="c++"><span class="n">result</span> <span class="nf">positive_only</span><span class="p">(</span><span class="kt">int</span> <span class="n">x</span><span class="p">)</span>
<span class="p">{</span>
<span class="k">if</span><span class="p">(</span><span class="n">x</span> <span class="o">&lt;</span> <span class="mi">0</span><span class="p">)</span>
<span class="p">{</span>
<span class="k">return</span> <span class="n">FAILURE</span><span class="p">(</span><span class="n">c_enum_bad_argument</span><span class="p">);</span>
<span class="p">}</span>
<span class="k">return</span> <span class="n">SUCCESS</span><span class="p">(</span><span class="n">x</span><span class="p">);</span>
<span class="p">}</span>
<span class="kt">bool</span> <span class="nf">test</span><span class="p">(</span><span class="kt">int</span> <span class="n">x</span><span class="p">)</span>
<span class="p">{</span>
<span class="n">result</span> <span class="n">r</span> <span class="o">=</span> <span class="n">positive_only</span><span class="p">(</span><span class="n">x</span><span class="p">);</span>
<span class="k">if</span><span class="p">(</span><span class="n">BOOST_OUTCOME_C_RESULT_HAS_ERROR</span><span class="p">(</span><span class="n">r</span><span class="p">))</span>
<span class="p">{</span>
<span class="k">if</span><span class="p">(</span><span class="n">outcome_status_code_equal_generic</span><span class="p">(</span><span class="o">&amp;</span><span class="n">r</span><span class="p">.</span><span class="n">error</span><span class="p">,</span> <span class="n">EINVAL</span><span class="p">))</span>
<span class="p">{</span>
<span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">&#34;Positive numbers only!</span><span class="se">\n</span><span class="s">&#34;</span><span class="p">);</span>
<span class="k">return</span> <span class="nb">false</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="k">return</span> <span class="nb">true</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div><a href="https://github.com/boostorg/outcome/tree/master/doc/src/snippets/c_api2.cpp#L66" class="code-snippet-url" target="_blank">View this code on Github</a></div>
<p>For this to link, the <code>BOOST_OUTCOME_C_DECLARE_RESULT_SYSTEM_FROM_ENUM</code> macro needs to be
compiled at least once within C++ within the final binary to emit the extern
functions needed by C.</p>
</div><p><small>Last revised: July 16, 2024 at 21:33:35 &#43;0100</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../experimental/c-api/from-c/declare.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../../../experimental/c-api/from-c.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="../../../experimental/c-api/from-c/try.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,83 @@
<!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>Calling C&#43;&#43; from C - 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="../../experimental/c-api.html"><img src="../../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../../experimental/c-api.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="../../experimental/c-api/from-cxx/example.html"><img src="../../images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both">Calling C++ from C</h1></div></div></div>
<p>C++ has excellent two-way compatibility with the C ABI, but there are some
limitations you must observe to write C++ code which C code can call without
marshalling at the ABI boundary:</p>
<ol>
<li><p>A C++ function may not throw exceptions if it is safe to call from C, and
so should always be marked <code>noexcept</code>.</p></li>
<li><p>A C++ function should be annotated with <code>extern &quot;C&quot;</code> to prevent its symbol
being mangled, and thus give it the C rather than C++ ABI.</p></li>
<li><p>You cannot use overloading in your <code>extern &quot;C&quot;</code> functions.</p></li>
<li><p>You may only use types in your C++ function declaration for which these traits are both true:</p>
<ul>
<li><a href="http://en.cppreference.com/w/cpp/types/is_standard_layout"><code>std::is_standard_layout_v&lt;T&gt;</code></a></li>
<li><a href="http://en.cppreference.com/w/cpp/types/is_trivially_copyable"><code>std::is_trivially_copyable_v&lt;T&gt;</code></a></li>
</ul>
<p>(Note that <code>std::is_trivially_copyable_v&lt;T&gt;</code> requires trivial destruction,
but NOT trivial construction. This means that C++ can do non-trivial construction
of otherwise trivial types)</p></li>
</ol>
<hr />
<p>The above is what the standard officially requires for <em>well defined</em> C and C++ interop.
However, all of the three major compilers MSVC, GCC and clang are considerably more relaxed.
In those three major compilers, &ldquo;almost-standard-layout&rdquo; C++ types work fine in C.</p>
<p>&ldquo;Almost-standard-layout&rdquo; C++ types have these requirements:</p>
<ol>
<li>No virtual functions or virtual base classes i.e.
<a href="http://en.cppreference.com/w/cpp/types/is_polymorphic"><code>std::is_polymorphic_v&lt;T&gt;</code></a>
must be false. This is because the vptrs offset the proper front of the data layout
in an unknowable way to C.</li>
<li>Non-static data members of reference type appear to C as pointers. You
must never supply from C to C++ a non-null pointer which is seen as a reference in C++.</li>
<li>C++ inheritance is seen in C data layout as if the most derived class has nested
variables of the inherited types at the top, in order of inheritance.</li>
<li>Types with non-trivial destructors work fine so long as at least move construction
and assignment is the same as
copying bits like <code>memcpy()</code>. You just need to make sure instances of the type return
to C++, and don&rsquo;t get orphaned in C. This was referred to in previous pages in this
section as &ldquo;move relocating&rdquo; types.</li>
</ol>
<p>Experimental Outcome&rsquo;s support for being used from C does not meet the current strict
requirements, and thus relies on the (very common) implementation defined behaviour just
described (it is hoped that future C++ standards can relax the requirements to those
just described).</p>
<p>Specifically, proposed <code>status_code</code> is an almost-standard-layout type,
and thus while it can&rsquo;t be returned from <code>extern &quot;C&quot;</code> functions as the compiler
will complain, it is perfectly safe to return from C++ functions to C code on the
three major compilers, as it is an &ldquo;almost-standard-layout&rdquo; C++ type if <code>T</code> is
an &ldquo;almost-standard-layout&rdquo; C++ type.</p>
</div><p><small>Last revised: July 16, 2024 at 21:33:35 &#43;0100</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../experimental/c-api.html"><img src="../../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../../experimental/c-api.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="../../experimental/c-api/from-cxx/example.html"><img src="../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,70 @@
<!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>Example C&#43;&#43; function - 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="../../../experimental/c-api/from-cxx.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../../../experimental/c-api/from-cxx.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="../../../experimental/c-api/from-cxx/example2.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both">Example C++ function</h1></div></div></div>
<p>Let us start with a simple C++ function which we wish to make available to C code:</p>
<div class="code-snippet"><div class="highlight"><pre class="chroma"><code class="language-c++" data-lang="c++"><span class="k">namespace</span> <span class="n">outcome_e</span> <span class="o">=</span> <span class="n">BOOST_OUTCOME_V2_NAMESPACE</span><span class="o">::</span><span class="n">experimental</span><span class="p">;</span>
<span class="c1">// Fill the supplied buffer with the integer v converted to a string,
</span><span class="c1">// returning length of string minus null terminator
</span><span class="c1"></span><span class="n">outcome_e</span><span class="o">::</span><span class="n">status_result</span><span class="o">&lt;</span><span class="n">size_t</span><span class="o">&gt;</span> <span class="n">to_string</span><span class="p">(</span><span class="kt">char</span> <span class="o">*</span><span class="n">buffer</span><span class="p">,</span> <span class="n">size_t</span> <span class="n">bufferlen</span><span class="p">,</span> <span class="kt">int</span> <span class="n">v</span><span class="p">)</span> <span class="k">noexcept</span>
<span class="p">{</span>
<span class="k">try</span>
<span class="p">{</span>
<span class="c1">// Could throw an exception!
</span><span class="c1"></span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">temp</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">to_string</span><span class="p">(</span><span class="n">v</span><span class="p">));</span>
<span class="c1">// Will this string exceed the supplied buffer?
</span><span class="c1"></span> <span class="k">if</span><span class="p">(</span><span class="n">temp</span><span class="p">.</span><span class="n">size</span><span class="p">()</span> <span class="o">+</span> <span class="mi">1</span> <span class="o">&gt;</span> <span class="n">bufferlen</span><span class="p">)</span>
<span class="k">return</span> <span class="n">outcome_e</span><span class="o">::</span><span class="n">errc</span><span class="o">::</span><span class="n">no_buffer_space</span><span class="p">;</span>
<span class="c1">// Copy the string into the supplied buffer, and return length of string
</span><span class="c1"></span> <span class="n">memcpy</span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span> <span class="n">temp</span><span class="p">.</span><span class="n">data</span><span class="p">(),</span> <span class="n">temp</span><span class="p">.</span><span class="n">size</span><span class="p">()</span> <span class="o">+</span> <span class="mi">1</span><span class="p">);</span>
<span class="k">return</span> <span class="n">temp</span><span class="p">.</span><span class="n">size</span><span class="p">();</span>
<span class="p">}</span>
<span class="k">catch</span><span class="p">(...)</span>
<span class="p">{</span>
<span class="c1">// This is the &lt;system_error2&gt; analogue of Standard Outcome&#39;s
</span><span class="c1"></span> <span class="c1">// error_from_exception() utility function. It consumes an exception
</span><span class="c1"></span> <span class="c1">// ptr (defaulted to current exception), and tries to match it to a
</span><span class="c1"></span> <span class="c1">// standard C++ library exception type, returning a system_code
</span><span class="c1"></span> <span class="c1">// with an appropriate code domain (generic_code, posix_code,
</span><span class="c1"></span> <span class="c1">// win32_code).
</span><span class="c1"></span> <span class="c1">//
</span><span class="c1"></span> <span class="c1">// Note that using this function requires including
</span><span class="c1"></span> <span class="c1">// &lt;boost/outcome/experimental/system_code_from_exception.hpp&gt;
</span><span class="c1"></span> <span class="c1">// It is NOT included by Experimental Outcome by default.
</span><span class="c1"></span> <span class="k">return</span> <span class="n">outcome_e</span><span class="o">::</span><span class="n">system_code_from_exception</span><span class="p">();</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre></div><a href="https://github.com/boostorg/outcome/tree/master/doc/src/snippets/cpp_api.cpp#L37" class="code-snippet-url" target="_blank">View this code on Github</a></div>
<p>As the alias <code>status_result&lt;size_t&gt;</code> defaults the erased type to the alias <code>system_code</code>,
the <code>to_string()</code> function returns (in concrete types) <code>basic_result&lt;size_t, status_code&lt;erased&lt;intptr_t&gt;&gt;&gt;</code>.</p>
<p>The standard Outcome function referenced is documented at
<a href="https://en.cppreference.com/w/cpp/error/error_code" class="api-reference" target="_blank"><i class="fa fa-book" aria-hidden="true"></i> <code>std::error_code error_from_exception(std::exception_ptr &amp;&amp;ep = std::current_exception(), std::error_code not_matched = std::make_error_code(std::errc::resource_unavailable_try_again)) noexcept</code></a>
.
The proposed <code>&lt;system_error2&gt;</code> reference library implementation provides an identically named
function taking similar parameters, but it returns a <code>outcome_e::system_code</code> (<code>status_code&lt;erased&lt;intptr_t&gt;&gt;</code>) instead of a <code>std::error_code</code>.</p>
</div><p><small>Last revised: July 16, 2024 at 21:33:35 &#43;0100</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../experimental/c-api/from-cxx.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../../../experimental/c-api/from-cxx.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="../../../experimental/c-api/from-cxx/example2.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,77 @@
<!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>Calling it from C - 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="../../../experimental/c-api/from-cxx/example.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../../../experimental/c-api/from-cxx.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="../../../experimental/c-api/from-c.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both">Calling it from C</h1></div></div></div>
<p>Firstly we need to declare to C our <code>result</code> returning C++ function:</p>
<div class="code-snippet"><div class="highlight"><pre class="chroma"><code class="language-c++" data-lang="c++"><span class="c1">// Declare our C++ function&#39;s returning result type. Only needs to be done once.
</span><span class="c1">// This declares an `status_result&lt;size_t, system_code&gt;` which is an alias to
</span><span class="c1">// `basic_result&lt;size_t, status_code&lt;erased&lt;intptr_t&gt;&gt;&gt;`.
</span><span class="c1">//
</span><span class="c1">// The first parameter is some unique identifier for this type which will be used
</span><span class="c1">// whenever we reference this type in the future.
</span><span class="c1"></span><span class="n">CXX_DECLARE_RESULT_SYSTEM</span><span class="p">(</span><span class="n">to_string_rettype</span><span class="p">,</span> <span class="n">size_t</span><span class="p">)</span>
<span class="c1">// Tell C about our extern C++ function `to_string()`
</span><span class="c1"></span><span class="k">extern</span> <span class="n">CXX_RESULT_SYSTEM</span><span class="p">(</span><span class="n">to_string_rettype</span><span class="p">)</span> <span class="n">_Z9to_stringPcmi</span><span class="p">(</span><span class="kt">char</span> <span class="o">*</span><span class="n">buffer</span><span class="p">,</span> <span class="n">size_t</span> <span class="n">bufferlen</span><span class="p">,</span> <span class="kt">int</span> <span class="n">v</span><span class="p">);</span>
</code></pre></div><a href="https://github.com/boostorg/outcome/tree/master/doc/src/snippets/c_api.c#L40" class="code-snippet-url" target="_blank">View this code on Github</a></div>
<p>Now let&rsquo;s call the C++ function from C:</p>
<div class="code-snippet"><div class="highlight"><pre class="chroma"><code class="language-c++" data-lang="c++"><span class="kt">void</span> <span class="nf">print</span><span class="p">(</span><span class="kt">int</span> <span class="n">v</span><span class="p">)</span>
<span class="p">{</span>
<span class="kt">char</span> <span class="n">buffer</span><span class="p">[</span><span class="mi">4</span><span class="p">];</span>
<span class="n">CXX_RESULT_SYSTEM</span><span class="p">(</span><span class="n">to_string_rettype</span><span class="p">)</span> <span class="n">res</span><span class="p">;</span>
<span class="n">res</span> <span class="o">=</span> <span class="n">_Z9to_stringPcmi</span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span> <span class="k">sizeof</span><span class="p">(</span><span class="n">buffer</span><span class="p">),</span> <span class="n">v</span><span class="p">);</span>
<span class="k">if</span><span class="p">(</span><span class="n">CXX_RESULT_HAS_VALUE</span><span class="p">(</span><span class="n">res</span><span class="p">))</span>
<span class="p">{</span>
<span class="n">printf</span><span class="p">(</span><span class="s">&#34;to_string(%d) fills buffer with &#39;%s&#39; of %zu characters</span><span class="se">\n</span><span class="s">&#34;</span><span class="p">,</span> <span class="n">v</span><span class="p">,</span> <span class="n">buffer</span><span class="p">,</span> <span class="n">res</span><span class="p">.</span><span class="n">value</span><span class="p">);</span>
<span class="k">return</span><span class="p">;</span>
<span class="p">}</span>
<span class="c1">// Is the error returned in the POSIX domain and thus an errno?
</span><span class="c1"></span> <span class="k">if</span><span class="p">(</span><span class="n">CXX_RESULT_ERROR_IS_ERRNO</span><span class="p">(</span><span class="n">res</span><span class="p">))</span>
<span class="p">{</span>
<span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">&#34;to_string(%d) failed with error code %d (%s)</span><span class="se">\n</span><span class="s">&#34;</span><span class="p">,</span> <span class="n">v</span><span class="p">,</span> <span class="p">(</span><span class="kt">int</span><span class="p">)</span> <span class="n">res</span><span class="p">.</span><span class="n">error</span><span class="p">.</span><span class="n">value</span><span class="p">,</span> <span class="n">strerror</span><span class="p">((</span><span class="kt">int</span><span class="p">)</span> <span class="n">res</span><span class="p">.</span><span class="n">error</span><span class="p">.</span><span class="n">value</span><span class="p">));</span>
<span class="k">return</span><span class="p">;</span>
<span class="p">}</span>
<span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">&#34;to_string(%d) failed with unknown error code %lld</span><span class="se">\n</span><span class="s">&#34;</span><span class="p">,</span> <span class="n">v</span><span class="p">,</span> <span class="p">(</span><span class="kt">long</span> <span class="kt">long</span><span class="p">)</span> <span class="n">res</span><span class="p">.</span><span class="n">error</span><span class="p">.</span><span class="n">value</span><span class="p">);</span>
<span class="p">}</span>
<span class="kt">int</span> <span class="nf">main</span><span class="p">(</span><span class="kt">void</span><span class="p">)</span>
<span class="p">{</span>
<span class="n">print</span><span class="p">(</span><span class="mi">9</span><span class="p">);</span>
<span class="n">print</span><span class="p">(</span><span class="mi">99</span><span class="p">);</span>
<span class="n">print</span><span class="p">(</span><span class="mi">999</span><span class="p">);</span>
<span class="n">print</span><span class="p">(</span><span class="mi">9999</span><span class="p">);</span>
<span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div><a href="https://github.com/boostorg/outcome/tree/master/doc/src/snippets/c_api.c#L53" class="code-snippet-url" target="_blank">View this code on Github</a></div>
<p>Running this C program yields:</p>
<pre><code>to_string(9) fills buffer with '9' of 1 characters
to_string(99) fills buffer with '99' of 2 characters
to_string(999) fills buffer with '999' of 3 characters
to_string(9999) failed with error code 105 (No buffer space available)
</code></pre>
</div><p><small>Last revised: July 16, 2024 at 21:33:35 &#43;0100</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../experimental/c-api/from-cxx/example.html"><img src="../../../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../../../experimental/c-api/from-cxx.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="../../../experimental/c-api/from-c.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,103 @@
<!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>Major differences - 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="../experimental/map.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../experimental.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="../experimental/status_result.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both">Major differences</h1></div></div></div>
<p>The major design differences between <code>&lt;system_error&gt;</code> and proposed <code>&lt;system_error2&gt;</code> are
as follows:</p>
<ol>
<li><p><code>experimental::status_code&lt;DomainType&gt;</code> can represent warnings
and form-of-success codes as well as failure codes. <code>experimental::errored_status_code&lt;DomainType&gt;</code>
is more similar to <code>std::error_code</code>, in that it can only represent failures
(this is enforced by C++ 20 contract or runtime assertion check).</p></li>
<li><p>The code&rsquo;s domain implementation defines the payload type to be transported around by
<code>experimental::status_code&lt;DomainType&gt;</code>, rather than it being
hardcoded to <code>int</code> as in <code>std::error_code</code>. The payload type can be anything
you like, including non-trivially-copyable, move-only, complex etc types.</p>
<p>This facility is extremely useful. Extra failure metadata such as stack
backtraces can be returned, for example. You can absolutely vary the payload
depending on whether <code>NDEBUG</code> or <code>_DEBUG</code> is defined, too.</p></li>
<li><p>If your domain defines a payload type which is trivially copyable or
move relocating<sup class="footnote-ref" id="fnref:1"><a href="#fn:1">1</a></sup>, it gains an implicit convertibility to a move-only
<code>experimental::status_code&lt;erased&lt;T&gt;&gt;</code> where <code>T</code> is another
trivially copyable or move relocating type. This permits global headers
to use a single, common, type erased, status code type which is highly
desirable for code bases of any complexity. However, unlike <code>std::error_code</code>,
which fulfils the exact same role in <code>&lt;system_error&gt;</code> based code, the type
erased payload can be bigger than the hardcoded <code>int</code> in <code>std::error_code</code>.</p>
<p>This facility is also extremely useful, as extra failure metadata can be
type erased, transported through code with no knowledge of such things,
and the original type with failure metadata resurrected at the handling point.
Indeed P1095 proposed <code>std::error</code> is a type alias to
<code>experimental::status_code&lt;erased&lt;intptr_t&gt;&gt;</code>, and it can transport erased
<code>std::exception_ptr</code> instances, POSIX error codes, and much more besides.</p></li>
<li><p>Equality comparisons between status code&rsquo;s with non-identical domains are
always <b><em>semantic</em></b> i.e. are they semantically equivalent, rather than exactly
equal? This mirrors when you compare <code>std::error_code</code> to a <code>std::error_condition</code>,
but as there is no equivalent for the latter in <code>&lt;system_error2&gt;</code>, this means
that when you see the code:</p>
<div class="highlight"><pre class="chroma"><code class="language-c++" data-lang="c++"><span class="k">if</span><span class="p">(</span><span class="n">code1</span> <span class="o">==</span> <span class="n">code2</span><span class="p">)</span> <span class="p">...</span>
</code></pre></div>
<p>&hellip; you can be highly confident that this is an inexact, semantic, match operation.
The same code under <code>&lt;system_error&gt;</code> is highly ambiguous as to whether exact
or inexact comparison is being performed (after all, all there is is &ldquo;<code>code1 == code2</code>&rdquo;,
so it depends on the types of <code>code1</code> and <code>code2</code> which usually is not obvious).</p>
<p>The ambiguity, and high cognitive load during auditing <code>&lt;system_error&gt;</code> code for correctness, has
led to many surprising and unexpected failure handling bugs during the past
decade in production C++.</p></li>
<li><p><code>&lt;system_error2&gt;</code>, being a new design, has all-constexpr construction and
destruction which avoids the need for static global variables, as <code>&lt;system_error&gt;</code>
has. Each of those static global variables requires an atomic fence just in
case it has not been initialised, thus every retrieval of an error category bloats
code and inhibits optimisation, plus makes the use of custom error code categories
in header-only libraries unreliable. Boost.System has replicated the all-constexpr
construction and destruction from <code>&lt;system_error2&gt;</code>, and thus now has similar
characteristics in this regard.</p></li>
<li><p>Finally, this is a small but important difference. Under <code>&lt;system_error&gt;</code>,
this extremely common use case is ambiguous:</p>
<div class="highlight"><pre class="chroma"><code class="language-c++" data-lang="c++"><span class="k">if</span><span class="p">(</span><span class="n">ec</span><span class="p">)</span> <span class="p">...</span>
</code></pre></div>
<p>Does this code mean &ldquo;if there was an error?&rdquo;, or &ldquo;if the error code is set?&rdquo;,
or &ldquo;is the error code non-zero?&rdquo;. The correct answer according to the standard is the last choice, but
a quick survey of open source <code>&lt;system_error&gt;</code> based code on github quickly
demonstrates there is widespread confusion regarding correct usage.</p>
<p><code>&lt;system_error2&gt;</code> solves this by removing the boolean test entirely. One
now writes <code>if(sc.success()) ...</code>, <code>if(sc.failure()) ...</code>, <code>if(sc.empty()) ...</code>
and so on, thus eliminating ambiguity.</p></li>
</ol>
<div class="footnotes">
<hr />
<ol>
<li id="fn:1"><a href="http://wg21.link/P1029">Move relocating is not in the standard, it is currently within WG21 Evolution Working Group Incubator</a>. It is defined to be a type whose move constructor <code>memcpy()</code>&rsquo;s the bits from source to destination, followed by <code>memcpy()</code> of the bits of a default constructed instance to source, and with a programmer-given guarantee that the destructor, when called on a default constructed instance, has no observable side effects. A surprising number of standard library types can meet this definition of move relocating, including <code>std::vector&lt;T&gt;</code>, <code>std::shared_ptr&lt;T&gt;</code>, and <code>std::exception_ptr</code>.
<a class="footnote-return" href="#fnref:1"><sup>[return]</sup></a></li>
</ol>
</div>
</div><p><small>Last revised: December 16, 2020 at 14:14:42 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../experimental/map.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../experimental.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="../experimental/status_result.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,85 @@
<!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>Approximate map between error code designs - 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="../experimental/advantages.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../experimental.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="../experimental/differences.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both">Approximate map between error code designs</h1></div></div></div>
<p>Much of the design of Boost.System (which went on to become <code>&lt;system_error&gt;</code>)
has been retained in proposed <code>&lt;system_error2&gt;</code>, so an approximate map between
<code>&lt;system_error2&gt;</code> and <code>&lt;system_error&gt;</code> and Boost.System can be given:</p>
<table width="100%" cellpadding="5" border="1">
<colgroup>
<col width="25%">
<col width="25%">
<col width="50%">
</colgroup>
<tr><th>C++ 17 <tt>&lt;system_error&gt;</tt><th>Boost.System<th>Proposed <tt>&lt;system_error2&gt;</tt>
<tr>
<td style="vertical-align: top;"><tt>std::errc</tt>
<td style="vertical-align: top;"><tt>boost::system::errc</tt>
<td style="vertical-align: top;"><tt>experimental::errc</tt> (almost identical)
<tr>
<td style="vertical-align: top;"><tt>std::error_category</tt>
<td style="vertical-align: top;"><tt>boost::system::error_category</tt>
<td style="vertical-align: top;"><tt>experimental::status_code_domain</tt>
<tr>
<td style="vertical-align: top;"><tt>std::generic_category</tt>
<td style="vertical-align: top;"><tt>boost::system::generic_category</tt>
<td style="vertical-align: top;"><tt>experimental::generic_code_domain</tt>
<tr>
<td style="vertical-align: top;"><tt>std::system_category</tt>
<td style="vertical-align: top;"><tt>boost::system::system_category</tt>
<td style="vertical-align: top;">One of:<ul>
<li><tt>experimental::posix_code_domain</tt> (POSIX systems)<p>
<li><tt>experimental::win32_code_domain</tt> (Microsoft Windows)<p>
<li><tt>experimental::nt_code_domain</tt> (Microsoft Windows)
</ul>
Note that there are more precanned code categories though they require additional header inclusions:
<tt>com_code</tt>, <tt>getaddrinfo_code</tt>.
<tr>
<td style="vertical-align: top;"><tt>std::error_condition</tt>
<td style="vertical-align: top;"><tt>boost::system::error_condition</tt>
<td style="vertical-align: top;"><b>No equivalent</b> (deliberately removed as hindsight proved it to be a design mistake leading to much confusing and hard to audit for correctness code)
<tr>
<td style="vertical-align: top;"><tt>std::error_code</tt>
<td style="vertical-align: top;"><tt>boost::system::error_code</tt>
<td style="vertical-align: top;">One of:<ul>
<li><tt>experimental::status_code&lt;DomainType&gt;</tt><p>
<li><tt>const experimental::status_code&lt;void&gt; &amp;</tt><p>
<li><tt>experimental::status_code&lt;erased&lt;intptr_t&gt;&gt;</tt> (aliased to <tt>experimental::system_code</tt>)<p>
<li><tt>experimental::errored_status_code&lt;DomainType&gt;</tt><p>
<li><tt>const experimental::errored_status_code&lt;void&gt; &amp;</tt><p>
<li><tt>experimental::errored_status_code&lt;erased&lt;intptr_t&gt;&gt;</tt> (aliased to <tt>experimental::error</tt>)
</ul>
The difference between status codes and errored status codes is that the latter are guaranteed
to refer to a failure, whereas the former may refer to a success (including warnings and informationals).
<tr>
<td style="vertical-align: top;"><tt>std::system_error</tt>
<td style="vertical-align: top;"><tt>boost::system::system_error</tt>
<td style="vertical-align: top;">One of:<ul>
<li><tt>const experimental::status_error&lt;void&gt; &amp;</tt><p>
<li><tt>experimental::status_error&lt;DomainType&gt;</tt>
</ul>
</table>
<p>As is obvious from the above, in <code>&lt;system_error2&gt;</code> one must be much more specific and accurate
with respect to intent and specification and desired semantics than with <code>&lt;system_error&gt;</code>. Much
ambiguity and incorrectness which flies silently in <code>&lt;system_error&gt;</code> will
refuse to compile in <code>&lt;system_error2&gt;</code>.</p>
</div><p><small>Last revised: December 16, 2020 at 14:14:42 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../experimental/advantages.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../experimental.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="../experimental/differences.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,103 @@
<!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>Tying it all together - 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="../experimental/status_result.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../experimental.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="../experimental/worked-example.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both">Tying it all together</h1></div></div></div>
<p>Firstly let&rsquo;s alias a more convenient form of <code>status_result</code>:</p>
<div class="code-snippet"><div class="highlight"><pre class="chroma"><code class="language-c++" data-lang="c++"><span class="k">template</span> <span class="o">&lt;</span><span class="k">class</span><span class="err"> </span><span class="nc">T</span><span class="p">,</span> <span class="k">class</span><span class="err"> </span><span class="nc">E</span> <span class="o">=</span> <span class="n">outcome_e</span><span class="o">::</span><span class="n">error</span><span class="o">&gt;</span>
<span class="k">using</span> <span class="n">result</span> <span class="o">=</span> <span class="c1">//
</span><span class="c1"></span><span class="n">outcome_e</span><span class="o">::</span><span class="n">status_result</span><span class="o">&lt;</span><span class="n">T</span><span class="p">,</span> <span class="n">E</span><span class="p">,</span> <span class="n">outcome_e</span><span class="o">::</span><span class="n">policy</span><span class="o">::</span><span class="n">default_status_result_policy</span><span class="o">&lt;</span><span class="n">T</span><span class="p">,</span> <span class="n">E</span><span class="o">&gt;&gt;</span><span class="p">;</span>
</code></pre></div><a href="https://github.com/boostorg/outcome/tree/master/doc/src/snippets/experimental_status_code.cpp#L209" class="code-snippet-url" target="_blank">View this code on Github</a></div>
<p>(The defaulting of <code>default_result_policy</code> is superfluous, it&rsquo;s already the default)</p>
<p>What follows now is very standard Outcome code. Indeed, it would compile
just fine under standard Outcome with only a few typedefs.</p>
<div class="code-snippet"><div class="highlight"><pre class="chroma"><code class="language-c++" data-lang="c++"><span class="n">result</span><span class="o">&lt;</span><span class="n">file_handle</span><span class="p">,</span> <span class="n">file_io_error</span><span class="o">&gt;</span> <span class="n">open_file</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">path</span><span class="p">)</span> <span class="c1">// models throws(file_io_error)
</span><span class="c1"></span><span class="p">{</span>
<span class="n">file_handle</span> <span class="n">ret</span><span class="p">(</span><span class="o">::</span><span class="n">fopen</span><span class="p">(</span><span class="n">path</span><span class="p">,</span> <span class="s">&#34;r&#34;</span><span class="p">));</span>
<span class="k">if</span><span class="p">(</span><span class="n">ret</span><span class="p">)</span>
<span class="k">return</span> <span class="n">ret</span><span class="p">;</span>
<span class="k">return</span> <span class="nf">file_io_error</span><span class="p">({</span><span class="n">errno</span><span class="p">,</span> <span class="n">__LINE__</span><span class="p">,</span> <span class="n">__FILE__</span><span class="p">});</span>
<span class="p">}</span>
<span class="n">result</span><span class="o">&lt;</span><span class="kt">void</span><span class="o">&gt;</span> <span class="n">open_resource</span><span class="p">()</span> <span class="c1">// models throws(std::error)
</span><span class="c1"></span><span class="p">{</span>
<span class="k">for</span><span class="p">(;;)</span>
<span class="p">{</span>
<span class="n">result</span><span class="o">&lt;</span><span class="n">file_handle</span><span class="p">,</span> <span class="n">file_io_error</span><span class="o">&gt;</span> <span class="n">r</span> <span class="o">=</span> <span class="n">open_file</span><span class="p">(</span><span class="s">&#34;some file&#34;</span><span class="p">);</span>
<span class="k">if</span><span class="p">(</span><span class="n">r</span><span class="p">)</span>
<span class="k">break</span><span class="p">;</span>
<span class="n">file_io_error</span> <span class="n">e</span> <span class="o">=</span> <span class="n">r</span><span class="p">.</span><span class="n">error</span><span class="p">();</span>
<span class="k">if</span><span class="p">(</span><span class="n">e</span> <span class="o">!=</span> <span class="n">outcome_e</span><span class="o">::</span><span class="n">errc</span><span class="o">::</span><span class="n">resource_unavailable_try_again</span><span class="p">)</span>
<span class="p">{</span>
<span class="c1">// NOTE this implicitly converts from `file_io_error` to `error` via the
</span><span class="c1"></span> <span class="c1">// `make_status_code()` free function customisation point defined above.
</span><span class="c1"></span> <span class="k">return</span> <span class="n">e</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="c1">// success continues here ...
</span><span class="c1"></span> <span class="k">return</span> <span class="n">outcome_e</span><span class="o">::</span><span class="n">success</span><span class="p">();</span>
<span class="p">}</span>
<span class="kt">int</span> <span class="n">main</span><span class="p">(</span><span class="kt">void</span><span class="p">)</span>
<span class="p">{</span>
<span class="n">result</span><span class="o">&lt;</span><span class="kt">void</span><span class="o">&gt;</span> <span class="n">r</span> <span class="o">=</span> <span class="n">open_resource</span><span class="p">();</span>
<span class="k">if</span><span class="p">(</span><span class="n">r</span><span class="p">)</span>
<span class="n">printf</span><span class="p">(</span><span class="s">&#34;Success!</span><span class="se">\n</span><span class="s">&#34;</span><span class="p">);</span>
<span class="k">else</span>
<span class="p">{</span>
<span class="k">auto</span> <span class="n">e</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">move</span><span class="p">(</span><span class="n">r</span><span class="p">).</span><span class="n">error</span><span class="p">();</span>
<span class="c1">// A quick demonstration that the indirection works as indicated
</span><span class="c1"></span> <span class="n">printf</span><span class="p">(</span><span class="s">&#34;Returned error has a code domain of &#39;%s&#39;, a message of &#39;%s&#39;</span><span class="se">\n</span><span class="s">&#34;</span><span class="p">,</span> <span class="n">e</span><span class="p">.</span><span class="n">domain</span><span class="p">().</span><span class="n">name</span><span class="p">().</span><span class="n">c_str</span><span class="p">(),</span>
<span class="n">e</span><span class="p">.</span><span class="n">message</span><span class="p">().</span><span class="n">c_str</span><span class="p">());</span>
<span class="n">printf</span><span class="p">(</span><span class="s">&#34;</span><span class="se">\n</span><span class="s">And semantically comparing it to &#39;errc::no_such_file_or_directory&#39; = %d</span><span class="se">\n</span><span class="s">&#34;</span><span class="p">,</span>
<span class="n">e</span> <span class="o">==</span> <span class="n">outcome_e</span><span class="o">::</span><span class="n">errc</span><span class="o">::</span><span class="n">no_such_file_or_directory</span><span class="p">);</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre></div><a href="https://github.com/boostorg/outcome/tree/master/doc/src/snippets/experimental_status_code.cpp#L214" class="code-snippet-url" target="_blank">View this code on Github</a></div>
<p>And running this program yields:</p>
<pre><code>Returned error has a code domain of 'file i/o error domain', a message of 'No such file or directory (c:\users\ned\documents\boostish\outcome\doc\src\snippets\experimental_status_code.cpp:195)'
And semantically comparing it to 'errc::no_such_file_or_directory' = 1
</code></pre>
<h3 id="conclusion">Conclusion</h3>
<p>Once you get used to <code>&lt;system_error2&gt;</code> and the fact that any <code>result</code> with
<code>E = error</code> is always move-only, using experimental Outcome is just like
using normal Outcome. Except that codegen will be better, custom domains
are safe to use in headers, semantic comparisons have guaranteed complexity
bounds, and build times are much reduced.</p>
<p>What&rsquo;s not to like? :)</p>
<p>Finally, if you have feedback on using experimental Outcome which you think
would be of use to the standards committee when evaluating possible
implementations of <a href="http://wg21.link/P0709">P0709 <em>Zero overhead exceptions: Throwing values</em></a>,
please do get in touch! This <strong>especially</strong> includes successful experiences!!!</p>
</div><p><small>Last revised: July 16, 2024 at 21:33:35 &#43;0100</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../experimental/status_result.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../experimental.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="../experimental/worked-example.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,81 @@
<!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>status_result and status_outcome - 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="../experimental/differences.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../experimental.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="../experimental/outcome.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both"><code>status_result</code> and <code>status_outcome</code></h1></div></div></div>
<p><code>status_result</code> and <code>status_outcome</code> are type aliases to <a href="../reference/types/basic_result.html" class="api-reference"><code>basic_result&lt;T, E, NoValuePolicy&gt;</code></a>
and <a href="../reference/types/basic_outcome.html" class="api-reference"><code>basic_outcome&lt;T, EC, EP, NoValuePolicy&gt;</code></a>
in the usual way, but
with a defaulted <code>NoValuePolicy</code> which selects on the basis of <code>status_code&lt;DomainType&gt;</code>
instead.</p>
<div class="notices note" style="background: url('../images/note.png') top left no-repeat padding-box padding-box;">
<div class="notices heading">note</div>
<div class="notices message"><p>If the <code>E</code> type is not some <code>status_code&lt;&gt;</code>, the default policy selector
will complain.</p>
</div>
</div>
<p>The specifications are:</p>
<div class="highlight"><pre class="chroma"><code class="language-c++" data-lang="c++"><span class="n">experimental</span><span class="o">::</span><span class="n">status_result</span><span class="o">&lt;</span><span class="n">T</span><span class="p">,</span> <span class="n">E</span> <span class="o">=</span> <span class="n">experimental</span><span class="o">::</span><span class="n">error</span><span class="o">&gt;</span>
<span class="n">experimental</span><span class="o">::</span><span class="n">status_outcome</span><span class="o">&lt;</span><span class="n">T</span><span class="p">,</span> <span class="n">E</span> <span class="o">=</span> <span class="n">experimental</span><span class="o">::</span><span class="n">error</span><span class="p">,</span> <span class="n">EP</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">exception_ptr</span><span class="o">&gt;</span>
</code></pre></div>
<p>So, the default <code>E</code> is the erased errored status code <code>system_code</code>, which can represent
any <code>generic_code</code>, <code>posix_code</code>, <code>win32_code</code>, <code>nt_code</code>, <code>com_code</code> and many
other integer error and status
codings. Because it is an errored status code, it will always represent a failure.</p>
<p>You can absolutely choose an <code>E</code> type which is non-erased e.g. <code>posix_code</code> directly.
You can also choose an <code>E</code> type which is not contract guaranteed to be a failure,
though your users may find that surprising.</p>
<p>Whether to choose typed status codes versus the erased status codes depends on your
use cases. Outcome replicates faithfully the implicit and explicit conversion
semantics of its underlying types, so you can mix results and outcomes of
<code>&lt;system_error2&gt;</code> types exactly as you can the <code>&lt;system_error2&gt;</code> types themselves
e.g. typed forms will implicitly convert into erased forms if the source type
is trivially copyable or move relocating. This means that you can return a
<code>generic_code</code> from a function returning a <code>system_code</code> or <code>error</code>, and it&rsquo;ll
work exactly as you&rsquo;d expect (implicit conversion).</p>
<div class="notices note" style="background: url('../images/note.png') top left no-repeat padding-box padding-box;">
<div class="notices heading">note</div>
<div class="notices message"><p>As <code>status_code&lt;erased&lt;T&gt;&gt;</code> is move-only, so is any <code>status_result</code> or <code>status_outcome</code>.
For some reason this surprises a lot of people, and they tend to react by not using the erased
form because it seems &ldquo;difficult&rdquo;.</p>
</div>
</div>
<p>It is actually, in fact, a wise discipline to follow to make all functions return
move-only types if you care about determinism and performance. Whilst C++ 17 onwards
does much to have the compiler avoid copying of identical function return values thanks to
guaranteed copy elision, when a chain of functions return different types, if the
programmer forgets to scatter <code>std::move()</code> appropriately, copies rather than moves
tend to occur in non-obvious ways. No doubt future C++ standards will improve on the
automatic use of moves instead of copies where possible, but until then making all
your <code>result</code> and <code>outcome</code> types move-only is an excellent discipline.</p>
<p>Note that move-only <code>result</code> and <code>outcome</code> capable code (i.e. your project is in Experimental
Outcome configuration) usually compiles fine when <code>result</code> and <code>outcome</code> are copyable
(i.e. your project is in Standard Outcome configuration), albeit sometimes with a few
compiler warnings about unnecessary use of <code>std::move()</code>.</p>
</div><p><small>Last revised: December 16, 2020 at 14:14:42 UTC</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../experimental/differences.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../experimental.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="../experimental/outcome.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,57 @@
<!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>Worked example: Custom domain (the long way) - 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="../experimental/worked-example/implicit-construction.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../experimental.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="../experimental/worked-example-long/preamble.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both">Worked example: Custom domain (the long way)</h1></div></div></div>
<p>Here follows a longer worked example of use of Experimental Outcome. It presents
the same sample program I sent to the San Diego 2018 WG21 standards meeting
after I was asked by the committee to demonstrate how P1095 implements P0709
in a working code example they could study and discuss.</p>
<p>We will walk through this worked example, step by step, explaining how each
part works in detail. This will help you implement your own code based on
Experimental Outcome.</p>
<p>Most users will not need this level of customisation, and for them the preceding
<a href="../experimental/worked-example.html">quick and easy approach</a> will be much easier.</p>
<p>You may find it useful to open now in a separate browser tab the reference API
documentation for proposed <code>&lt;system_error2&gt;</code> at <a href="https://ned14.github.io/status-code/">https://ned14.github.io/status-code/</a>
(scroll half way down). The references in the comments to P1028 are to
<a href="http://wg21.link/P1028">P1028 <em>SG14 status_code and standard error object for P0709 Zero-overhead
deterministic exceptions</em></a>, which is the WG21 proposal
paper for potential <code>&lt;system_error2&gt;</code>.</p>
<h3 id="goal-of-this-section">Goal of this section</h3>
<p>We are going to define a simple custom code domain which defines that
the status code&rsquo;s payload will consist of a POSIX error code, and the
<code>__FILE__</code> and <code>__LINE__</code> where the failure occurred. This custom status
code will have an implicit conversion to type erased <code>error</code> defined, which dynamically
allocates memory for the original status code, and outputs an <code>error</code>
which manages that dynamic allocation, indirecting all queries etc
to the erased custom status code type such that the <code>error</code> instance
quacks as if just like the original. This demonstrates that <code>error</code> could
just as equally convey a <code>std::exception_ptr</code>, for example, or indeed
manage the lifetime of any pointer.</p>
</div><p><small>Last revised: July 16, 2024 at 21:33:35 &#43;0100</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../experimental/worked-example/implicit-construction.html"><img src="../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../experimental.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="../experimental/worked-example-long/preamble.html"><img src="../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,57 @@
<!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>The constructor - 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="../../experimental/worked-example-long/value_type.html"><img src="../../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../../experimental/worked-example-long.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="../../experimental/worked-example-long/string_ref.html"><img src="../../images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both">The constructor</h1></div></div></div>
<p>Code domains are 100% constexpr to construct and destruct, as are status codes.
This enables the compiler to 100% instantiate both only in its mind, and to emit
zero code and thus zero overhead.</p>
<p>Unfortunately it also means that it must be possible for each domain to be instantiated an infinite
number of times, and being 100% in constexpr, any instances never have a unique
address in memory either. Thus we cannot compare domains for equivalence using
their address in memory, as
<a href="https://en.cppreference.com/w/cpp/error/error_category" class="api-reference" target="_blank"><i class="fa fa-book" aria-hidden="true"></i> <code>std::error_category</code></a>
does.</p>
<p>We solve this by using a <em>very</em> random 64 bit number taken from a hard random
number source. The website <a href="https://www.random.org/cgi-bin/randbyte?nbytes=8&amp;format=h">https://www.random.org/cgi-bin/randbyte?nbytes=8&amp;format=h</a>
is strongly suggested as the source for this number.</p>
<p>(In case you are wondering about the chance of collision for a 64 bit integer, SG14 estimated that
approximately 190,000 separate domains would need to exist in a single process
for there to be a 0.00000001% probability of collision if the random number
source is very random)</p>
<div class="code-snippet"><div class="highlight"><pre class="chroma"><code class="language-c++" data-lang="c++"> <span class="c1">// unique id must be from a hard random number source
</span><span class="c1"></span> <span class="c1">// Use https://www.random.org/cgi-bin/randbyte?nbytes=8&amp;format=h to get a hard random 64 bit id.
</span><span class="c1"></span> <span class="c1">// Do NOT make up your own value. Do NOT use zero.
</span><span class="c1"></span> <span class="k">constexpr</span> <span class="k">explicit</span> <span class="nf">_file_io_error_domain</span><span class="p">(</span><span class="k">typename</span> <span class="n">_base</span><span class="o">::</span><span class="n">unique_id_type</span> <span class="n">id</span> <span class="o">=</span> <span class="mh">0x230f170194fcc6c7</span><span class="p">)</span> <span class="k">noexcept</span>
<span class="o">:</span> <span class="n">_base</span><span class="p">(</span><span class="n">id</span><span class="p">)</span>
<span class="p">{</span>
<span class="p">}</span>
<span class="k">static</span> <span class="kr">inline</span> <span class="k">constexpr</span> <span class="k">const</span> <span class="n">_file_io_error_domain</span> <span class="o">&amp;</span><span class="n">get</span><span class="p">();</span>
</code></pre></div><a href="https://github.com/boostorg/outcome/tree/master/doc/src/snippets/experimental_status_code.cpp#L97" class="code-snippet-url" target="_blank">View this code on Github</a></div>
<p>A nice side effect of this approach is that custom error domains in header-only
libraries are safe, unlike custom <code>&lt;system_error&gt;</code> error categories. Boost.System&rsquo;s
error categories can now opt into this same safe mechanism in order to also be
safe in header only library use cases.</p>
</div><p><small>Last revised: July 16, 2024 at 21:33:35 &#43;0100</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../experimental/worked-example-long/value_type.html"><img src="../../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../../experimental/worked-example-long.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="../../experimental/worked-example-long/string_ref.html"><img src="../../images/next.png" alt="Next"></a></div></body>
</html>

View File

@@ -0,0 +1,60 @@
<!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>Implicit conversion - 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="../../experimental/worked-example-long/source.html"><img src="../../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../../experimental/worked-example-long.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="../../experimental/c-api.html"><img src="../../images/next.png" alt="Next"></a></div><div id="content">
<div class="titlepage"><div><div><h1 style="clear: both">Implicit conversion</h1></div></div></div>
<p>Back in <a href="../../experimental/worked-example-long/value_type.html">The payload</a>, we
mentioned that there was no default implicit conversion of <code>file_io_error</code>
(<code>status_code&lt;_file_io_error_domain&gt;</code>) to <code>error</code>, as <code>error</code> is too small
to hold <code>_file_io_error_domain::value_type</code>.</p>
<p>We can tell the framework about available implicit conversions by defining
an ADL discovered free function <code>make_status_code()</code> which takes our
custom status code as input, and returns an <code>error</code>:</p>
<div class="code-snippet"><div class="highlight"><pre class="chroma"><code class="language-c++" data-lang="c++"><span class="c1">// Now tell `error` how it can implicitly construct from `file_io_error`.
</span><span class="c1">// This is done by us defining a free function called `make_status_code()`
</span><span class="c1">// which is discovered using ADL. `error` is an alias to the refinement
</span><span class="c1">// `status_code&lt;erased&lt;intptr_t&gt;&gt;` which is a status code whose value type
</span><span class="c1">// has been erased into an `intptr_t`. `status_code&lt;erased&lt;intptr_t&gt;&gt;`
</span><span class="c1">// (i.e. `error`) are move bitcopying (P1029) i.e. they are move-only
</span><span class="c1">// types whose move operation is defined to leave the source in the same
</span><span class="c1">// representation as a default constructed instance, and for whose
</span><span class="c1">// non-trivial destructor when called upon a default constructed instance
</span><span class="c1">// is guaranteed to do nothing.
</span><span class="c1"></span><span class="kr">inline</span> <span class="n">outcome_e</span><span class="o">::</span><span class="n">system_code</span> <span class="n">make_status_code</span><span class="p">(</span><span class="n">file_io_error</span> <span class="n">v</span><span class="p">)</span>
<span class="p">{</span>
<span class="c1">// `make_nested_status_code()` dynamically allocates memory to store an
</span><span class="c1"></span> <span class="c1">// instance of `file_io_error`, then returns a status code whose domain
</span><span class="c1"></span> <span class="c1">// specifies that its value type is a pointer to `file_io_error`. The
</span><span class="c1"></span> <span class="c1">// domain is a templated instance which indirects all observers of the
</span><span class="c1"></span> <span class="c1">// status code to the pointed-to status code.
</span><span class="c1"></span> <span class="c1">//
</span><span class="c1"></span> <span class="c1">// Note that the status code returned&#39;s value type is a pointer, which
</span><span class="c1"></span> <span class="c1">// by definition fits into `intptr_t` and is trivially copyable.
</span><span class="c1"></span> <span class="c1">// Therefore `system_code` (which is also a type alias to
</span><span class="c1"></span> <span class="c1">// `status_code&lt;erased&lt;intptr_t&gt;&gt;`) is happy to implicitly construct
</span><span class="c1"></span> <span class="c1">// from the status code returned by `make_nested_status_code()`.
</span><span class="c1"></span> <span class="k">return</span> <span class="n">make_nested_status_code</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">move</span><span class="p">(</span><span class="n">v</span><span class="p">));</span>
<span class="p">}</span>
</code></pre></div><a href="https://github.com/boostorg/outcome/tree/master/doc/src/snippets/experimental_status_code.cpp#L165" class="code-snippet-url" target="_blank">View this code on Github</a></div>
<p>We are now ready to use Experimental Outcome!</p>
</div><p><small>Last revised: July 16, 2024 at 21:33:35 &#43;0100</small></p>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../experimental/worked-example-long/source.html"><img src="../../images/prev.png" alt="Prev"></a>
<a accesskey="u" href="../../experimental/worked-example-long.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="../../experimental/c-api.html"><img src="../../images/next.png" alt="Next"></a></div></body>
</html>

Some files were not shown because too many files have changed in this diff Show More