Travis CI regenerates Boost.Outcome docs
21
doc/html/_footer.html
Normal 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
@@ -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.1 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>
|
||||
162
doc/html/build.html
Normal file
@@ -0,0 +1,162 @@
|
||||
<!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="./motivation.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-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><outcome.hpp></code>.</p>
|
||||
|
||||
<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 "outcome/include/outcome.hpp"
|
||||
</code></pre>
|
||||
|
||||
<p>That’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 branch containing
|
||||
all the documentation, tests and sources, this can always be retrieved from:</p>
|
||||
|
||||
<p><a href="https://dedi5.nedprod.com/static/files/outcome-v2.0-source-latest.tar.xz">https://dedi5.nedprod.com/static/files/outcome-v2.0-source-latest.tar.xz</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 6.5, clang 4.0.1</li>
|
||||
<li>MacOS: XCode 9</li>
|
||||
<li>Windows: VS2017.9</li>
|
||||
</ul>
|
||||
|
||||
<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.1 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="modular-cmake-build-support">Modular CMake build support</h1>
|
||||
|
||||
<p>If you are using Outcome in a CMake project, Outcome is a “modular cmake” 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.1 or better.</p>
|
||||
|
||||
<pre><code>add_subdirectory(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/outcome" # path to outcome source
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/outcome" # your choice of where to put binaries
|
||||
EXCLUDE_FROM_ALL # please only lazy build outcome on demand
|
||||
)
|
||||
</code></pre>
|
||||
|
||||
<p>Outcome’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’s test
|
||||
suite. You can append this to your own test suite if you wish to run Outcome’s test
|
||||
suite along with your own.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div><p><small>Last revised: February 06, 2019 at 14:38:54 UTC</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="./motivation.html"><img src="./images/next.png" alt="Next"></a></div></body>
|
||||
</html>
|
||||
67
doc/html/categories.html
Normal 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"> →</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"> →</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>
|
||||
51
doc/html/categories/assignment.html
Normal 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>
|
||||
1
doc/html/categories/assignment/page/1.html
Normal 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>
|
||||
67
doc/html/categories/comparisons.html
Normal 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"> →</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"> →</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>
|
||||
1
doc/html/categories/comparisons/page/1.html
Normal 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>
|
||||
56
doc/html/categories/comparisons/page/2.html
Normal 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">← </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">← </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>
|
||||
67
doc/html/categories/constructors.html
Normal 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"> →</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"> →</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
|
||||
</div><p><small>Last revised: January 21, 2019 at 18:00:41 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>
|
||||
1
doc/html/categories/constructors/page/1.html
Normal 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>
|
||||
72
doc/html/categories/constructors/page/2.html
Normal 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">← </a>
|
||||
|
||||
<span class="page-number"> 2 7</span>
|
||||
|
||||
<a class="older-posts" href="../../../categories/constructors/page/3.html"> →</a>
|
||||
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div style="margin-bottom:2rem"></div>
|
||||
|
||||
<nav class="pagination" role="navigation">
|
||||
|
||||
<a class="newer-posts" href="../../../categories/constructors.html">← </a>
|
||||
|
||||
<span class="page-number"> 2 7</span>
|
||||
|
||||
<a class="older-posts" href="../../../categories/constructors/page/3.html"> →</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>
|
||||
72
doc/html/categories/constructors/page/3.html
Normal 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">← </a>
|
||||
|
||||
<span class="page-number"> 3 7</span>
|
||||
|
||||
<a class="older-posts" href="../../../categories/constructors/page/4.html"> →</a>
|
||||
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div style="margin-bottom:2rem"></div>
|
||||
|
||||
<nav class="pagination" role="navigation">
|
||||
|
||||
<a class="newer-posts" href="../../../categories/constructors/page/2.html">← </a>
|
||||
|
||||
<span class="page-number"> 3 7</span>
|
||||
|
||||
<a class="older-posts" href="../../../categories/constructors/page/4.html"> →</a>
|
||||
|
||||
</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>
|
||||
72
doc/html/categories/constructors/page/4.html
Normal 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">← </a>
|
||||
|
||||
<span class="page-number"> 4 7</span>
|
||||
|
||||
<a class="older-posts" href="../../../categories/constructors/page/5.html"> →</a>
|
||||
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div style="margin-bottom:2rem"></div>
|
||||
|
||||
<nav class="pagination" role="navigation">
|
||||
|
||||
<a class="newer-posts" href="../../../categories/constructors/page/3.html">← </a>
|
||||
|
||||
<span class="page-number"> 4 7</span>
|
||||
|
||||
<a class="older-posts" href="../../../categories/constructors/page/5.html"> →</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
|
||||
</div><p><small>Last revised: January 21, 2019 at 18:00:41 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>
|
||||
72
doc/html/categories/constructors/page/5.html
Normal 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">← </a>
|
||||
|
||||
<span class="page-number"> 5 7</span>
|
||||
|
||||
<a class="older-posts" href="../../../categories/constructors/page/6.html"> →</a>
|
||||
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div style="margin-bottom:2rem"></div>
|
||||
|
||||
<nav class="pagination" role="navigation">
|
||||
|
||||
<a class="newer-posts" href="../../../categories/constructors/page/4.html">← </a>
|
||||
|
||||
<span class="page-number"> 5 7</span>
|
||||
|
||||
<a class="older-posts" href="../../../categories/constructors/page/6.html"> →</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>
|
||||
72
doc/html/categories/constructors/page/6.html
Normal 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">← </a>
|
||||
|
||||
<span class="page-number"> 6 7</span>
|
||||
|
||||
<a class="older-posts" href="../../../categories/constructors/page/7.html"> →</a>
|
||||
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div style="margin-bottom:2rem"></div>
|
||||
|
||||
<nav class="pagination" role="navigation">
|
||||
|
||||
<a class="newer-posts" href="../../../categories/constructors/page/5.html">← </a>
|
||||
|
||||
<span class="page-number"> 6 7</span>
|
||||
|
||||
<a class="older-posts" href="../../../categories/constructors/page/7.html"> →</a>
|
||||
|
||||
</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>
|
||||
52
doc/html/categories/constructors/page/7.html
Normal 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">← </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">← </a>
|
||||
|
||||
<span class="page-number"> 7 7</span>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
|
||||
</div><p><small>Last revised: January 21, 2019 at 18:00:41 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>
|
||||
67
doc/html/categories/converting-constructors.html
Normal 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"> →</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"> →</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
|
||||
</div><p><small>Last revised: October 10, 2019 at 18:14:56 +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>
|
||||
1
doc/html/categories/converting-constructors/page/1.html
Normal 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>
|
||||
72
doc/html/categories/converting-constructors/page/2.html
Normal 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">← </a>
|
||||
|
||||
<span class="page-number"> 2 3</span>
|
||||
|
||||
<a class="older-posts" href="../../../categories/converting-constructors/page/3.html"> →</a>
|
||||
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div style="margin-bottom:2rem"></div>
|
||||
|
||||
<nav class="pagination" role="navigation">
|
||||
|
||||
<a class="newer-posts" href="../../../categories/converting-constructors.html">← </a>
|
||||
|
||||
<span class="page-number"> 2 3</span>
|
||||
|
||||
<a class="older-posts" href="../../../categories/converting-constructors/page/3.html"> →</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>
|
||||
52
doc/html/categories/converting-constructors/page/3.html
Normal 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">← </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">← </a>
|
||||
|
||||
<span class="page-number"> 3 3</span>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
|
||||
</div><p><small>Last revised: October 10, 2019 at 18:14:56 +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>
|
||||
47
doc/html/categories/copy-assignment.html
Normal 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>
|
||||
1
doc/html/categories/copy-assignment/page/1.html
Normal 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>
|
||||
47
doc/html/categories/copy-constructors.html
Normal 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>
|
||||
1
doc/html/categories/copy-constructors/page/1.html
Normal 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>
|
||||
47
doc/html/categories/default-constructors.html
Normal 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>
|
||||
1
doc/html/categories/default-constructors/page/1.html
Normal 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>
|
||||
47
doc/html/categories/destructors.html
Normal 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>
|
||||
1
doc/html/categories/destructors/page/1.html
Normal 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>
|
||||
51
doc/html/categories/disabling-constructors.html
Normal 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>
|
||||
1
doc/html/categories/disabling-constructors/page/1.html
Normal 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>
|
||||
67
doc/html/categories/explicit-constructors.html
Normal 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"> →</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"> →</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
|
||||
</div><p><small>Last revised: January 21, 2019 at 18:00:41 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>
|
||||
1
doc/html/categories/explicit-constructors/page/1.html
Normal 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>
|
||||
72
doc/html/categories/explicit-constructors/page/2.html
Normal 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">← </a>
|
||||
|
||||
<span class="page-number"> 2 3</span>
|
||||
|
||||
<a class="older-posts" href="../../../categories/explicit-constructors/page/3.html"> →</a>
|
||||
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div style="margin-bottom:2rem"></div>
|
||||
|
||||
<nav class="pagination" role="navigation">
|
||||
|
||||
<a class="newer-posts" href="../../../categories/explicit-constructors.html">← </a>
|
||||
|
||||
<span class="page-number"> 2 3</span>
|
||||
|
||||
<a class="older-posts" href="../../../categories/explicit-constructors/page/3.html"> →</a>
|
||||
|
||||
</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>
|
||||
56
doc/html/categories/explicit-constructors/page/3.html
Normal 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">← </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">← </a>
|
||||
|
||||
<span class="page-number"> 3 3</span>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
|
||||
</div><p><small>Last revised: January 21, 2019 at 18:00:41 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>
|
||||
67
doc/html/categories/implicit-constructors.html
Normal 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"> →</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"> →</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
|
||||
</div><p><small>Last revised: January 21, 2019 at 18:00:41 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>
|
||||
1
doc/html/categories/implicit-constructors/page/1.html
Normal 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>
|
||||
72
doc/html/categories/implicit-constructors/page/2.html
Normal 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">← </a>
|
||||
|
||||
<span class="page-number"> 2 4</span>
|
||||
|
||||
<a class="older-posts" href="../../../categories/implicit-constructors/page/3.html"> →</a>
|
||||
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div style="margin-bottom:2rem"></div>
|
||||
|
||||
<nav class="pagination" role="navigation">
|
||||
|
||||
<a class="newer-posts" href="../../../categories/implicit-constructors.html">← </a>
|
||||
|
||||
<span class="page-number"> 2 4</span>
|
||||
|
||||
<a class="older-posts" href="../../../categories/implicit-constructors/page/3.html"> →</a>
|
||||
|
||||
</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>
|
||||
72
doc/html/categories/implicit-constructors/page/3.html
Normal 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">← </a>
|
||||
|
||||
<span class="page-number"> 3 4</span>
|
||||
|
||||
<a class="older-posts" href="../../../categories/implicit-constructors/page/4.html"> →</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">← </a>
|
||||
|
||||
<span class="page-number"> 3 4</span>
|
||||
|
||||
<a class="older-posts" href="../../../categories/implicit-constructors/page/4.html"> →</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>
|
||||
56
doc/html/categories/implicit-constructors/page/4.html
Normal 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">← </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">← </a>
|
||||
|
||||
<span class="page-number"> 4 4</span>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
|
||||
</div><p><small>Last revised: January 21, 2019 at 18:00:41 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>
|
||||
67
doc/html/categories/inplace-constructors.html
Normal 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"> →</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"> →</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
|
||||
</div><p><small>Last revised: January 21, 2019 at 18:00:41 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>
|
||||
1
doc/html/categories/inplace-constructors/page/1.html
Normal 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>
|
||||
52
doc/html/categories/inplace-constructors/page/2.html
Normal 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">← </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">← </a>
|
||||
|
||||
<span class="page-number"> 2 2</span>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
|
||||
</div><p><small>Last revised: January 21, 2019 at 18:00:41 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>
|
||||
59
doc/html/categories/modifiers.html
Normal 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 +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>
|
||||
1
doc/html/categories/modifiers/page/1.html
Normal 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>
|
||||
47
doc/html/categories/move-assignment.html
Normal 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>
|
||||
1
doc/html/categories/move-assignment/page/1.html
Normal 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>
|
||||
47
doc/html/categories/move-constructors.html
Normal 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>
|
||||
1
doc/html/categories/move-constructors/page/1.html
Normal 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>
|
||||
49
doc/html/categories/observer-policies.html
Normal file
@@ -0,0 +1,49 @@
|
||||
<!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 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: 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>
|
||||
1
doc/html/categories/observer-policies/page/1.html
Normal 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>
|
||||
67
doc/html/categories/observers.html
Normal 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"> →</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"> →</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>
|
||||
1
doc/html/categories/observers/page/1.html
Normal 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>
|
||||
72
doc/html/categories/observers/page/2.html
Normal 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">← </a>
|
||||
|
||||
<span class="page-number"> 2 7</span>
|
||||
|
||||
<a class="older-posts" href="../../../categories/observers/page/3.html"> →</a>
|
||||
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div style="margin-bottom:2rem"></div>
|
||||
|
||||
<nav class="pagination" role="navigation">
|
||||
|
||||
<a class="newer-posts" href="../../../categories/observers.html">← </a>
|
||||
|
||||
<span class="page-number"> 2 7</span>
|
||||
|
||||
<a class="older-posts" href="../../../categories/observers/page/3.html"> →</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>
|
||||
72
doc/html/categories/observers/page/3.html
Normal 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">← </a>
|
||||
|
||||
<span class="page-number"> 3 7</span>
|
||||
|
||||
<a class="older-posts" href="../../../categories/observers/page/4.html"> →</a>
|
||||
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div style="margin-bottom:2rem"></div>
|
||||
|
||||
<nav class="pagination" role="navigation">
|
||||
|
||||
<a class="newer-posts" href="../../../categories/observers/page/2.html">← </a>
|
||||
|
||||
<span class="page-number"> 3 7</span>
|
||||
|
||||
<a class="older-posts" href="../../../categories/observers/page/4.html"> →</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>
|
||||
72
doc/html/categories/observers/page/4.html
Normal 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">← </a>
|
||||
|
||||
<span class="page-number"> 4 7</span>
|
||||
|
||||
<a class="older-posts" href="../../../categories/observers/page/5.html"> →</a>
|
||||
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div style="margin-bottom:2rem"></div>
|
||||
|
||||
<nav class="pagination" role="navigation">
|
||||
|
||||
<a class="newer-posts" href="../../../categories/observers/page/3.html">← </a>
|
||||
|
||||
<span class="page-number"> 4 7</span>
|
||||
|
||||
<a class="older-posts" href="../../../categories/observers/page/5.html"> →</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>
|
||||
72
doc/html/categories/observers/page/5.html
Normal 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">← </a>
|
||||
|
||||
<span class="page-number"> 5 7</span>
|
||||
|
||||
<a class="older-posts" href="../../../categories/observers/page/6.html"> →</a>
|
||||
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div style="margin-bottom:2rem"></div>
|
||||
|
||||
<nav class="pagination" role="navigation">
|
||||
|
||||
<a class="newer-posts" href="../../../categories/observers/page/4.html">← </a>
|
||||
|
||||
<span class="page-number"> 5 7</span>
|
||||
|
||||
<a class="older-posts" href="../../../categories/observers/page/6.html"> →</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>
|
||||
72
doc/html/categories/observers/page/6.html
Normal 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">← </a>
|
||||
|
||||
<span class="page-number"> 6 7</span>
|
||||
|
||||
<a class="older-posts" href="../../../categories/observers/page/7.html"> →</a>
|
||||
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div style="margin-bottom:2rem"></div>
|
||||
|
||||
<nav class="pagination" role="navigation">
|
||||
|
||||
<a class="newer-posts" href="../../../categories/observers/page/5.html">← </a>
|
||||
|
||||
<span class="page-number"> 6 7</span>
|
||||
|
||||
<a class="older-posts" href="../../../categories/observers/page/7.html"> →</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>
|
||||
50
doc/html/categories/observers/page/7.html
Normal 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">← </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">← </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>
|
||||
51
doc/html/categories/operators.html
Normal 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>
|
||||
1
doc/html/categories/operators/page/1.html
Normal 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>
|
||||
1
doc/html/categories/page/1.html
Normal 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>
|
||||
68
doc/html/categories/page/2.html
Normal 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">← </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">← </a>
|
||||
|
||||
<span class="page-number"> 2 2</span>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
|
||||
</div><p><small>Last revised: January 21, 2019 at 18:00:41 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>
|
||||
45
doc/html/categories/special.html
Normal 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: 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>
|
||||
1
doc/html/categories/special/page/1.html
Normal 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>
|
||||
67
doc/html/categories/tagged-constructors.html
Normal 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"> →</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"> →</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
|
||||
</div><p><small>Last revised: January 21, 2019 at 18:00:41 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>
|
||||
1
doc/html/categories/tagged-constructors/page/1.html
Normal 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>
|
||||
64
doc/html/categories/tagged-constructors/page/2.html
Normal 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">← </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">← </a>
|
||||
|
||||
<span class="page-number"> 2 2</span>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
|
||||
</div><p><small>Last revised: January 21, 2019 at 18:00:41 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>
|
||||
298
doc/html/changelog.html
Normal file
@@ -0,0 +1,298 @@
|
||||
<!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="./history.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-1-2-boost-1-72-release-https-github-com-ned14-outcome-releases-tag-v2-1-2">v2.1.2 ? (Boost 1.72) <a href="https://github.com/ned14/outcome/releases/tag/v2.1.2">[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-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-1">Enhancements:</a></dt>
|
||||
<dt><a href="#bug-fixes-1">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-1-2-boost-1-72-release-https-github-com-ned14-outcome-releases-tag-v2-1-2">v2.1.2 ? (Boost 1.72) <a href="https://github.com/ned14/outcome/releases/tag/v2.1.2">[release]</a></h2>
|
||||
|
||||
<h3 id="enhancements">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’s dependency, quickcpplib,
|
||||
else <code>find_package()</code> of Outcome will fail.</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<OutcomeType></code> and <code>lazy<OutcomeType></code> which let you more
|
||||
naturally and efficiently use <code>basic_result</code> or <code>basic_outcome</code> from within C++
|
||||
Coroutines – 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<T></code> and <code>lazy<T></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<></code>. This lets you construct
|
||||
a <code>basic_result<T, E></code> into a <code>basic_result<T, error_code></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<></code> has less support for this than
|
||||
<code>basic_result<></code> in order to keep constructor count down, but it will accept via
|
||||
this mechanism conversions from <code>basic_result<></code> and <code>failure_type<></code>.</dd>
|
||||
</dl>
|
||||
|
||||
<h3 id="bug-fixes">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-1">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<T, E></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-1">Bug fixes:</h3>
|
||||
|
||||
<dl>
|
||||
<dt>-</dt>
|
||||
<dd><code>BOOST_OUTCOME_VERSION_MINOR</code> hadn’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’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<T></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’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<T, E></code>, <code>boost_result<T, E></code> and <code>std_result<T, E></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<T, E></code>, <code>boost_unchecked<T, E></code> or <code>std_unchecked<T, E></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’s without a copy constructor
|
||||
but with a move constructor would indicate via traits that copy construction
|
||||
was available. Thanks to Microsoft’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<T, T></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<T, T></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’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’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><system_error></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><system_error></code> and <code><exception></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: October 16, 2019 at 10:26:35 +0100</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="./history.html"><img src="./images/next.png" alt="Next"></a></div></body>
|
||||
</html>
|
||||
192
doc/html/credits.html
Normal file
@@ -0,0 +1,192 @@
|
||||
<!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://avatars1.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">1123 commits</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<img src="https://avatars1.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://avatars1.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://avatars3.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://avatars2.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/libboze">@libboze</a></label>
|
||||
<span class="contributions">2 commits</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<img src="https://avatars1.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://avatars1.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://avatars3.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://avatars3.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://avatars2.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://avatars0.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://avatars1.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/gusrb406">@gusrb406</a></label>
|
||||
<span class="contributions">1 commits</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<img src="https://avatars1.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>
|
||||
|
||||
<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,
|
||||
“what if?”’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 “stupid questions” at least
|
||||
one of which caused a major rethink and refactor. If Outcome v2 passes its second peer
|
||||
review, it’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 “Outcome”</a> for the library after a very extended
|
||||
period of name bikeshedding on boost-dev. I had been minded to call the library “Boost.Donkey”
|
||||
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<T, E></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’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
169
doc/html/css/local.css
Normal 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 }
|
||||
67
doc/html/experimental.html
Normal 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>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/foreign-try.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><boost/outcome/experimental></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>, aka “Herbceptions”. 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>
|
||||
|
||||
<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><boost/outcome/experimental></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.
|
||||
There are quite a few large code bases out there
|
||||
already using this experimental support in anger, we know it works well
|
||||
at scale and it’s a good bit superior to <code>std::error_code</code> et al on every
|
||||
measure.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p>P1095’s support library has a reference implementation at <a href="https://ned14.github.io/status-code/">https://ned14.github.io/status-code/</a>.
|
||||
You will find terse documentation there, and an API reference.
|
||||
This library is wholly incorporated into Outcome in the <code><boost/outcome/experimental/status-code></code>
|
||||
directory, with bindings into Outcome provided in the following headers:</p>
|
||||
|
||||
<ul>
|
||||
<li><code><boost/outcome/experimental/status_result.hpp></code></li>
|
||||
<li><code><boost/outcome/experimental/status_outcome.hpp></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<T, E></code>:</p>
|
||||
|
||||
<ul>
|
||||
<li><code><boost/outcome/experimental/result.h></code></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div><p><small>Last revised: January 26, 2019 at 21:01:46 UTC</small></p>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="./recipes/foreign-try.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>
|
||||
66
doc/html/experimental/advantages.html
Normal file
@@ -0,0 +1,66 @@
|
||||
<!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><boost/outcome/experimental></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><basic_result.hpp></code>, as the STL allocator machinery and <code>std::string</code> et al
|
||||
is not dragged into inclusion by including <code><system_error></code>. Note that
|
||||
<code><boost/outcome/experimental/status_outcome.hpp></code> bring in <code><exception></code>,
|
||||
however <code><boost/outcome/experimental/status_result.hpp></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><boost/outcome/experimental></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><boost/outcome/experimental></code>.</p></li>
|
||||
</ol>
|
||||
|
||||
<p>If you are building a codebase on top of Outcome expecting long term
|
||||
maintenance, the author’s personal recommendation is that you design, write, test and
|
||||
optimise it for <code><boost/outcome/experimental></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><system_error></code>
|
||||
and proposed <code><system_error2></code>.</p>
|
||||
<div class="footnotes">
|
||||
|
||||
<hr />
|
||||
|
||||
<ol>
|
||||
<li id="fn:1">Boost.System’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: February 05, 2019 at 21:41:47 UTC</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>
|
||||
58
doc/html/experimental/c-api.html
Normal 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/outcome.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/limitations.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">"C"</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">&</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<T></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/outcome.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/limitations.html"><img src="../images/next.png" alt="Next"></a></div></body>
|
||||
</html>
|
||||
70
doc/html/experimental/c-api/example.html
Normal 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++ 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/limitations.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/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"><</span><span class="n">size_t</span><span class="o">></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">></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 <system_error2> analogue of Standard Outcome'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">// <boost/outcome/experimental/status-code/system_code_from_exception.hpp>
|
||||
</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<size_t></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<size_t, status_code<erased<intptr_t>>></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 &&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><system_error2></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<erased<intptr_t>></code>) instead of a <code>std::error_code</code>.</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/c-api/limitations.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/example2.html"><img src="../../images/next.png" alt="Next"></a></div></body>
|
||||
</html>
|
||||
77
doc/html/experimental/c-api/example2.html
Normal 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/example.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/reference.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's returning result type. Only needs to be done once.
|
||||
</span><span class="c1">// This declares an `status_result<size_t, system_code>` which is an alias to
|
||||
</span><span class="c1">// `basic_result<size_t, status_code<erased<intptr_t>>>`.
|
||||
</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="nf">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’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">"to_string(%d) fills buffer with '%s' of %zu characters</span><span class="se">\n</span><span class="s">"</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">"to_string(%d) failed with error code %d (%s)</span><span class="se">\n</span><span class="s">"</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">"to_string(%d) failed with unknown error code %lld</span><span class="se">\n</span><span class="s">"</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: February 05, 2019 at 17:14:18 UTC</small></p>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../../experimental/c-api/example.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/reference.html"><img src="../../images/next.png" alt="Next"></a></div></body>
|
||||
</html>
|
||||
81
doc/html/experimental/c-api/limitations.html
Normal 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>Limitations - 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/example.html"><img src="../../images/next.png" alt="Next"></a></div><div id="content">
|
||||
<div class="titlepage"><div><div><h1 style="clear: both">Limitations</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 "C"</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 "C"</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<T></code></a></li>
|
||||
<li><a href="http://en.cppreference.com/w/cpp/types/is_trivially_copyable"><code>std::is_trivially_copyable_v<T></code></a></li>
|
||||
</ul>
|
||||
|
||||
<p>(Note that <code>std::is_trivially_copyable_v<T></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, “almost-standard-layout” C++ types work fine in C.</p>
|
||||
|
||||
<p>“Almost-standard-layout” 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<T></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’t get orphaned in C. This was referred to in previous pages in this
|
||||
section as “move relocating” types.</li>
|
||||
</ol>
|
||||
|
||||
<p>Experimental Outcome’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’t be returned from <code>extern "C"</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 “almost-standard-layout” C++ type if <code>T</code> is
|
||||
an “almost-standard-layout” C++ type.</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/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/example.html"><img src="../../images/next.png" alt="Next"></a></div></body>
|
||||
</html>
|
||||
97
doc/html/experimental/c-api/reference.html
Normal file
@@ -0,0 +1,97 @@
|
||||
<!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 Macro API Reference - 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/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="../../reference.html"><img src="../../images/next.png" alt="Next"></a></div><div id="content">
|
||||
<div class="titlepage"><div><div><h1 style="clear: both">C Macro API Reference</h1></div></div></div>
|
||||
|
||||
|
||||
<p>The C macro API header <code><boost/outcome/experimental/result.h></code> consists of these macros:</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>.
|
||||
|
||||
<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<T, E></code>. <code>basic_result<T, E></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="n">T</span> <span class="n">value</span><span class="p">;</span>
|
||||
<span class="kt">unsigned</span> <span class="n">flags</span><span class="p">;</span>
|
||||
<span class="n">E</span> <span class="n">error</span><span class="p">;</span>
|
||||
<span class="p">};</span>
|
||||
</code></pre></div>
|
||||
<h3 id="system-error2-support"><code><system_error2></code> support</h3>
|
||||
|
||||
<dl>
|
||||
<dt><code>BOOST_OUTCOME_C_DECLARE_STATUS_CODE(ident, value_type)</code>
|
||||
<dd>Declares to C a status code type with domain <code>value_type</code>
|
||||
available at the member variable <code>.value</code>. The <code>ident</code>
|
||||
must be any identifier fragment unique in this translation unit. It is
|
||||
used to uniquely identify this status code type in other macros.
|
||||
|
||||
<dt><code>BOOST_OUTCOME_C_STATUS_CODE(ident)</code>
|
||||
<dd>A reference to a previously declared status code type with unique
|
||||
<code>ident</code>.
|
||||
</dl>
|
||||
|
||||
<p>There is a high likelihood that C++ functions regularly called by C
|
||||
code will return their failures either in erased <code>system_code</code>
|
||||
or in <code>posix_code</code> (i.e. <code>errno</code> code domain). Via querying the
|
||||
returned value using <code>BOOST_OUTCOME_C_RESULT_ERROR_IS_ERRNO(r)</code>, one can determine
|
||||
if the returned code is in the <code>errno</code> code domain, and thus can be
|
||||
fed to <code>strerror()</code> and so on. Therefore there are
|
||||
convenience macro APIs for those particular use cases.</p>
|
||||
|
||||
<dl>
|
||||
<dt><code>BOOST_OUTCOME_C_DECLARE_RESULT_ERRNO(ident, T)</code>
|
||||
<dd>Declares to C a <code>basic_result<T, posix_code></code>
|
||||
type uniquely identified by <code>ident</code>.
|
||||
|
||||
<dt><code>BOOST_OUTCOME_C_RESULT_ERRNO(ident)</code>
|
||||
<dd>A reference to a previously declared <code>basic_result<T, posix_code></code>
|
||||
type with unique <code>ident</code>.
|
||||
|
||||
<dt><code>BOOST_OUTCOME_C_DECLARE_RESULT_SYSTEM(ident, T)</code>
|
||||
<dd>Declares to C a <code>basic_result<T, system_code></code>
|
||||
type uniquely identified by <code>ident</code>.
|
||||
|
||||
<dt><code>BOOST_OUTCOME_C_RESULT_SYSTEM(ident)</code>
|
||||
<dd>A reference to a previously declared <code>basic_result<T, system_code></code>
|
||||
type with unique <code>ident</code>.
|
||||
</dl>
|
||||
|
||||
|
||||
</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/c-api/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="../../reference.html"><img src="../../images/next.png" alt="Next"></a></div></body>
|
||||
</html>
|
||||
103
doc/html/experimental/differences.html
Normal 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><system_error></code> and proposed <code><system_error2></code> are
|
||||
as follows:</p>
|
||||
|
||||
<ol>
|
||||
<li><p><code>experimental::status_code<DomainType></code> can represent warnings
|
||||
and form-of-success codes as well as failure codes. <code>experimental::errored_status_code<DomainType></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’s domain implementation defines the payload type to be transported around by
|
||||
<code>experimental::status_code<DomainType></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<erased<T>></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><system_error></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<erased<intptr_t>></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’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><system_error2></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>… you can be highly confident that this is an inexact, semantic, match operation.
|
||||
The same code under <code><system_error></code> is highly ambiguous as to whether exact
|
||||
or inexact comparison is being performed (after all, all there is is “<code>code1 == code2</code>”,
|
||||
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><system_error></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><system_error2></code>, being a new design, has all-constexpr construction and
|
||||
destruction which avoids the need for static global variables, as <code><system_error></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><system_error2></code>, and thus now has similar
|
||||
characteristics in this regard.</p></li>
|
||||
|
||||
<li><p>Finally, this is a small but important difference. Under <code><system_error></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 “if there was an error?”, or “if the error code is set?”,
|
||||
or “is the error code non-zero?”. The correct answer according to the standard is the last choice, but
|
||||
a quick survey of open source <code><system_error></code> based code on github quickly
|
||||
demonstrates there is widespread confusion regarding correct usage.</p>
|
||||
|
||||
<p><code><system_error2></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, nor has been reviewed by WG21 yet</a>. It is defined to be a type whose move constructor <code>memcpy()</code>’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<T></code>, <code>std::shared_ptr<T></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: February 05, 2019 at 17:14:18 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>
|
||||
81
doc/html/experimental/map.html
Normal 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>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><system_error></code>)
|
||||
has been retained in proposed <code><system_error2></code>, so an approximate map between
|
||||
<code><system_error2></code> and <code><system_error></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><system_error></tt><th>Boost.System<th>Proposed <tt><system_error2></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>
|
||||
<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<DomainType></tt><p>
|
||||
<li><tt>const experimental::status_code<void> &</tt><p>
|
||||
<li><tt>experimental::status_code<erased<intptr_t>></tt> (aliased to <tt>experimental::system_code</tt>)<p>
|
||||
<li><tt>experimental::errored_status_code<DomainType></tt><p>
|
||||
<li><tt>const experimental::errored_status_code<void> &</tt><p>
|
||||
<li><tt>experimental::errored_status_code<erased<intptr_t>></tt> (aliased to <tt>experimental::error</tt>)
|
||||
</ul>
|
||||
<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<void> &</tt><p>
|
||||
<li><tt>experimental::status_error<DomainType></tt>
|
||||
</ul>
|
||||
</table>
|
||||
|
||||
<p>As is obvious from the above, in <code><system_error2></code> one must be much more specific and accurate
|
||||
with respect to intent and specification and desired semantics than with <code><system_error></code>. Much
|
||||
ambiguity and incorrectness which flies silently in <code><system_error></code> will
|
||||
refuse to compile in <code><system_error2></code>.</p>
|
||||
|
||||
|
||||
</div><p><small>Last revised: January 27, 2019 at 13:13:26 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>
|
||||
101
doc/html/experimental/outcome.html
Normal file
@@ -0,0 +1,101 @@
|
||||
<!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/worked-example/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.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’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"><</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">></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"><</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"><</span><span class="n">T</span><span class="p">,</span> <span class="n">E</span><span class="o">>></span><span class="p">;</span>
|
||||
</code></pre></div><a href="https://github.com/boostorg/outcome/tree/master/doc/src/snippets/experimental_status_code.cpp#L196" 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’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"><</span><span class="n">file_handle</span><span class="p">,</span> <span class="n">file_io_error</span><span class="o">></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">"r"</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"><</span><span class="kt">void</span><span class="o">></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"><</span><span class="n">file_handle</span><span class="p">,</span> <span class="n">file_io_error</span><span class="o">></span> <span class="n">r</span> <span class="o">=</span> <span class="n">open_file</span><span class="p">(</span><span class="s">"some file"</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"><</span><span class="kt">void</span><span class="o">></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">"Success!</span><span class="se">\n</span><span class="s">"</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">"Returned error has a code domain of '%s', a message of '%s'</span><span class="se">\n</span><span class="s">"</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">"</span><span class="se">\n</span><span class="s">And semantically comparing it to 'errc::no_such_file_or_directory' = %d</span><span class="se">\n</span><span class="s">"</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#L201" 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><system_error2></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’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: February 05, 2019 at 17:14:18 UTC</small></p>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../experimental/worked-example/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.html"><img src="../images/next.png" alt="Next"></a></div></body>
|
||||
</html>
|
||||
83
doc/html/experimental/status_result.html
Normal 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>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/worked-example.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<T, E, NoValuePolicy></code></a>
|
||||
|
||||
and <a href="../reference/types/basic_outcome.html" class="api-reference"><code>basic_outcome<T, EC, EP, NoValuePolicy></code></a>
|
||||
in the usual way, but
|
||||
with a defaulted <code>NoValuePolicy</code> which selects on the basis of <code>status_code<DomainType></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<></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"><</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">system_code</span><span class="o">></span>
|
||||
<span class="n">experimental</span><span class="o">::</span><span class="n">status_outcome</span><span class="o"><</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">system_code</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">></span>
|
||||
</code></pre></div>
|
||||
<p>So, the default <code>E</code> is the erased 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. <strong>Note</strong> that <code>system_code</code> may represent successes as well as failures.
|
||||
This mirrors, somewhat, how <code>std::error_code</code> can have an all bits zero defaulted
|
||||
state.</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 contract guaranteed to be a failure
|
||||
rather than an unknown success or failure – see <code>errored_status_code</code>.</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><system_error2></code> types exactly as you can the <code><system_error2></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’ll
|
||||
work exactly as you’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<erased<T>></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 “difficult”.</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: February 05, 2019 at 17:14:18 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/worked-example.html"><img src="../images/next.png" alt="Next"></a></div></body>
|
||||
</html>
|
||||
54
doc/html/experimental/worked-example.html
Normal file
@@ -0,0 +1,54 @@
|
||||
<!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 - 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/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</h1></div></div></div>
|
||||
|
||||
|
||||
<p>Here follows a 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>You may find it useful to open now in a separate browser tab the reference API
|
||||
documentation for proposed <code><system_error2></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><system_error2></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’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: January 26, 2019 at 23:38:56 UTC</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/preamble.html"><img src="../images/next.png" alt="Next"></a></div></body>
|
||||
</html>
|
||||
54
doc/html/experimental/worked-example/constructor.html
Normal file
@@ -0,0 +1,54 @@
|
||||
<!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/value_type.html"><img src="../../images/prev.png" alt="Prev"></a>
|
||||
<a accesskey="u" href="../../experimental/worked-example.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/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&format=h">https://www.random.org/cgi-bin/randbyte?nbytes=8&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&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="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">&</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#L96" 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><system_error></code> error categories. Boost.System’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: January 26, 2019 at 23:38:56 UTC</small></p>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../../experimental/worked-example/value_type.html"><img src="../../images/prev.png" alt="Prev"></a>
|
||||
<a accesskey="u" href="../../experimental/worked-example.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/string_ref.html"><img src="../../images/next.png" alt="Next"></a></div></body>
|
||||
</html>
|
||||
@@ -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/source.html"><img src="../../images/prev.png" alt="Prev"></a>
|
||||
<a accesskey="u" href="../../experimental/worked-example.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">Implicit conversion</h1></div></div></div>
|
||||
<p>Back in <a href="../../experimental/worked-example/value_type.html">The payload</a>, we
|
||||
mentioned that there was no default implicit conversion of <code>file_io_error</code>
|
||||
(<code>status_code<_file_io_error_domain></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<erased<intptr_t>>` which is a status code whose value type
|
||||
</span><span class="c1">// has been erased into an `intptr_t`. `status_code<erased<intptr_t>>`
|
||||
</span><span class="c1">// (i.e. `error`) are move relocating (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_status_code_ptr()` 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'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<erased<intptr_t>>`) is happy to implicitly construct
|
||||
</span><span class="c1"></span> <span class="c1">// from the status code returned by `make_status_code_ptr()`.
|
||||
</span><span class="c1"></span> <span class="k">return</span> <span class="n">make_status_code_ptr</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#L152" 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: January 26, 2019 at 23:38:56 UTC</small></p>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../../experimental/worked-example/source.html"><img src="../../images/prev.png" alt="Prev"></a>
|
||||
<a accesskey="u" href="../../experimental/worked-example.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>
|
||||
63
doc/html/experimental/worked-example/message.html
Normal 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>Redefining message() - 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/string_ref.html"><img src="../../images/prev.png" alt="Prev"></a>
|
||||
<a accesskey="u" href="../../experimental/worked-example.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/source.html"><img src="../../images/next.png" alt="Next"></a></div><div id="content">
|
||||
<div class="titlepage"><div><div><h1 style="clear: both">Redefining <code>message()</code></h1></div></div></div>
|
||||
<p>You may remember that our custom <code>_file_io_error_domain</code> inherits from
|
||||
<code>outcome_e::posix_code::domain_type</code>, and thus does not have to
|
||||
implement the many pure virtual functions required by <code>outcome_e::status_code_domain</code>.</p>
|
||||
|
||||
<p>What we do need to do is reimplement <code>_do_message()</code> to append the
|
||||
file and line information to the POSIX error description string
|
||||
returned by <code>outcome_e::posix_code::domain_type</code>. This causes
|
||||
the status code’s <code>.message()</code> observer to return a string
|
||||
with the extra payload information represented in text.</p>
|
||||
|
||||
<div class="code-snippet"><div class="highlight"><pre class="chroma"><code class="language-c++" data-lang="c++"> <span class="c1">// Return a string describing a specific code. We will return the
|
||||
</span><span class="c1"></span> <span class="c1">// string returned by our POSIX code base domain, with the source
|
||||
</span><span class="c1"></span> <span class="c1">// file and line number appended
|
||||
</span><span class="c1"></span> <span class="k">virtual</span> <span class="n">_base</span><span class="o">::</span><span class="n">string_ref</span> <span class="n">_do_message</span><span class="p">(</span><span class="k">const</span> <span class="n">outcome_e</span><span class="o">::</span><span class="n">status_code</span><span class="o"><</span><span class="kt">void</span><span class="o">></span> <span class="o">&</span><span class="n">code</span><span class="p">)</span> <span class="k">const</span> <span class="k">noexcept</span> <span class="k">override</span> <span class="k">final</span> <span class="c1">// NOLINT
|
||||
</span><span class="c1"></span> <span class="p">{</span>
|
||||
<span class="n">assert</span><span class="p">(</span><span class="n">code</span><span class="p">.</span><span class="n">domain</span><span class="p">()</span> <span class="o">==</span> <span class="o">*</span><span class="k">this</span><span class="p">);</span>
|
||||
|
||||
<span class="c1">// Fetch message from base domain (POSIX)
|
||||
</span><span class="c1"></span> <span class="k">auto</span> <span class="n">msg</span> <span class="o">=</span> <span class="n">_base</span><span class="o">::</span><span class="n">_do_message</span><span class="p">(</span><span class="n">code</span><span class="p">);</span>
|
||||
<span class="k">const</span> <span class="k">auto</span> <span class="o">&</span><span class="n">c1</span> <span class="o">=</span> <span class="k">static_cast</span><span class="o"><</span><span class="k">const</span> <span class="n">file_io_error</span> <span class="o">&></span><span class="p">(</span><span class="n">code</span><span class="p">);</span> <span class="c1">// NOLINT
|
||||
</span><span class="c1"></span> <span class="k">const</span> <span class="n">value_type</span> <span class="o">&</span><span class="n">v</span> <span class="o">=</span> <span class="n">c1</span><span class="p">.</span><span class="n">value</span><span class="p">();</span>
|
||||
|
||||
<span class="c1">// Append my source file and line number
|
||||
</span><span class="c1"></span> <span class="k">if</span><span class="p">(</span><span class="n">v</span><span class="p">.</span><span class="n">file</span> <span class="o">==</span> <span class="k">nullptr</span><span class="p">)</span>
|
||||
<span class="p">{</span>
|
||||
<span class="k">return</span> <span class="n">msg</span><span class="p">;</span>
|
||||
<span class="p">}</span>
|
||||
<span class="n">size_t</span> <span class="n">length</span> <span class="o">=</span> <span class="n">strlen</span><span class="p">(</span><span class="n">v</span><span class="p">.</span><span class="n">file</span><span class="p">)</span> <span class="o">+</span> <span class="mi">16</span> <span class="o">+</span> <span class="n">msg</span><span class="p">.</span><span class="n">size</span><span class="p">();</span>
|
||||
<span class="k">auto</span> <span class="o">*</span><span class="n">p</span> <span class="o">=</span> <span class="k">static_cast</span><span class="o"><</span><span class="kt">char</span> <span class="o">*></span><span class="p">(</span><span class="n">malloc</span><span class="p">(</span><span class="n">length</span><span class="p">));</span> <span class="c1">// NOLINT
|
||||
</span><span class="c1"></span> <span class="k">if</span><span class="p">(</span><span class="n">p</span> <span class="o">==</span> <span class="k">nullptr</span><span class="p">)</span>
|
||||
<span class="p">{</span>
|
||||
<span class="k">return</span> <span class="n">_base</span><span class="o">::</span><span class="n">string_ref</span><span class="p">(</span><span class="s">"failed to get message from system"</span><span class="p">);</span>
|
||||
<span class="p">}</span>
|
||||
<span class="n">sprintf</span><span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="s">"%s (%s:%d)"</span><span class="p">,</span> <span class="n">msg</span><span class="p">.</span><span class="n">data</span><span class="p">(),</span> <span class="n">v</span><span class="p">.</span><span class="n">file</span><span class="p">,</span> <span class="n">v</span><span class="p">.</span><span class="n">lineno</span><span class="p">);</span>
|
||||
|
||||
<span class="c1">// Return as atomically reference counted string
|
||||
</span><span class="c1"></span> <span class="k">return</span> <span class="n">_base</span><span class="o">::</span><span class="n">atomic_refcounted_string_ref</span><span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="n">length</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#L111" class="code-snippet-url" target="_blank">View this code on Github</a></div>
|
||||
|
||||
|
||||
|
||||
</div><p><small>Last revised: January 26, 2019 at 23:38:56 UTC</small></p>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../../experimental/worked-example/string_ref.html"><img src="../../images/prev.png" alt="Prev"></a>
|
||||
<a accesskey="u" href="../../experimental/worked-example.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/source.html"><img src="../../images/next.png" alt="Next"></a></div></body>
|
||||
</html>
|
||||
54
doc/html/experimental/worked-example/preamble.html
Normal file
@@ -0,0 +1,54 @@
|
||||
<!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>Define a custom code domain - 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.html"><img src="../../images/prev.png" alt="Prev"></a>
|
||||
<a accesskey="u" href="../../experimental/worked-example.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/value_type.html"><img src="../../images/next.png" alt="Next"></a></div><div id="content">
|
||||
<div class="titlepage"><div><div><h1 style="clear: both">Define a custom code domain</h1></div></div></div>
|
||||
<p>Firstly let’s alias the experimental Outcome namespace into something
|
||||
less tedious to type, declare our custom status code type, and get
|
||||
started on defining the custom status code domain implementation.</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">// To define a `file_io_error` which participates in the P1028 world
|
||||
</span><span class="c1">// of `std::error`, we must first declare, then define, a custom code
|
||||
</span><span class="c1">// domain which extends `posix_code` (the std error coding for POSIX
|
||||
</span><span class="c1">// failures). The following is fairly standard boilerplate for defining
|
||||
</span><span class="c1">// a custom code domain. It is analogous to defining a custom `std::error_category`.
|
||||
</span><span class="c1"></span>
|
||||
<span class="k">class</span><span class="err"> </span><span class="nc">_file_io_error_domain</span><span class="p">;</span>
|
||||
<span class="c1">// We define `file_io_error` to be the status code whose domain is `_file_io_error_domain`.
|
||||
</span><span class="c1"></span><span class="k">using</span> <span class="n">file_io_error</span> <span class="o">=</span> <span class="n">outcome_e</span><span class="o">::</span><span class="n">status_code</span><span class="o"><</span><span class="n">_file_io_error_domain</span><span class="o">></span><span class="p">;</span>
|
||||
|
||||
<span class="c1">// Now we define `_file_io_error_domain`.
|
||||
</span><span class="c1"></span><span class="k">class</span><span class="err"> </span><span class="nc">_file_io_error_domain</span> <span class="o">:</span> <span class="k">public</span> <span class="n">outcome_e</span><span class="o">::</span><span class="n">posix_code</span><span class="o">::</span><span class="n">domain_type</span>
|
||||
<span class="p">{</span>
|
||||
<span class="k">using</span> <span class="n">_base</span> <span class="o">=</span> <span class="k">typename</span> <span class="n">outcome_e</span><span class="o">::</span><span class="n">posix_code</span><span class="o">::</span><span class="n">domain_type</span><span class="p">;</span>
|
||||
</code></pre></div><a href="https://github.com/boostorg/outcome/tree/master/doc/src/snippets/experimental_status_code.cpp#L65" class="code-snippet-url" target="_blank">View this code on Github</a></div>
|
||||
|
||||
|
||||
<p>Note that we inherit from <code>outcome_e::posix_code::domain_type</code>, not
|
||||
from <code>outcome_e::status_code_domain</code>. We thus reuse most of the
|
||||
implementation of <code>outcome_e::posix_code::domain_type</code> rather than
|
||||
implementing required functionality. If you would like to see a
|
||||
fuller treatment of defining a custom status code domain from
|
||||
scratch, see <a href="https://github.com/ned14/status-code/blob/master/doc/custom_domain_worked_example.md">this worked example here</a>.</p>
|
||||
|
||||
<p><a href="https://ned14.github.io/status-code/doc_status_code_domain.html#standardese-system_error2__status_code_domain">You may find looking at the API reference documentation for <code>status_code_domain</code>
|
||||
useful in the next few pages </a>.</p>
|
||||
|
||||
|
||||
</div><p><small>Last revised: January 26, 2019 at 23:38:56 UTC</small></p>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../../experimental/worked-example.html"><img src="../../images/prev.png" alt="Prev"></a>
|
||||
<a accesskey="u" href="../../experimental/worked-example.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/value_type.html"><img src="../../images/next.png" alt="Next"></a></div></body>
|
||||
</html>
|
||||
37
doc/html/experimental/worked-example/source.html
Normal file
@@ -0,0 +1,37 @@
|
||||
<!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>Constexpr domain source - 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/message.html"><img src="../../images/prev.png" alt="Prev"></a>
|
||||
<a accesskey="u" href="../../experimental/worked-example.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/implicit_conversion.html"><img src="../../images/next.png" alt="Next"></a></div><div id="content">
|
||||
<div class="titlepage"><div><div><h1 style="clear: both">Constexpr domain source</h1></div></div></div>
|
||||
<p>Back in <a href="../../experimental/worked-example/constructor.html">The constructor</a>, we
|
||||
declared but did not implement a <code>.get()</code> function which returns a constexpr static
|
||||
instance of the domain. We implement this now:</p>
|
||||
|
||||
<div class="code-snippet"><div class="highlight"><pre class="chroma"><code class="language-c++" data-lang="c++"><span class="c1">// 100% constexpr instantiation
|
||||
</span><span class="c1"></span><span class="k">constexpr</span> <span class="n">_file_io_error_domain</span> <span class="n">file_io_error_domain</span><span class="p">;</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">&</span><span class="n">_file_io_error_domain</span><span class="o">::</span><span class="n">get</span><span class="p">()</span>
|
||||
<span class="p">{</span>
|
||||
<span class="k">return</span> <span class="n">file_io_error_domain</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#L142" class="code-snippet-url" target="_blank">View this code on Github</a></div>
|
||||
|
||||
|
||||
<p>As this is 100% constexpr, it can be (and is under optimisation) implemented entirely
|
||||
in the mind of the compiler with no run time representation.</p>
|
||||
|
||||
|
||||
</div><p><small>Last revised: January 26, 2019 at 23:38:56 UTC</small></p>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../../experimental/worked-example/message.html"><img src="../../images/prev.png" alt="Prev"></a>
|
||||
<a accesskey="u" href="../../experimental/worked-example.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/implicit_conversion.html"><img src="../../images/next.png" alt="Next"></a></div></body>
|
||||
</html>
|
||||
51
doc/html/experimental/worked-example/string_ref.html
Normal 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>String refs - 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/constructor.html"><img src="../../images/prev.png" alt="Prev"></a>
|
||||
<a accesskey="u" href="../../experimental/worked-example.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/message.html"><img src="../../images/next.png" alt="Next"></a></div><div id="content">
|
||||
<div class="titlepage"><div><div><h1 style="clear: both">String refs</h1></div></div></div>
|
||||
<p><code><system_error2></code> does not use <code>std::string</code> to return possibly statically
|
||||
or dynamically allocated strings, and thus avoids dragging in a lot of the
|
||||
standard library which impacts build times.</p>
|
||||
|
||||
<p>Instead status code domains have a <a href="https://ned14.github.io/status-code/doc_status_code_domain.html#standardese-system_error2__status_code_domain__string_ref"><code>string_ref</code></a>,
|
||||
which has a polymorphic implementation which may or may not <a href="https://ned14.github.io/status-code/doc_status_code_domain.html#standardese-system_error2__status_code_domain__atomic_refcounted_string_ref">manage a dynamic
|
||||
memory allocation using an atomic reference counter</a>. Due to this polymorphism, you don’t
|
||||
need to worry which implementation is actually in use under the bonnet
|
||||
when you pass around <code>string_ref</code> instances.</p>
|
||||
|
||||
<p><code>string_ref</code> provides the same member functions as a <code>span<const char></code>,
|
||||
and so participates ordinarily in STL algorithms and containers. In
|
||||
particular, if you need to string search or slice it, you can construct a
|
||||
<code>string_view</code> on top easily.</p>
|
||||
|
||||
<div class="code-snippet"><div class="highlight"><pre class="chroma"><code class="language-c++" data-lang="c++"> <span class="c1">// Return the name of our custom code domain
|
||||
</span><span class="c1"></span> <span class="k">virtual</span> <span class="n">_base</span><span class="o">::</span><span class="n">string_ref</span> <span class="n">name</span><span class="p">()</span> <span class="k">const</span> <span class="k">noexcept</span> <span class="k">override</span> <span class="k">final</span> <span class="c1">// NOLINT
|
||||
</span><span class="c1"></span> <span class="p">{</span>
|
||||
<span class="k">static</span> <span class="n">string_ref</span> <span class="n">v</span><span class="p">(</span><span class="s">"file i/o error domain"</span><span class="p">);</span>
|
||||
<span class="k">return</span> <span class="n">v</span><span class="p">;</span> <span class="c1">// NOLINT
|
||||
</span><span class="c1"></span> <span class="p">}</span>
|
||||
</code></pre></div><a href="https://github.com/boostorg/outcome/tree/master/doc/src/snippets/experimental_status_code.cpp#L103" class="code-snippet-url" target="_blank">View this code on Github</a></div>
|
||||
|
||||
|
||||
<p>Now you understand what <code>string_ref</code> does, returning the name of the
|
||||
status code domain is self describing. Note we use the non-managing
|
||||
constructor of <code>string_ref</code>, as the string <code>"file i/o error domain"</code>
|
||||
is statically stored. We cache the returned value locally in static
|
||||
storage.</p>
|
||||
|
||||
|
||||
</div><p><small>Last revised: January 26, 2019 at 23:38:56 UTC</small></p>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../../experimental/worked-example/constructor.html"><img src="../../images/prev.png" alt="Prev"></a>
|
||||
<a accesskey="u" href="../../experimental/worked-example.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/message.html"><img src="../../images/next.png" alt="Next"></a></div></body>
|
||||
</html>
|
||||
47
doc/html/experimental/worked-example/value_type.html
Normal 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>The payload - 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/preamble.html"><img src="../../images/prev.png" alt="Prev"></a>
|
||||
<a accesskey="u" href="../../experimental/worked-example.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/constructor.html"><img src="../../images/next.png" alt="Next"></a></div><div id="content">
|
||||
<div class="titlepage"><div><div><h1 style="clear: both">The payload</h1></div></div></div>
|
||||
<p>We define the code domain’s <code>value_type</code> – the payload to be transported by
|
||||
status codes using this code domain – to be a POSIX <code>errno</code> value, an integer
|
||||
line number and a const char pointer.</p>
|
||||
|
||||
<div class="code-snippet"><div class="highlight"><pre class="chroma"><code class="language-c++" data-lang="c++"><span class="k">public</span><span class="o">:</span>
|
||||
<span class="c1">// This is the value type for `file_io_error`. We add line number and source file path.
|
||||
</span><span class="c1"></span> <span class="k">struct</span> <span class="n">value_type</span>
|
||||
<span class="p">{</span>
|
||||
<span class="k">typename</span> <span class="n">outcome_e</span><span class="o">::</span><span class="n">posix_code</span><span class="o">::</span><span class="n">value_type</span> <span class="n">errcode</span><span class="p">;</span> <span class="c1">// from POSIX, as we inherit from _posix_code_domain
|
||||
</span><span class="c1"></span>
|
||||
<span class="c1">// Our additional payload
|
||||
</span><span class="c1"></span> <span class="kt">int</span> <span class="n">lineno</span><span class="p">;</span> <span class="c1">// from __LINE__
|
||||
</span><span class="c1"></span> <span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">file</span><span class="p">;</span> <span class="c1">// from __FILE__
|
||||
</span><span class="c1"></span> <span class="c1">// Could also place a backtrace of void *[16] here ...
|
||||
</span><span class="c1"></span> <span class="p">};</span>
|
||||
</code></pre></div><a href="https://github.com/boostorg/outcome/tree/master/doc/src/snippets/experimental_status_code.cpp#L83" class="code-snippet-url" target="_blank">View this code on Github</a></div>
|
||||
|
||||
|
||||
<p>You will note that this is a <code>TriviallyCopyable</code> type, and so gains an implicit
|
||||
conversion to any <code>status_code<erased<T>></code> where <code>sizeof(T) >= sizeof(value_type)</code>.</p>
|
||||
|
||||
<p><code>error</code> is however <code>status_code<erased<intptr_t>></code>, and <code>sizeof(intptr_t) < sizeof(value_type)</code>,
|
||||
so it is not possible to implicitly convert status codes from this domain into
|
||||
<code>error</code>. Instead, you must tell the compiler how to do the conversion, as we
|
||||
shall see later.</p>
|
||||
|
||||
|
||||
</div><p><small>Last revised: January 26, 2019 at 23:38:56 UTC</small></p>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../../experimental/worked-example/preamble.html"><img src="../../images/prev.png" alt="Prev"></a>
|
||||
<a accesskey="u" href="../../experimental/worked-example.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/constructor.html"><img src="../../images/next.png" alt="Next"></a></div></body>
|
||||
</html>
|
||||
692
doc/html/faq.html
Normal file
@@ -0,0 +1,692 @@
|
||||
<!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>Frequently asked questions - Boost.Outcome documentation</title>
|
||||
<link rel="stylesheet" href="./css/boost.css" type="text/css">
|
||||
<meta name="generator" content="Hugo 0.52 with Boostdoc theme">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0"/>
|
||||
|
||||
<link rel="icon" href="./images/favicon.ico" type="image/ico"/>
|
||||
<body><div class="spirit-nav">
|
||||
<a accesskey="p" href="./reference/functions/try_throw_std_exception_from_error.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="./videos.html"><img src="./images/next.png" alt="Next"></a></div><div id="content">
|
||||
|
||||
<div class="titlepage"><div><div><h1 style="clear: both">Frequently asked questions</h1></div></div></div>
|
||||
<div class="toc"><dl class="toc">
|
||||
<dt>
|
||||
<dd><dl>
|
||||
<dt><a href="#is-outcome-safe-to-use-in-extern-apis">Is Outcome safe to use in extern APIs?</a></dt>
|
||||
<dt><a href="#does-outcome-implement-over-alignment">Does Outcome implement over-alignment?</a></dt>
|
||||
<dt><a href="#does-outcome-implement-the-no-fail-strong-or-basic-exception-guarantee">Does Outcome implement the no-fail, strong or basic exception guarantee?</a></dt>
|
||||
<dt><a href="#does-outcome-have-a-stable-abi-and-api">Does Outcome have a stable ABI and API?</a></dt>
|
||||
<dt><a href="#can-i-use-result-t-ec-across-dll-shared-object-boundaries">Can I use <code>result<T, EC></code> across DLL/shared object boundaries?</a></dt>
|
||||
<dt><a href="#why-two-types-result-and-outcome-rather-than-just-one">Why two types <code>result<></code> and <code>outcome<></code>, rather than just one?</a></dt>
|
||||
<dt><a href="#how-badly-will-including-outcome-in-my-public-interface-affect-compile-times">How badly will including Outcome in my public interface affect compile times?</a></dt>
|
||||
<dt><a href="#is-outcome-suitable-for-fixed-latency-predictable-execution-coding-such-as-for-high-frequency-trading-or-audio">Is Outcome suitable for fixed latency/predictable execution coding such as for high frequency trading or audio?</a></dt>
|
||||
<dt><a href="#what-kind-of-runtime-performance-impact-will-using-outcome-in-my-code-introduce">What kind of runtime performance impact will using Outcome in my code introduce?</a>
|
||||
<dd><dl>
|
||||
<dt><a href="#high-end-cpu-intel-skylake-x64">High end CPU: Intel Skylake x64</a></dt>
|
||||
<dt><a href="#mid-tier-cpu-arm-cortex-a72">Mid tier CPU: ARM Cortex A72</a></dt>
|
||||
<dt><a href="#low-end-cpus-intel-silvermont-x64-and-arm-cortex-a53">Low end CPUs: Intel Silvermont x64 and ARM Cortex A53</a></dt>
|
||||
</dl></dd></dt>
|
||||
<dt><a href="#why-is-implicit-default-construction-disabled">Why is implicit default construction disabled?</a></dt>
|
||||
<dt><a href="#how-far-away-from-the-proposed-std-expected-t-e-is-outcome-s-checked-t-e">How far away from the proposed <code>std::expected<T, E></code> is Outcome’s <code>checked<T, E></code>?</a></dt>
|
||||
<dt><a href="#why-doesn-t-outcome-duplicate-std-expected-t-e-s-design">Why doesn’t Outcome duplicate <code>std::expected<T, E></code>’s design?</a></dt>
|
||||
<dt><a href="#is-outcome-riddled-with-undefined-behaviour-for-const-const-containing-and-reference-containing-types">Is Outcome riddled with undefined behaviour for const, const-containing and reference-containing types?</a>
|
||||
<dd><dl>
|
||||
<dt><a href="#brief-history-of-c-standard-changes">Brief history of C++ standard changes</a></dt>
|
||||
<dt><a href="#summary">Summary</a></dt>
|
||||
</dl></dd></dt>
|
||||
</dl></dd></dt>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<h2 id="is-outcome-safe-to-use-in-extern-apis">Is Outcome safe to use in extern APIs?</h2>
|
||||
|
||||
<p>Outcome is specifically designed for use in the public interfaces of multi-million
|
||||
line codebases. <code>result</code>’s layout is hard coded to:</p>
|
||||
<div class="highlight"><pre class="chroma"><code class="language-c" data-lang="c"><span class="k">struct</span>
|
||||
<span class="p">{</span>
|
||||
<span class="n">T</span> <span class="n">value</span><span class="p">;</span>
|
||||
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">flags</span><span class="p">;</span>
|
||||
<span class="n">EC</span> <span class="n">error</span><span class="p">;</span>
|
||||
<span class="p">};</span></code></pre></div>
|
||||
<p>This is C-compatible if <code>T</code> and <code>EC</code> are C-compatible.
|
||||
<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</code></a>
|
||||
|
||||
is <em>probably</em> C-compatible, but its layout is not standardised (though there is a
|
||||
normative note in the standard about its layout). Hence Outcome cannot provide a
|
||||
C macro API for standard Outcome, but we can for <a href="./experimental/c-api.html">Experimental Outcome</a>.</p>
|
||||
|
||||
<h2 id="does-outcome-implement-over-alignment">Does Outcome implement over-alignment?</h2>
|
||||
|
||||
<p>Variant-based alternatives to Outcome such as
|
||||
<a href="https://wg21.link/P0323" class="api-reference" target="_blank"><i class="fa fa-book" aria-hidden="true"></i> P0323 <code>std::expected<T, E></code></a>
|
||||
|
||||
would use <code>std::aligned_union</code> to ensure appropriate over-alignment for the storage of
|
||||
either a <code>T</code> or an <code>E</code>. This discovers the over-alignment for a type using
|
||||
<code>std::alignment_of</code>, which is defaulted to <code>alignof()</code>.</p>
|
||||
|
||||
<p>Outcome uses <code>struct</code>-based storage, as described above. Any over-alignment of
|
||||
<code>result</code> or <code>outcome</code> will follow the ordinary alignment and padding rules for
|
||||
<code>struct</code> on your compiler. Traits such as <code>std::alignment_of</code>, or other standard
|
||||
library facilities, are not used.</p>
|
||||
|
||||
<h2 id="does-outcome-implement-the-no-fail-strong-or-basic-exception-guarantee">Does Outcome implement the no-fail, strong or basic exception guarantee?</h2>
|
||||
|
||||
<p>(<a href="https://en.cppreference.com/w/cpp/language/exceptions#Exception_safety">You can read about the meaning of these guarantees at cppreference.com</a>)</p>
|
||||
|
||||
<p>If for the following operations:</p>
|
||||
|
||||
<ul>
|
||||
<li>Construction</li>
|
||||
<li>Assignment</li>
|
||||
<li>Swap</li>
|
||||
</ul>
|
||||
|
||||
<p>… the corresponding operation in <strong>all</strong> of <code>value_type</code>, <code>error_type</code> (and
|
||||
<code>exception_type</code> for <code>outcome</code>) is <code>noexcept(true)</code>, then <code>result</code> and
|
||||
<code>outcome</code>’s operation is <code>noexcept(true)</code>. This propagates the no-fail exception
|
||||
guarantee of the underlying types. Otherwise the basic guarantee applies for all
|
||||
but Swap, under the same rules as for the <code>struct</code> layout type given above e.g.
|
||||
value would be constructed first, then the flags, then the error. If the error
|
||||
throws, value and status bits would be as if the failure had not occurred, same
|
||||
as for aborting the construction of any <code>struct</code> type.</p>
|
||||
|
||||
<p>It is recognised that these weak guarantees may be unsuitable for some people,
|
||||
so Outcome implements <code>swap()</code> with much stronger guarantees, as one can locally refine,
|
||||
without too much work, one’s own custom classes from <code>result</code> and <code>outcome</code> implementing
|
||||
stronger guarantees for construction and assignment using <code>swap()</code> as the primitive
|
||||
building block.</p>
|
||||
|
||||
<p>The core ADL discovered implementation of strong guarantee swap is <a href="./reference/functions/strong_swap.html" class="api-reference"><code>strong_swap(bool &all_good, T &a, T &b)</code></a>
|
||||
.
|
||||
This can be overloaded by third party code with custom strong guarantee swap
|
||||
implementations, same as for <code>std::swap()</code>. Because strong guarantee swap may fail
|
||||
when trying to restore input state during handling of failure to swap, the
|
||||
<code>all_good</code> boolean becomes false if restoration fails, at which point both
|
||||
results/outcomes get marked as tainted via <a href="./reference/types/basic_result/has_lost_consistency.html" class="api-reference"><code>has_lost_consistency()</code></a>
|
||||
.</p>
|
||||
|
||||
<p>It is <strong>up to you</strong> to check this flag to see if known good state has been lost,
|
||||
as Outcome never does so on your behalf. The simple solution to avoiding having
|
||||
to deal with this situation is to always choose your value, error and exception
|
||||
types to have non-throwing move constructors and move assignments. This causes
|
||||
the strong swap implementation to no longer be used, as it is no longer required,
|
||||
and standard swap is used instead.</p>
|
||||
|
||||
<h2 id="does-outcome-have-a-stable-abi-and-api">Does Outcome have a stable ABI and API?</h2>
|
||||
|
||||
<p>Right now, no. Though the data layout shown above is not expected to change.</p>
|
||||
|
||||
<p>Outcome’s ABI and API will be formally fixed as <strong>the</strong> v2 interface approximately
|
||||
one year after its first Boost release. Thereafter the
|
||||
<a href="https://lvc.github.io/abi-compliance-checker/">ABI compliance checker</a>
|
||||
will be run per-commit to ensure Outcome’s ABI and API remains stable.</p>
|
||||
|
||||
<p>Note that the stable ABI and API guarantee will only apply to standalone
|
||||
Outcome, not to Boost.Outcome. Boost.Outcome has dependencies on other
|
||||
parts of Boost which are not stable across releases.</p>
|
||||
|
||||
<p>Note also that the types you configure a <code>result</code> or <code>outcome</code> with also need
|
||||
to be ABI stable if <code>result</code> or <code>outcome</code> is to be ABI stable.</p>
|
||||
|
||||
<h2 id="can-i-use-result-t-ec-across-dll-shared-object-boundaries">Can I use <code>result<T, EC></code> across DLL/shared object boundaries?</h2>
|
||||
|
||||
<p>A known problem with using DLLs (and to smaller extent shared libraries) is that global
|
||||
objects may get duplicated: one instance in the executable and one in the DLL. This
|
||||
behaviour is not incorrect according to the C++ Standard, as the Standard does not
|
||||
recognize the existence of DLLs or shared libraries. Therefore, program designs that
|
||||
depend on globals having unique addresses may become compromised when used in a program
|
||||
using DLLs.</p>
|
||||
|
||||
<p>Nothing in Outcome depends on the addresses of globals, plus the guaranteed fixed data
|
||||
layout (see answer above) means that different versions of Outcome can be used in
|
||||
different DLLs, and it probably will work okay (it is still not advised that you do that
|
||||
as that is an ODR violation).
|
||||
However, one of the most likely candidate for <code>EC</code> – <code>std::error_code</code> – does depend
|
||||
on the addresses of globals for correct functioning.</p>
|
||||
|
||||
<p>The standard library is required to implement globally unique addresses for the standard library
|
||||
provided
|
||||
<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>
|
||||
implementations e.g. <code>std::system_category()</code>.
|
||||
User defined error code categories may <strong>not</strong> have unique global addresses, and thus
|
||||
introduce misoperation.</p>
|
||||
|
||||
<p><code>boost::system::error_code</code>, since version 1.69 does offer an <em>opt-in</em> guarantee
|
||||
that it does not depend on the addresses of globals <strong>if</strong> the user defined error code
|
||||
category <em>opts-in</em> to the 64-bit comparison mechanism. This can be seen in the specification of
|
||||
<code>error_category::operator==</code> in
|
||||
<a href="https://www.boost.org/doc/libs/1_69_0/libs/system/doc/html/system.html#ref_synopsis">Boost.System synopsis</a>.</p>
|
||||
|
||||
<p>Alternatively, the <code>status_code</code> in <a href="(/experimental/differences.html)">Experimental Outcome</a>,
|
||||
due to its more modern design, does not suffer from any problems from being used in shared
|
||||
libraries in any configuration.</p>
|
||||
|
||||
<h2 id="why-two-types-result-and-outcome-rather-than-just-one">Why two types <code>result<></code> and <code>outcome<></code>, rather than just one?</h2>
|
||||
|
||||
<p><code>result</code> is the simple, success OR failure type.</p>
|
||||
|
||||
<p><code>outcome</code> extends <code>result</code> with a third state to transport, conventionally (but not necessarily) some sort of “abort” or “exceptional” state which a function can return to indicate that not only did the operation fail, but it did so <em>catastrophically</em> i.e. please abort any attempt to retry the operation.</p>
|
||||
|
||||
<p>A perfect alternative to using <code>outcome</code> is to throw a C++ exception for the abort code path, and indeed most programs ought to do exactly that instead of using <code>outcome</code>. However there are a number of use cases where choosing <code>outcome</code> shines:</p>
|
||||
|
||||
<ol>
|
||||
<li>Where C++ exceptions or RTTI is not available, but the ability to fail catastrophically without terminating the program is important.</li>
|
||||
<li>Where deterministic behaviour is required even in the catastrophic failure situation.</li>
|
||||
<li>In unit test suites of code using Outcome it is extremely convenient to accumulate test failures into an <code>outcome</code> for later reporting. A similar convenience applies to RPC situations, where C++ exception throws need to be accumulated for reporting back to the initiating endpoint.</li>
|
||||
<li>Where a function is “dual use deterministic” i.e. it can be used deterministically, in which case one switches control flow based on <code>.error()</code>, or it can be used non-deterministically by throwing an exception perhaps carrying a custom payload.</li>
|
||||
</ol>
|
||||
|
||||
<h2 id="how-badly-will-including-outcome-in-my-public-interface-affect-compile-times">How badly will including Outcome in my public interface affect compile times?</h2>
|
||||
|
||||
<p>The quick answer is that it depends on how much convenience you want.</p>
|
||||
|
||||
<p>The convenience header <code><result.hpp></code> is dependent on <code><system_error></code> or Boost.System, which unfortunately includes <code><string></code> and thus
|
||||
drags in quite a lot of other slow-to-parse stuff. If your public interface already includes <code><string></code>,
|
||||
then the impact of additionally including Outcome will be low. If you do not include <code><string></code>,
|
||||
unfortunately impact may be relatively quite high, depending on the total impact of your
|
||||
public interface files.</p>
|
||||
|
||||
<p>If you’ve been extremely careful to avoid ever including the most of the STL headers
|
||||
into your interfaces in order to maximise build performance, then <code><basic_result.hpp></code>
|
||||
can have as few dependencies as:</p>
|
||||
|
||||
<ol>
|
||||
<li><code><cstdint></code></li>
|
||||
<li><code><initializer_list></code></li>
|
||||
<li><code><iosfwd></code></li>
|
||||
<li><code><new></code></li>
|
||||
<li><code><type_traits></code></li>
|
||||
<li><code><cstdio></code></li>
|
||||
<li><code><cstdlib></code></li>
|
||||
<li><code><cassert></code></li>
|
||||
</ol>
|
||||
|
||||
<p>These, apart from <code><iosfwd></code>, tend to be very low build time impact in most standard
|
||||
library implementations. If you include only <code><basic_result.hpp></code>, and manually configure
|
||||
<code>basic_result<></code> by hand, compile time impact will be minimised.</p>
|
||||
|
||||
<p>(See reference documentation for <a href="./reference/types/basic_result.html" class="api-reference"><code>basic_result<T, E, NoValuePolicy></code></a>
|
||||
for more detail.</p>
|
||||
|
||||
<h2 id="is-outcome-suitable-for-fixed-latency-predictable-execution-coding-such-as-for-high-frequency-trading-or-audio">Is Outcome suitable for fixed latency/predictable execution coding such as for high frequency trading or audio?</h2>
|
||||
|
||||
<p>Great care has been taken to ensure that Outcome never unexpectedly executes anything
|
||||
with unbounded execution times such as <code>malloc()</code>, <code>dynamic_cast<>()</code> or <code>throw</code>.
|
||||
Outcome works perfectly with C++ exceptions and RTTI globally disabled.</p>
|
||||
|
||||
<p>Outcome’s entire design premise is that its users are happy to exchange a small, predictable constant overhead
|
||||
during successful code paths, in exchange for predictable failure code paths.</p>
|
||||
|
||||
<p>In contrast, table-based exception handling gives zero run time overhead for the
|
||||
successful code path, and completely unpredictable (and very expensive) overhead
|
||||
for failure code paths.</p>
|
||||
|
||||
<p>For code where predictability of execution, no matter the code path, is paramount,
|
||||
writing all your code to use Outcome is not a bad place to start. Obviously enough,
|
||||
do choose a non-throwing policy when configuring <code>outcome</code> or <code>result</code> such as
|
||||
<a href="./reference/policies/all_narrow.html" class="api-reference"><code>all_narrow</code></a>
|
||||
to guarantee that exceptions can never be thrown by Outcome
|
||||
(or use the convenience typedef for <code>result</code>, <a href="./reference/aliases/unchecked.html" class="api-reference"><code>unchecked<T, E = varies></code></a>
|
||||
which uses <code>policy::all_narrow</code>).</p>
|
||||
|
||||
<h2 id="what-kind-of-runtime-performance-impact-will-using-outcome-in-my-code-introduce">What kind of runtime performance impact will using Outcome in my code introduce?</h2>
|
||||
|
||||
<p>It is very hard to say anything definitive about performance impacts in codebases one
|
||||
has never seen. Each codebase is unique. However to come up with some form of measure,
|
||||
we timed traversing ten stack frames via each of the main mechanisms, including the
|
||||
“do nothing” (null) case.</p>
|
||||
|
||||
<p>A stack frame is defined to be something called by the compiler whilst
|
||||
unwinding the stack between the point of return in the ultimate callee and the base
|
||||
caller, so for example ten stack allocated objects might be destructed, or ten levels
|
||||
of stack depth might be unwound. This is not a particularly realistic test, but it
|
||||
should at least give one an idea of the performance impact of returning Outcome’s
|
||||
<code>result</code> or <code>outcome</code> over say returning a plain integer, or throwing an exception.</p>
|
||||
|
||||
<h3 id="high-end-cpu-intel-skylake-x64">High end CPU: Intel Skylake x64</h3>
|
||||
|
||||
<p>This is a high end CPU with very significant ability to cache, predict, parallelise
|
||||
and execute out-of-order such that tight, repeated loops perform very well. It has
|
||||
a large μop cache able to wholly contain the test loop, meaning that these results
|
||||
are a <strong>best case</strong> performance.</p>
|
||||
|
||||
<figure>
|
||||
<img src="./faq/results_skylake_log.png"/> <figcaption>
|
||||
<h4>Log graph comparing GCC 7.4, clang 8.0 and Visual Studio 2017.9 on x64, for exceptions-globally-disabled, ordinary and link-time-optimised build configurations.</h4>
|
||||
</figcaption>
|
||||
</figure>
|
||||
|
||||
<p>As you can see, throwing and catching an exception is
|
||||
expensive on table-based exception handling implementations such as these, anywhere
|
||||
between 26,000 and 43,000 CPU cycles. And this is the <em>hot path</em> situation, this
|
||||
benchmark is a loop around hot cached code. If the tables are paged out onto storage,
|
||||
you are talking about <strong>millions</strong> of CPU cycles.</p>
|
||||
|
||||
<p>Simple integer returns (i.e. do nothing null case)
|
||||
are always going to be the fastest as they do the least work, and that costs 80 to 90
|
||||
CPU cycles on this Intel Skylake CPU.</p>
|
||||
|
||||
<p>Note that returning a <code>result<int, std::error_code></code> with a “success (error code)”
|
||||
is no more than 5% added runtime overhead over returning a naked int on GCC and clang. On MSVC
|
||||
it costs an extra 20% or so, mainly due to poor code optimisation in the VS2017.9 compiler. Note that “success
|
||||
(experimental status code)” optimises much better, and has almost no overhead over a
|
||||
naked int.</p>
|
||||
|
||||
<p>Returning a <code>result<int, std::error_code></code> with a “failure (error code)”
|
||||
is less than 5% runtime overhead over returning a success on GCC, clang and MSVC.</p>
|
||||
|
||||
<p>You might wonder what happens if type <code>E</code> has a non-trivial destructor, thus making the
|
||||
<code>result<T, E></code> have a non-trivial destructor? We tested <code>E = std::exception_ptr</code> and
|
||||
found less than a 5% overhead to <code>E = std::error_code</code> for returning success. Returning a failure
|
||||
was obviously much slower at anywhere between 300 and 1,100 CPU cycles, due to the
|
||||
dynamic memory allocation and free of the exception ptr, plus at least two atomic operations per stack frame, but that is
|
||||
still two orders of magnitude better than throwing and catching an exception.</p>
|
||||
|
||||
<p>We conclude that if failure is anything but extremely rare in your C++ codebase,
|
||||
using Outcome instead of throwing and catching exceptions ought to be quicker overall:</p>
|
||||
|
||||
<ul>
|
||||
<li>Experimental Outcome is statistically indistinguishable from the null case on this
|
||||
high end CPU, for both returning success and failure, on all compilers.</li>
|
||||
<li>Standard Outcome is less than 5%
|
||||
worse than the null case for returning successes on GCC and clang, and less than 10% worse than
|
||||
the null case for returning failures on GCC and clang.</li>
|
||||
<li>Standard Outcome optimises
|
||||
poorly on VS2017.9, indeed markedly worse than on previous point releases, so let’s
|
||||
hope that Microsoft fix that soon. It currently has a less than 20% overhead on the null case.</li>
|
||||
</ul>
|
||||
|
||||
<h3 id="mid-tier-cpu-arm-cortex-a72">Mid tier CPU: ARM Cortex A72</h3>
|
||||
|
||||
<p>This is a four year old mid tier CPU used in many high end mobile phones and tablets
|
||||
of its day, with good ability to cache, predict, parallelise
|
||||
and execute out-of-order such that tight, repeated loops perform very well. It has
|
||||
a μop cache able to wholly contain the test loop, meaning that these results
|
||||
are a <strong>best case</strong> performance.</p>
|
||||
|
||||
<figure>
|
||||
<img src="./faq/results_arm_a72_log.png"/> <figcaption>
|
||||
<h4>Log graph comparing GCC 7.3 and clang 7.3 on ARM64, for exceptions-globally-disabled, ordinary and link-time-optimised build configurations.</h4>
|
||||
</figcaption>
|
||||
</figure>
|
||||
|
||||
<p>This ARM chip is a very consistent performer – null case, success, or failure, all take
|
||||
almost exactly the same CPU cycles. Choosing Outcome, in any configuration, makes no
|
||||
difference to not using Outcome at all. Throwing and catching a C++ exception costs
|
||||
about 90,000 CPU cycles, whereas the null case/Outcome costs about 130 - 140 CPU cycles.</p>
|
||||
|
||||
<p>There is very little to say about this CPU, other than Outcome is zero overhead on it. The same
|
||||
applied to the ARM Cortex A15 incidentally, which I test cased extensively when
|
||||
deciding on the Outcome v2 design back after the first peer review. The v2 design
|
||||
was chosen partially because of such consistent performance on ARM.</p>
|
||||
|
||||
<h3 id="low-end-cpus-intel-silvermont-x64-and-arm-cortex-a53">Low end CPUs: Intel Silvermont x64 and ARM Cortex A53</h3>
|
||||
|
||||
<p>These are low end CPUs with a mostly or wholly in-order execution core. They have a small
|
||||
or no μop cache, meaning that the CPU must always decode the instruction stream.
|
||||
These results represent an execution environment more typical of CPUs two decades
|
||||
ago, back when table-based EH created a big performance win if you never threw
|
||||
an exception.</p>
|
||||
|
||||
<p><figure>
|
||||
<img src="./faq/results_silvermont_log.png"/> <figcaption>
|
||||
<h4>Log graph comparing GCC 7.3 and clang 7.3 on x64, for exceptions-globally-disabled, ordinary and link-time-optimised build configurations.</h4>
|
||||
</figcaption>
|
||||
</figure>
|
||||
<figure>
|
||||
<img src="./faq/results_arm_a53_log.png"/> <figcaption>
|
||||
<h4>Log graph comparing GCC 7.3 and clang 7.3 on ARM64, for exceptions-globally-disabled, ordinary and link-time-optimised build configurations.</h4>
|
||||
</figcaption>
|
||||
</figure></p>
|
||||
|
||||
<p>The first thing to mention is that clang generates very high performance code for
|
||||
in-order cores, far better than GCC. It is said that this is due to a very large investment by
|
||||
Apple in clang/LLVM for their devices sustained over many years. In any case, if you’re
|
||||
targeting in-order CPUs, don’t use GCC if you can use clang instead!</p>
|
||||
|
||||
<p>For the null case, Silvermont and Cortex A53 are quite similar in terms of CPU clock cycles. Ditto
|
||||
for throwing and catching a C++ exception (approx 150,000 CPU cycles). However the Cortex
|
||||
A53 does far better with Outcome than Silvermont, a 15% versus 100% overhead for Standard
|
||||
Outcome, and a 4% versus 20% overhead for Experimental Outcome.</p>
|
||||
|
||||
<p>Much of this large difference is in fact due to calling convention differences. x64 permits up to 8 bytes
|
||||
to be returned from functions by CPU register. <code>result<int></code> consumes 24 bytes, so on x64
|
||||
the compiler writes the return value to the stack. However ARM64 permits up to 64 bytes
|
||||
to be returned in registers, so <code>result<int></code> is returned via CPU registers on ARM64.</p>
|
||||
|
||||
<p>On higher end CPUs, memory is read and written in cache lines (32 or 64 bytes), and
|
||||
reads and writes are coalesced and batched together by the out-of-order execution core. On these
|
||||
low end CPUs, memory is read and written sequentially per assembler instruction,
|
||||
so only one load or one store to L1
|
||||
cache can occur at a time. This makes writing the stack particularly slow on in-order
|
||||
CPUs. Memory operations which “disappear” on higher end CPUs take considerable time
|
||||
on low end CPUs. This particularly punishes Silvermont in a way which does not punish
|
||||
the Cortex A53, because of having to write multiple values to the stack to create the
|
||||
24 byte object to be returned.</p>
|
||||
|
||||
<p>The conclusion to take away from this is that if you are targeting a low end CPU,
|
||||
table-based EH still delivers significant performance improvements for the success
|
||||
code path. Unless determinism in failure is critically important, you should not
|
||||
use Outcome on in-order execution CPUs.</p>
|
||||
|
||||
<h2 id="why-is-implicit-default-construction-disabled">Why is implicit default construction disabled?</h2>
|
||||
|
||||
<p>This was one of the more interesting points of discussion during the peer review of
|
||||
Outcome v1. v1 had a formal empty state. This came with many advantages, but it
|
||||
was not felt to be STL idiomatic as <code>std::optional<result<T>></code> is what was meant, so
|
||||
v2 has eliminated any legal possibility of being empty.</p>
|
||||
|
||||
<p>The <code>expected<T, E></code> proposal of that time (May 2017) did permit default construction
|
||||
if its <code>T</code> type allowed default construction. This was specifically done to make
|
||||
<code>expected<T, E></code> more useful in STL containers as one can say resize a vector without
|
||||
having to supply an <code>expected<T, E></code> instance to fill the new items with. However
|
||||
there was some unease with that design choice, because it may cause programmers to
|
||||
use some type <code>T</code> whose default constructed state is overloaded with additional meaning,
|
||||
typically “to be filled” i.e. a de facto empty state via choosing a magic value.</p>
|
||||
|
||||
<p>For the v2 redesign, the various arguments during the v1 review were considered.
|
||||
Unlike <code>expected<T, E></code> which is intended to be a general purpose Either monad
|
||||
vocabulary type, Outcome’s types are meant primarily for returning success or failure
|
||||
from functions. The API should therefore encourage the programmer to not overload
|
||||
the successful type with additional meaning of “to be filled” e.g. <code>result<std::optional<T>></code>.
|
||||
The decision was therefore taken to disable <em>implicit</em> default construction, but
|
||||
still permit <em>explicit</em> default construction by making the programmer spell out their
|
||||
intention with extra typing.</p>
|
||||
|
||||
<p>To therefore explicitly default construct a <code>result<T></code> or <code>outcome<T></code>, use one
|
||||
of these forms as is the most appropriate for the use case:</p>
|
||||
|
||||
<ol>
|
||||
<li>Construct with just <code>in_place_type<T></code> e.g. <code>result<T>(in_place_type<T>)</code>.</li>
|
||||
<li>Construct via <code>success()</code> e.g. <code>outcome<T>(success())</code>.</li>
|
||||
<li>Construct from a <code>void</code> form e.g. <code>result<T>(result<void>(in_place_type<void>))</code>.</li>
|
||||
</ol>
|
||||
|
||||
<h2 id="how-far-away-from-the-proposed-std-expected-t-e-is-outcome-s-checked-t-e">How far away from the proposed <code>std::expected<T, E></code> is Outcome’s <code>checked<T, E></code>?</h2>
|
||||
|
||||
<p>Not far, in fact after the first Boost.Outcome peer review in May 2017, Expected moved
|
||||
much closer to Outcome, and Outcome deliberately provides <a href="./reference/aliases/checked.html" class="api-reference"><code>checked<T, E = varies></code></a>
|
||||
|
||||
as a semantic equivalent.</p>
|
||||
|
||||
<p>Here are the remaining differences which represent the
|
||||
divergence of consensus opinion between the Boost peer review and WG21 on the proper
|
||||
design for this object:</p>
|
||||
|
||||
<ol>
|
||||
<li><code>checked<T, E></code> has no default constructor. Expected has a default constructor if
|
||||
<code>T</code> has a default constructor.</li>
|
||||
<li><code>checked<T, E></code> uses the same constructor design as <code>std::variant<...></code>. Expected
|
||||
uses the constructor design of <code>std::optional<T></code>.</li>
|
||||
<li><code>checked<T, E></code> cannot be modified after construction except by assignment.
|
||||
Expected provides an <code>.emplace()</code> modifier.</li>
|
||||
<li><code>checked<T, E></code> permits implicit construction from both <code>T</code> and <code>E</code> when
|
||||
unambiguous. Expected permits implicit construction from <code>T</code> alone.</li>
|
||||
<li><code>checked<T, E></code> does not permit <code>T</code> and <code>E</code> to be the same, and becomes annoying
|
||||
to use if they are constructible into one another (implicit construction self-disables).
|
||||
Expected permits <code>T</code> and <code>E</code> to be the same.</li>
|
||||
<li><code>checked<T, E></code> throws <code>bad_result_access_with<E></code> instead of Expected’s
|
||||
<code>bad_expected_access<E></code>.</li>
|
||||
<li><code>checked<T, E></code> models <code>std::variant<...></code>. Expected models <code>std::optional<T></code>. Thus:
|
||||
|
||||
<ul>
|
||||
<li><code>checked<T, E></code> does not provide <code>operator*()</code> nor <code>operator-></code></li>
|
||||
<li><code>checked<T, E></code> <code>.error()</code> is wide (i.e. throws on no-value) like <code>.value()</code>.
|
||||
Expected’s <code>.error()</code> is narrow (UB on no-error). [<code>checked<T, E></code> provides
|
||||
<code>.assume_value()</code> and <code>.assume_error()</code> for narrow (UB causing) observers].</li>
|
||||
</ul></li>
|
||||
<li><code>checked<T, E></code> uses <code>success<T></code> and <code>failure<E></code> type sugars for disambiguation.
|
||||
Expected uses <code>unexpected<E></code> only.</li>
|
||||
<li><code>checked<T, E></code> requires <code>E</code> to be default constructible.</li>
|
||||
<li><code>checked<T, E></code> defaults <code>E</code> to <code>std::error_code</code> or <code>boost::system::error_code</code>.
|
||||
Expected does not default <code>E</code>.</li>
|
||||
</ol>
|
||||
|
||||
<p>In fact, the two are sufficiently close in design that a highly conforming <code>expected<T, E></code>
|
||||
can be implemented by wrapping up <code>checked<T, E></code> with the differing functionality:</p>
|
||||
|
||||
<div class="code-snippet"><div class="highlight"><pre class="chroma"><code class="language-c++" data-lang="c++"><span class="cm">/* Here is a fairly conforming implementation of P0323R3 `expected<T, E>` using `checked<T, E>`.
|
||||
</span><span class="cm">It passes the reference test suite for P0323R3 at
|
||||
</span><span class="cm">https://github.com/viboes/std-make/blob/master/test/expected/expected_pass.cpp with modifications
|
||||
</span><span class="cm">only to move the test much closer to the P0323R3 Expected, as the reference test suite is for a
|
||||
</span><span class="cm">much older proposed Expected.
|
||||
</span><span class="cm">
|
||||
</span><span class="cm">Known differences from P0323R3 in this implementation:
|
||||
</span><span class="cm">- `T` and `E` cannot be the same type.
|
||||
</span><span class="cm">- `E` must be default constructible.
|
||||
</span><span class="cm">- No variant storage is implemented (note the Expected proposal does not actually require this).
|
||||
</span><span class="cm">*/</span>
|
||||
|
||||
<span class="k">namespace</span> <span class="n">detail</span>
|
||||
<span class="p">{</span>
|
||||
<span class="k">template</span> <span class="o"><</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="k">using</span> <span class="n">expected_result</span> <span class="o">=</span> <span class="n">BOOST_OUTCOME_V2_NAMESPACE</span><span class="o">::</span><span class="n">checked</span><span class="o"><</span><span class="n">T</span><span class="p">,</span> <span class="n">E</span><span class="o">></span><span class="p">;</span>
|
||||
<span class="k">template</span> <span class="o"><</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="k">struct</span> <span class="nl">enable_default_constructor</span> <span class="p">:</span> <span class="k">public</span> <span class="n">expected_result</span><span class="o"><</span><span class="n">T</span><span class="p">,</span> <span class="n">E</span><span class="o">></span>
|
||||
<span class="p">{</span>
|
||||
<span class="k">using</span> <span class="n">base</span> <span class="o">=</span> <span class="n">expected_result</span><span class="o"><</span><span class="n">T</span><span class="p">,</span> <span class="n">E</span><span class="o">></span><span class="p">;</span>
|
||||
<span class="k">using</span> <span class="n">base</span><span class="o">::</span><span class="n">base</span><span class="p">;</span>
|
||||
<span class="k">constexpr</span> <span class="nf">enable_default_constructor</span><span class="p">()</span>
|
||||
<span class="o">:</span> <span class="n">base</span><span class="p">{</span><span class="n">BOOST_OUTCOME_V2_NAMESPACE</span><span class="o">::</span><span class="n">in_place_type</span><span class="o"><</span><span class="n">T</span><span class="o">></span><span class="p">}</span>
|
||||
<span class="p">{</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">};</span>
|
||||
<span class="k">template</span> <span class="o"><</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="k">using</span> <span class="n">select_expected_base</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">conditional_t</span><span class="o"><</span><span class="n">std</span><span class="o">::</span><span class="n">is_default_constructible</span><span class="o"><</span><span class="n">T</span><span class="o">>::</span><span class="n">value</span><span class="p">,</span> <span class="n">enable_default_constructor</span><span class="o"><</span><span class="n">T</span><span class="p">,</span> <span class="n">E</span><span class="o">></span><span class="p">,</span> <span class="n">expected_result</span><span class="o"><</span><span class="n">T</span><span class="p">,</span> <span class="n">E</span><span class="o">>></span><span class="p">;</span>
|
||||
<span class="p">}</span>
|
||||
<span class="k">template</span> <span class="o"><</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="k">class</span><span class="err"> </span><span class="nc">expected</span> <span class="o">:</span> <span class="k">public</span> <span class="n">detail</span><span class="o">::</span><span class="n">select_expected_base</span><span class="o"><</span><span class="n">T</span><span class="p">,</span> <span class="n">E</span><span class="o">></span>
|
||||
<span class="p">{</span>
|
||||
<span class="k">static_assert</span><span class="p">(</span><span class="o">!</span><span class="n">std</span><span class="o">::</span><span class="n">is_same</span><span class="o"><</span><span class="n">T</span><span class="p">,</span> <span class="n">E</span><span class="o">>::</span><span class="n">value</span><span class="p">,</span> <span class="s">"T and E cannot be the same in this expected implementation"</span><span class="p">);</span>
|
||||
<span class="k">using</span> <span class="n">base</span> <span class="o">=</span> <span class="n">detail</span><span class="o">::</span><span class="n">select_expected_base</span><span class="o"><</span><span class="n">T</span><span class="p">,</span> <span class="n">E</span><span class="o">></span><span class="p">;</span>
|
||||
|
||||
<span class="k">public</span><span class="o">:</span>
|
||||
<span class="c1">// Inherit base's constructors
|
||||
</span><span class="c1"></span> <span class="k">using</span> <span class="n">base</span><span class="o">::</span><span class="n">base</span><span class="p">;</span>
|
||||
<span class="n">expected</span><span class="p">()</span> <span class="o">=</span> <span class="k">default</span><span class="p">;</span>
|
||||
|
||||
<span class="c1">// Expected takes in_place not in_place_type
|
||||
</span><span class="c1"></span> <span class="k">template</span> <span class="o"><</span><span class="k">class</span><span class="err">... </span><span class="nc">Args</span><span class="o">></span>
|
||||
<span class="k">constexpr</span> <span class="k">explicit</span> <span class="n">expected</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">in_place_t</span> <span class="cm">/*unused*/</span><span class="p">,</span> <span class="n">Args</span> <span class="o">&&</span><span class="p">...</span> <span class="n">args</span><span class="p">)</span>
|
||||
<span class="o">:</span> <span class="n">base</span><span class="p">{</span><span class="n">BOOST_OUTCOME_V2_NAMESPACE</span><span class="o">::</span><span class="n">in_place_type</span><span class="o"><</span><span class="n">T</span><span class="o">></span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">forward</span><span class="o"><</span><span class="n">Args</span><span class="o">></span><span class="p">(</span><span class="n">args</span><span class="p">)...}</span>
|
||||
<span class="p">{</span>
|
||||
<span class="p">}</span>
|
||||
|
||||
<span class="c1">// Expected always accepts a T even if ambiguous
|
||||
</span><span class="c1"></span> <span class="n">BOOST_OUTCOME_TEMPLATE</span><span class="p">(</span><span class="k">class</span><span class="err"> </span><span class="nc">U</span><span class="p">)</span>
|
||||
<span class="n">BOOST_OUTCOME_TREQUIRES</span><span class="p">(</span><span class="n">BOOST_OUTCOME_TPRED</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">is_constructible</span><span class="o"><</span><span class="n">T</span><span class="p">,</span> <span class="n">U</span><span class="o">>::</span><span class="n">value</span><span class="p">))</span>
|
||||
<span class="k">constexpr</span> <span class="n">expected</span><span class="p">(</span><span class="n">U</span> <span class="o">&&</span><span class="n">v</span><span class="p">)</span>
|
||||
<span class="o">:</span> <span class="n">base</span><span class="p">{</span><span class="n">BOOST_OUTCOME_V2_NAMESPACE</span><span class="o">::</span><span class="n">in_place_type</span><span class="o"><</span><span class="n">T</span><span class="o">></span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">forward</span><span class="o"><</span><span class="n">U</span><span class="o">></span><span class="p">(</span><span class="n">v</span><span class="p">)}</span>
|
||||
<span class="p">{</span>
|
||||
<span class="p">}</span>
|
||||
|
||||
<span class="c1">// Expected has an emplace() modifier
|
||||
</span><span class="c1"></span> <span class="k">template</span> <span class="o"><</span><span class="k">class</span><span class="err">... </span><span class="nc">Args</span><span class="o">></span> <span class="kt">void</span> <span class="n">emplace</span><span class="p">(</span><span class="n">Args</span> <span class="o">&&</span><span class="p">...</span> <span class="n">args</span><span class="p">)</span> <span class="p">{</span> <span class="o">*</span><span class="k">static_cast</span><span class="o"><</span><span class="n">base</span> <span class="o">*></span><span class="p">(</span><span class="k">this</span><span class="p">)</span> <span class="o">=</span> <span class="n">base</span><span class="p">{</span><span class="n">BOOST_OUTCOME_V2_NAMESPACE</span><span class="o">::</span><span class="n">in_place_type</span><span class="o"><</span><span class="n">T</span><span class="o">></span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">forward</span><span class="o"><</span><span class="n">Args</span><span class="o">></span><span class="p">(</span><span class="n">args</span><span class="p">)...};</span> <span class="p">}</span>
|
||||
|
||||
<span class="c1">// Expected has a narrow operator* and operator->
|
||||
</span><span class="c1"></span> <span class="k">constexpr</span> <span class="k">const</span> <span class="n">T</span> <span class="o">&</span><span class="k">operator</span><span class="o">*</span><span class="p">()</span> <span class="k">const</span> <span class="o">&</span> <span class="p">{</span> <span class="k">return</span> <span class="n">base</span><span class="o">::</span><span class="n">assume_value</span><span class="p">();</span> <span class="p">}</span>
|
||||
<span class="k">constexpr</span> <span class="n">T</span> <span class="o">&</span><span class="k">operator</span><span class="o">*</span><span class="p">()</span> <span class="o">&</span> <span class="p">{</span> <span class="k">return</span> <span class="n">base</span><span class="o">::</span><span class="n">assume_value</span><span class="p">();</span> <span class="p">}</span>
|
||||
<span class="k">constexpr</span> <span class="k">const</span> <span class="n">T</span> <span class="o">&&</span><span class="k">operator</span><span class="o">*</span><span class="p">()</span> <span class="k">const</span> <span class="o">&&</span> <span class="p">{</span> <span class="k">return</span> <span class="n">base</span><span class="o">::</span><span class="n">assume_value</span><span class="p">();</span> <span class="p">}</span>
|
||||
<span class="k">constexpr</span> <span class="n">T</span> <span class="o">&&</span><span class="k">operator</span><span class="o">*</span><span class="p">()</span> <span class="o">&&</span> <span class="p">{</span> <span class="k">return</span> <span class="n">base</span><span class="o">::</span><span class="n">assume_value</span><span class="p">();</span> <span class="p">}</span>
|
||||
<span class="k">constexpr</span> <span class="k">const</span> <span class="n">T</span> <span class="o">*</span><span class="k">operator</span><span class="o">-></span><span class="p">()</span> <span class="k">const</span> <span class="p">{</span> <span class="k">return</span> <span class="o">&</span><span class="n">base</span><span class="o">::</span><span class="n">assume_value</span><span class="p">();</span> <span class="p">}</span>
|
||||
<span class="k">constexpr</span> <span class="n">T</span> <span class="o">*</span><span class="k">operator</span><span class="o">-></span><span class="p">()</span> <span class="p">{</span> <span class="k">return</span> <span class="o">&</span><span class="n">base</span><span class="o">::</span><span class="n">assume_value</span><span class="p">();</span> <span class="p">}</span>
|
||||
|
||||
<span class="c1">// Expected has a narrow error() observer
|
||||
</span><span class="c1"></span> <span class="k">constexpr</span> <span class="k">const</span> <span class="n">E</span> <span class="o">&</span><span class="n">error</span><span class="p">()</span> <span class="k">const</span> <span class="o">&</span> <span class="p">{</span> <span class="k">return</span> <span class="n">base</span><span class="o">::</span><span class="n">assume_error</span><span class="p">();</span> <span class="p">}</span>
|
||||
<span class="k">constexpr</span> <span class="n">E</span> <span class="o">&</span><span class="n">error</span><span class="p">()</span> <span class="o">&</span> <span class="p">{</span> <span class="k">return</span> <span class="n">base</span><span class="o">::</span><span class="n">assume_error</span><span class="p">();</span> <span class="p">}</span>
|
||||
<span class="k">constexpr</span> <span class="k">const</span> <span class="n">E</span> <span class="o">&&</span><span class="n">error</span><span class="p">()</span> <span class="k">const</span> <span class="o">&&</span> <span class="p">{</span> <span class="k">return</span> <span class="n">base</span><span class="o">::</span><span class="n">assume_error</span><span class="p">();</span> <span class="p">}</span>
|
||||
<span class="k">constexpr</span> <span class="n">E</span> <span class="o">&</span><span class="n">error</span><span class="p">()</span> <span class="o">&&</span> <span class="p">{</span> <span class="k">return</span> <span class="n">base</span><span class="o">::</span><span class="n">assume_error</span><span class="p">();</span> <span class="p">}</span>
|
||||
<span class="p">};</span>
|
||||
<span class="k">template</span> <span class="o"><</span><span class="k">class</span><span class="err"> </span><span class="nc">E</span><span class="o">></span> <span class="k">class</span><span class="err"> </span><span class="nc">expected</span><span class="o"><</span><span class="kt">void</span><span class="p">,</span> <span class="n">E</span><span class="o">></span> <span class="o">:</span> <span class="k">public</span> <span class="n">BOOST_OUTCOME_V2_NAMESPACE</span><span class="o">::</span><span class="n">result</span><span class="o"><</span><span class="kt">void</span><span class="p">,</span> <span class="n">E</span><span class="p">,</span> <span class="n">BOOST_OUTCOME_V2_NAMESPACE</span><span class="o">::</span><span class="n">policy</span><span class="o">::</span><span class="n">throw_bad_result_access</span><span class="o"><</span><span class="n">E</span><span class="p">,</span> <span class="kt">void</span><span class="o">>></span>
|
||||
<span class="p">{</span>
|
||||
<span class="k">using</span> <span class="n">base</span> <span class="o">=</span> <span class="n">BOOST_OUTCOME_V2_NAMESPACE</span><span class="o">::</span><span class="n">result</span><span class="o"><</span><span class="kt">void</span><span class="p">,</span> <span class="n">E</span><span class="p">,</span> <span class="n">BOOST_OUTCOME_V2_NAMESPACE</span><span class="o">::</span><span class="n">policy</span><span class="o">::</span><span class="n">throw_bad_result_access</span><span class="o"><</span><span class="n">E</span><span class="p">,</span> <span class="kt">void</span><span class="o">>></span><span class="p">;</span>
|
||||
|
||||
<span class="k">public</span><span class="o">:</span>
|
||||
<span class="c1">// Inherit base constructors
|
||||
</span><span class="c1"></span> <span class="k">using</span> <span class="n">base</span><span class="o">::</span><span class="n">base</span><span class="p">;</span>
|
||||
|
||||
<span class="c1">// Expected has a narrow operator* and operator->
|
||||
</span><span class="c1"></span> <span class="k">constexpr</span> <span class="kt">void</span> <span class="k">operator</span><span class="o">*</span><span class="p">()</span> <span class="k">const</span> <span class="p">{</span> <span class="n">base</span><span class="o">::</span><span class="n">assume_value</span><span class="p">();</span> <span class="p">}</span>
|
||||
<span class="k">constexpr</span> <span class="kt">void</span> <span class="k">operator</span><span class="o">-></span><span class="p">()</span> <span class="k">const</span> <span class="p">{</span> <span class="n">base</span><span class="o">::</span><span class="n">assume_value</span><span class="p">();</span> <span class="p">}</span>
|
||||
<span class="p">};</span>
|
||||
<span class="k">template</span> <span class="o"><</span><span class="k">class</span><span class="err"> </span><span class="nc">E</span><span class="o">></span> <span class="k">using</span> <span class="n">unexpected</span> <span class="o">=</span> <span class="n">BOOST_OUTCOME_V2_NAMESPACE</span><span class="o">::</span><span class="n">failure_type</span><span class="o"><</span><span class="n">E</span><span class="o">></span><span class="p">;</span>
|
||||
<span class="k">template</span> <span class="o"><</span><span class="k">class</span><span class="err"> </span><span class="nc">E</span><span class="o">></span> <span class="n">unexpected</span><span class="o"><</span><span class="n">E</span><span class="o">></span> <span class="n">make_unexpected</span><span class="p">(</span><span class="n">E</span> <span class="o">&&</span><span class="n">arg</span><span class="p">)</span>
|
||||
<span class="p">{</span>
|
||||
<span class="k">return</span> <span class="n">BOOST_OUTCOME_V2_NAMESPACE</span><span class="o">::</span><span class="n">failure</span><span class="o"><</span><span class="n">E</span><span class="o">></span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">forward</span><span class="o"><</span><span class="n">E</span><span class="o">></span><span class="p">(</span><span class="n">arg</span><span class="p">));</span>
|
||||
<span class="p">}</span>
|
||||
<span class="k">template</span> <span class="o"><</span><span class="k">class</span><span class="err"> </span><span class="nc">E</span><span class="p">,</span> <span class="k">class</span><span class="err">... </span><span class="nc">Args</span><span class="o">></span> <span class="n">unexpected</span><span class="o"><</span><span class="n">E</span><span class="o">></span> <span class="n">make_unexpected</span><span class="p">(</span><span class="n">Args</span> <span class="o">&&</span><span class="p">...</span> <span class="n">args</span><span class="p">)</span>
|
||||
<span class="p">{</span>
|
||||
<span class="k">return</span> <span class="n">BOOST_OUTCOME_V2_NAMESPACE</span><span class="o">::</span><span class="n">failure</span><span class="o"><</span><span class="n">E</span><span class="o">></span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">forward</span><span class="o"><</span><span class="n">Args</span><span class="o">></span><span class="p">(</span><span class="n">args</span><span class="p">)...);</span>
|
||||
<span class="p">}</span>
|
||||
<span class="k">template</span> <span class="o"><</span><span class="k">class</span><span class="err"> </span><span class="nc">E</span><span class="o">></span> <span class="k">using</span> <span class="n">bad_expected_access</span> <span class="o">=</span> <span class="n">BOOST_OUTCOME_V2_NAMESPACE</span><span class="o">::</span><span class="n">bad_result_access_with</span><span class="o"><</span><span class="n">E</span><span class="o">></span><span class="p">;</span>
|
||||
</code></pre></div><a href="https://github.com/boostorg/outcome/tree/master/doc/src/snippets/expected_implementation.cpp#L35" class="code-snippet-url" target="_blank">View this code on Github</a></div>
|
||||
|
||||
|
||||
<h2 id="why-doesn-t-outcome-duplicate-std-expected-t-e-s-design">Why doesn’t Outcome duplicate <code>std::expected<T, E></code>’s design?</h2>
|
||||
|
||||
<p>There are a number of reasons:</p>
|
||||
|
||||
<ol>
|
||||
<li><p>Outcome is not aimed at the same audience as Expected. We target developers
|
||||
and users who would be happy to use Boost. Expected targets the standard library user.</p></li>
|
||||
|
||||
<li><p>Outcome believes that the monadic use case isn’t as important as Expected does.
|
||||
Specifically, we think that 99% of use of Expected in the real world will be to
|
||||
return failure from functions, and not as some sort of enhanced or “rich” Optional.
|
||||
Outcome therefore models a subset of Variant, whereas Expected models an extended Optional.</p></li>
|
||||
|
||||
<li><p>Outcome believes that if you are thinking about using something like Outcome,
|
||||
then for you writing failure code will be in the same proportion as writing success code,
|
||||
and thus in Outcome writing for failure is exactly the same as writing for success.
|
||||
Expected assumes that success will be more common than failure, and makes you type
|
||||
more when writing for failure.</p></li>
|
||||
|
||||
<li><p>Outcome goes to considerable effort to help the end user type fewer characters
|
||||
during use. This results in tighter, less verbose, more succinct code. The cost of this is a steeper
|
||||
learning curve and more complex mental model than when programming with Expected.</p></li>
|
||||
|
||||
<li><p>Outcome has facilities to make easier interoperation between multiple third
|
||||
party libraries each using incommensurate Outcome (or Expected) configurations. Expected does
|
||||
not do any of this, but subsequent WG21 papers do propose various interoperation
|
||||
mechanisms, <a href="https://wg21.link/P0786">one of which</a> Outcome implements so code using Expected will seamlessly
|
||||
interoperate with code using Outcome.</p></li>
|
||||
</ol>
|
||||
|
||||
<h2 id="is-outcome-riddled-with-undefined-behaviour-for-const-const-containing-and-reference-containing-types">Is Outcome riddled with undefined behaviour for const, const-containing and reference-containing types?</h2>
|
||||
|
||||
<p>The short answer is yes, but it probably won’t matter to you in practice.</p>
|
||||
|
||||
<p>The longer answer is that the same problem affects lots of C++ out there,
|
||||
so lots of production code will break if Outcome ever breaks on this. The
|
||||
potentially sometime-in-the-future affected code sequence would be:</p>
|
||||
<div class="highlight"><pre class="chroma"><code class="language-c++" data-lang="c++"><span class="k">struct</span> <span class="n">const_containing_type</span>
|
||||
<span class="p">{</span>
|
||||
<span class="k">const</span> <span class="kt">int</span> <span class="n">no</span><span class="p">;</span> <span class="c1">// only concerns const and reference types
|
||||
</span><span class="c1"></span> <span class="n">const_containing_type</span><span class="p">(</span><span class="kt">int</span> <span class="n">n</span><span class="p">)</span> <span class="o">:</span> <span class="n">no</span><span class="p">(</span><span class="n">n</span><span class="p">)</span> <span class="p">{}</span>
|
||||
<span class="p">};</span>
|
||||
|
||||
<span class="k">extern</span> <span class="kt">void</span> <span class="nf">external_function</span><span class="p">(</span><span class="kt">int</span><span class="p">,</span> <span class="k">const</span> <span class="n">result</span><span class="o"><</span><span class="n">const_containing_type</span><span class="o">></span> <span class="o">&</span><span class="p">);</span>
|
||||
|
||||
<span class="kt">int</span> <span class="nf">example_const_propagation2</span><span class="p">()</span>
|
||||
<span class="p">{</span>
|
||||
<span class="n">result</span><span class="o"><</span><span class="n">const_containing_type</span><span class="o">></span> <span class="n">a</span><span class="p">{</span><span class="mi">5</span><span class="p">};</span>
|
||||
<span class="k">const</span> <span class="kt">int</span> <span class="o">&</span><span class="n">x</span> <span class="o">=</span> <span class="n">a</span><span class="p">.</span><span class="n">value</span><span class="p">().</span><span class="n">no</span><span class="p">;</span>
|
||||
<span class="n">external_function</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">a</span><span class="p">);</span> <span class="c1">// might call an outcome function which calls placement new!
|
||||
</span><span class="c1"></span> <span class="k">return</span> <span class="n">x</span><span class="p">;</span> <span class="c1">// does this reload x, or assume it hasn't changed?
|
||||
</span><span class="c1"></span><span class="p">}</span>
|
||||
</code></pre></div>
|
||||
<p>GCCs up to v10, clangs up to v9 and MSVCs up to VS2019.1 <u><b>do</b></u> reload <code>x</code> after
|
||||
the call of an unknown function, even though it has constant type. This may change
|
||||
in future compilers due to changes in the C++ standard to encourage such
|
||||
optimisations.</p>
|
||||
|
||||
<h3 id="brief-history-of-c-standard-changes">Brief history of C++ standard changes</h3>
|
||||
|
||||
<p>Before the C++ 14 standard, placement new into storage which used to contain
|
||||
a const type was straight out always undefined behaviour, period. Thus all use of
|
||||
placement new within a <code>result<const_containing_type></code>, or indeed an <code>optional<const_containing_type></code>, is always
|
||||
undefined behaviour before C++ 14. From <code>[basic.life]</code> for the C++ 11 standard:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>Creating a new object at the storage location that a const object with static,
|
||||
thread, or automatic storage duration occupies or, at the storage location
|
||||
that such a const object used to occupy before its lifetime ended results
|
||||
in undefined behavior.</p>
|
||||
</blockquote>
|
||||
|
||||
<p>This being excessively restrictive, from C++ 14 onwards, <code>[basic_life]</code> now states:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>If, after the lifetime of an object has ended and before the storage which
|
||||
the object occupied is reused or released, a new object is created at the
|
||||
storage location which the original object occupied, a pointer that
|
||||
pointed to the original object, a reference that referred to the original
|
||||
object, or the name of the original object will automatically refer to the
|
||||
new object and, once the lifetime of the new object has started, can be
|
||||
used to manipulate the new object, if:</p>
|
||||
|
||||
<p>— the storage for the new object exactly overlays the storage location which
|
||||
the original object occupied, and</p>
|
||||
|
||||
<p>— the new object is of the same type as the original object (ignoring the
|
||||
top-level cv-qualifiers), and</p>
|
||||
|
||||
<p>— the type of the original object is not const-qualified, and, if a class type,
|
||||
does not contain any non-static data member whose type is const-qualified
|
||||
or a reference type, and</p>
|
||||
|
||||
<p>— neither the original object nor the new object is a potentially-overlapping
|
||||
subobject</p>
|
||||
</blockquote>
|
||||
|
||||
<p>Leaving aside my personal objections to giving placement new of non-const
|
||||
non-reference types magical pointer renaming powers, the upshot is that if
|
||||
you want defined behaviour for placement new of types containing const types
|
||||
or references, you must store the pointer returned by placement new, and use
|
||||
that pointer for all further reference to the newly created object. This
|
||||
obviously adds eight bytes of storage to a <code>result<const_containing_type></code>, which is highly
|
||||
undesirable given all the care and attention paid to keeping it small. The alternative
|
||||
is to use
|
||||
<a href="https://en.cppreference.com/w/cpp/utility/launder" class="api-reference" target="_blank"><i class="fa fa-book" aria-hidden="true"></i> <code>std::launder</code></a>
|
||||
, which was added in C++ 17, to ‘launder’
|
||||
the storage into which we placement new before each and every use of that
|
||||
storage. This forces the compiler to reload the object stored by placement
|
||||
new on every occasion, and not assume it is can be constant propagated, which
|
||||
impacts codegen quality.</p>
|
||||
|
||||
<p>As neither situation is obviously desirable, after much thought I have
|
||||
decided to simply do nothing apart from add this FAQ entry. I would say that
|
||||
because Outcome is 100% header-only, the compiler can always see the
|
||||
calls of placement new, and thus the compiler always knows that the
|
||||
preceding const or reference object is dead, and there is now a new const
|
||||
or reference object in its place. I appreciate that this is a hand waving
|
||||
response, and code using Outcome will still contain undefined behaviour if
|
||||
you use it with a const type, or a type containing const or reference types.</p>
|
||||
|
||||
<p>However the reality on the ground is that a ton of production C++ code does
|
||||
placement new of types potentially containing const or reference types, and
|
||||
it is highly unlikely that C++ compilers will, in practice, break all that
|
||||
production code, especially as the template type supplied to library code is often
|
||||
outside one’s control. If, however, compilers do end up moving ahead on
|
||||
optimising this aggressively, Outcome will need to add laundering for any
|
||||
type containing const or reference types, for which one needs Reflection
|
||||
into the language in any case. We shall thus wait until later to see what
|
||||
happens.</p>
|
||||
|
||||
<h3 id="summary">Summary</h3>
|
||||
|
||||
<p>If you wish to be kept abreast of changes on this topic, please add yourself
|
||||
to <a href="https://github.com/ned14/outcome/issues/185">https://github.com/ned14/outcome/issues/185</a> which is the issue tracking
|
||||
this bug.</p>
|
||||
|
||||
|
||||
|
||||
</div><p><small>Last revised: June 25, 2019 at 17:14:43 +0100</small></p>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="./reference/functions/try_throw_std_exception_from_error.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="./videos.html"><img src="./images/next.png" alt="Next"></a></div></body>
|
||||
</html>
|
||||
BIN
doc/html/faq/results_arm_a53_log.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
doc/html/faq/results_arm_a72_log.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
doc/html/faq/results_silvermont_log.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
doc/html/faq/results_skylake_log.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
185
doc/html/history.html
Normal file
@@ -0,0 +1,185 @@
|
||||
<!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>History - 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="./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">History</h1></div></div></div>
|
||||
<div class="toc"><dl class="toc">
|
||||
<dt>
|
||||
<dd><dl>
|
||||
<dt><a href="#the-genesis-of-outcome-v1">The genesis of Outcome v1</a></dt>
|
||||
<dt><a href="#outcome-v2">Outcome v2</a></dt>
|
||||
<dt><a href="#outcome-v2-1">Outcome v2.1</a></dt>
|
||||
</dl></dd></dt>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
|
||||
<p>Outcome has had an interesting history, and it is worth summarising it here to show how a
|
||||
Boost library comes to life. The following recollections are by Niall Douglas, and may be
|
||||
faulty due to his aging memory.</p>
|
||||
|
||||
|
||||
<center><img src="./history/graph.png"></center>
|
||||
|
||||
<h2 id="the-genesis-of-outcome-v1">The genesis of Outcome v1</h2>
|
||||
|
||||
<p>The git repo began life as a “Boost.Spinlock” in June 2014 hived out of Boost.AFIO v1 where it had existed
|
||||
for some time as an internal library. In October 2014 I added in the original prototype
|
||||
Boost.Expected reference library as a git submodule, and began developing a non-allocating
|
||||
<code>future<T></code>/<code>promise<T></code> as an extension of <code>expected<T, std::exception_ptr></code> as a faster,
|
||||
monadic future-promise was something which AFIO v1 sorely needed.</p>
|
||||
|
||||
<p>The original prototype Boost.Expected library was a large and very complex beastie.
|
||||
I was fortunate to be employed on a contract in late 2014 early 2015 where I saw it deployed at
|
||||
scale into an existing large C++ codebase. Expected was really great and powerful, but it absolutely
|
||||
murdered compile times in a large C++ codebase, and made LTO effectively infeasible.
|
||||
I also found its implementation non-conducive to implementing
|
||||
future-promise with it, and so I resolved to implement a much more powerful policy driven
|
||||
monad factory which could stamp out everything from an <code>option<T></code> right through to a
|
||||
future-promise pair, all using the exact same <code>basic_monad<></code> and therefore all with a full
|
||||
monadic programming API, C++ 17 continuations/monadic bind and intelligently convertible into one another.
|
||||
Moreover, all this needed to have an absolute minimum impact on compile times and runtime
|
||||
overheads, neither of which were strengths of the original prototype Boost.Expected library.</p>
|
||||
|
||||
<p>By August 2015 “Boost.Monad” was delivering on all those requirements and then some, but it lacked
|
||||
maturity through use in other code. Summer 2015 saw the Boost peer review of AFIO v1 which
|
||||
was roundly rejected. After considering the ample review feedback, it was realised that
|
||||
<a href="https://ned14.github.io/llfio/">AFIO v2</a> would be a very different design, one no longer using futures, memory allocation
|
||||
nor C++ exceptions. As AFIO v2 was started from scratch and using Outcome heavily from the
|
||||
very beginning (every AFIO v2 API returns a <code>result<T></code>), Outcome began to gain bug fixes and
|
||||
shed features, with the non-allocating future-promise implementation being dropped in May
|
||||
2016 and a large chunk of type based metaprogramming being replaced with cleaner variable template metaprogramming
|
||||
in June. After CppCon 2016 in September, then began the long process of getting Outcome
|
||||
ready for Boost peer review in Q1 2017 which involved a repeated sequence of complete rewrites
|
||||
of the tutorial in response to multiple rounds of feedback from the C++ community, with
|
||||
at least four complete rewrites currently at the time of writing.</p>
|
||||
|
||||
<p>In parallel to all this development on Outcome, Expected went before the LEWG and entered
|
||||
the C++ standards track. As the WG21 meetings went by, Expected experienced a period
|
||||
of being stripped back and much of the complexity which had so murdered compile and
|
||||
link times in 2014-2015 fell away, thus the Expected proposed in P0323R1 ended up landing
|
||||
so close to Outcome that in January 2017 it was just a few hours work to implement
|
||||
Expected using the core <code>basic_monad</code> infrastructure in Outcome. That highly flexible
|
||||
policy based design which made monadic future-promise possible made it similarly easy
|
||||
to implement a highly conforming Expected, indeed in early 2017 Outcome’s Expected was much
|
||||
closer to <a href="http://wg21.link/P0323">P0323R1</a> than any other implementation including the LEWG reference implementation.
|
||||
And unlike the LEWG reference implementation, Outcome has had eighteen months of that
|
||||
finely tuned patina you only get when a library is in use by other code bases.</p>
|
||||
|
||||
<p>In February 2017 it became realised that the userbase really wanted a high quality <code>expected<T, E></code>
|
||||
implementation rather than anything similar but not the same which Outcome had invented.
|
||||
The only just implemented Expected implementation based on <code>basic_monad</code> therefore took
|
||||
primacy. The final rewrite of the documentation before peer review submission was one
|
||||
which made it look like Outcome was primarily an <code>expected<T, E></code> implementation with a
|
||||
few useful extensions like <code>outcome<T></code> and <code>result<T></code>. I was sad to so pivot, but it
|
||||
was obvious that Outcome would see far wider popularity and usage as primarily an Expected
|
||||
implementation.</p>
|
||||
|
||||
<p>Almost three years after its beginning, Outcome v1 finally went before Boost peer review
|
||||
in May 2017 which turned into one of the longest and most detailed peer reviews Boost has
|
||||
done in recent years, with over 800 pieces of review feedback submitted. It was by consensus
|
||||
rejected, <a href="https://lists.boost.org/boost-announce/2017/06/0510.php">with substantial feedback on what to do instead</a>.</p>
|
||||
|
||||
<h2 id="outcome-v2">Outcome v2</h2>
|
||||
|
||||
<p>During the very lengthy peer review, roughly three groups of opinion emerged as to what
|
||||
a <code>value|error</code> transporting class ought to look like:</p>
|
||||
|
||||
<dl>
|
||||
<dt><b>1. Lightweight</b></dt>
|
||||
<dd>A simple-as-possible <code>T</code> and/or <code>E</code> transport without any
|
||||
implementation complexity.</dd>
|
||||
<dt><b>2. Medium</b></dt>
|
||||
<dd>A variant stored <code>T</code> or <code>E1</code> ... <code>E<i>n</i></code>
|
||||
where <code>T</code> is the expected value and <code>E1 ...</code>
|
||||
are the potential unexpected values. This implemention really ought to be implemented
|
||||
using C++ 17's <code>std::variant<...></code> except with stronger never-empty guarantees.
|
||||
</dd>
|
||||
<dt><b>3. Heavy</b></dt>
|
||||
<dd>A full fat Either monad participating fully in a wider monadic programming framework for C++.</dd>
|
||||
</dl>
|
||||
|
||||
<p>Peter Dimov was very quickly able to implement an <code>expected<T, E1, ...></code> using his
|
||||
<a href="https://github.com/pdimov/variant2">variant2</a> library, and thus there seemed little
|
||||
point in replicating his work in an Outcome v2. The lightweight choice seemed to be the
|
||||
best path forwards, so in June 2017 the bare minimum <code>result<T, E></code> and <code>outcome<T, EC, P></code>
|
||||
as presented in this library was built, using the same constructor design as <code>std::variant<...></code>.
|
||||
Significant backwards compatibility with v1 Outcome code was retained, as the review
|
||||
had felt the basic proposed design fine.</p>
|
||||
|
||||
<p>A period of maturation then followed by porting a large existing codebase using Outcome v1
|
||||
to v2, and writing a significant amount of new code using v2 to test it for unanticipated
|
||||
surprises and bugs. Quite a few corner cases were found and fixed. At the end of September
|
||||
2017, Outcome v2 was deemed to be “mature”, and a script generated “Boost edition” made
|
||||
available.</p>
|
||||
|
||||
<p>All that remained before it was ready for a second Boost peer review was the
|
||||
documentation. This took four months to write (same time as to write the library itself!),
|
||||
and in January 2018 Outcome had its second Boost peer review, which it passed!</p>
|
||||
|
||||
<h2 id="outcome-v2-1">Outcome v2.1</h2>
|
||||
|
||||
<p>The changes requsted during the review of v2.0 were fairly modest: <code>result</code> and <code>outcome</code> would
|
||||
be renamed to <code>basic_result</code> and <code>basic_outcome</code>, and a clean separation of concerns between the
|
||||
<code>basic_*</code> layer and the “convenience” layer would be created. That suited Outcome nicely,
|
||||
as the <code>basic_*</code> layer could have minimum possible header dependencies and thus minimum possible build times
|
||||
impact, which was great for big iron users with multi-million line C++ codebases. This also
|
||||
had the nice side effect of permitting both Boost and <code>std</code> implementations to be supported
|
||||
concurrently in both Outcome and Boost.Outcome.</p>
|
||||
|
||||
<p>By April 2018, v2.1 was feature complete and entered a six month period of maturation and
|
||||
battle hardening under its already extensive userbase. However Outcome passing its review in January 2018 had much more consequence than I could have ever
|
||||
expected. Unbeknownst to me, some of the WG21 leadership had interpreted the success of
|
||||
Outcome, and especially its divergences from WG21 Expected into a more complete substitute
|
||||
for C++ exception handling, as a sign that the C++
|
||||
exception handling mechanism was no longer fit for purpose. <a href="http://wg21.link/P0709">It was thus proposed
|
||||
to remedy the standard exception handling mechanism into something much more
|
||||
efficient, thus rendering Outcome obsolete in future C++ standards (P0709 <em>Zero overhead exceptions</em> aka “Herbceptions”)</a>.</p>
|
||||
|
||||
<p>Concurrently to that, just before the review of Outcome 2.0, I had mooted a number of semantic and compile time performance
|
||||
improvements to <code><system_error></code> with the proposal that we mildly break Boost.System with
|
||||
improvements and see how badly real world code broke in response. This was not widely
|
||||
accepted at that time (though they have been since incorporated into Boost.System, and proposed
|
||||
defect remedies for <code><system_error></code> for C++ 23). I therefore wrote <a href="https://ned14.github.io/status-code/">an improved <code><system_error2></code></a> which fixed all the problems
|
||||
listed at <a href="https://wg21.link/P0824">P0824 (Summary of SG14 discussion on <code><system_error></code>)</a>
|
||||
and fixed up Outcome so one could use it without any system error implementation,
|
||||
or with the STL one or with the proposed improved one.</p>
|
||||
|
||||
<p>This proposed improved <code><system_error2></code> was proposed by me as the library support for
|
||||
P0709 <em>Zero overhead exceptions</em> in <a href="https://wg21.link/P1095">P1095 <em>Zero overhead deterministic failure</em></a>,
|
||||
specifically as the implementation of P0709’s proposed <code>std::error</code> value type. As
|
||||
proposed improved <code><system_error2></code> is bundled with Outcome in
|
||||
<a href="./experimental.html">experimental</a>, that means that Outcome and Boost
|
||||
users can gain the non-language benefits of one possible implementation of P0709
|
||||
today in any conforming C++ 14 compiler.</p>
|
||||
|
||||
<p>At the time of writing, just before Outcome enters Boost (January 2019), Herbceptions have
|
||||
been voted upon only by SG14 Low Latency and LEWG, both giving unanimous acclamation. They have yet to be voted upon by the
|
||||
rest of the committee. The P1095 proposed implementation of P0709 has been voted upon by
|
||||
WG14 <em>C Programming Language</em>, where the C-relevant parts were approved in principle by a large majority. So
|
||||
the future currently looks hopeful that C, and C++, will gain language support for
|
||||
specifying deterministic failure sometime in the 2020s.</p>
|
||||
|
||||
<p>In the meantime, Outcome is a peer reviewed, battle tested, library-only implementation
|
||||
of <em>Zero overhead exceptions</em> with proposed <code>std::error</code> available under Experimental.
|
||||
Please strongly consider helping us test the proposed <code><system_error2></code> based <code>std::error</code>
|
||||
design! The committee would greatly welcome empirical experience.</p>
|
||||
|
||||
|
||||
|
||||
</div><p><small>Last revised: February 11, 2019 at 17:43:30 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="./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>
|
||||
BIN
doc/html/history/graph.png
Normal file
|
After Width: | Height: | Size: 75 KiB |
BIN
doc/html/images/boost.png
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
BIN
doc/html/images/caution.png
Normal file
|
After Width: | Height: | Size: 7.3 KiB |