586 lines
36 KiB
HTML
586 lines
36 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<title>Changelog - Boost.Outcome documentation</title>
|
|
<link rel="stylesheet" href="./css/boost.css" type="text/css">
|
|
<meta name="generator" content="Hugo 0.52 with Boostdoc theme">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1.0"/>
|
|
|
|
<link rel="icon" href="./images/favicon.ico" type="image/ico"/>
|
|
<body><div class="spirit-nav">
|
|
<a accesskey="p" href="./videos.html"><img src="./images/prev.png" alt="Prev"></a>
|
|
<a accesskey="u" href="./index.html"><img src="./images/up.png" alt="Up"></a>
|
|
<a accesskey="h" href="./index.html"><img src="./images/home.png" alt="Home"></a><a accesskey="n" href="./changelog/upgrade_v21_v22.html"><img src="./images/next.png" alt="Next"></a></div><div id="content">
|
|
|
|
<div class="titlepage"><div><div><h1 style="clear: both">Changelog</h1></div></div></div>
|
|
<div class="toc"><dl class="toc">
|
|
<dt>
|
|
<dd><dl>
|
|
<dt><a href="#v2-2-0-boost-1-76-release-https-github-com-ned14-outcome-releases-tag-v2-2-0">v2.2.0 ? (Boost 1.76) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.0">[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-5-11th-december-2020-boost-1-75-release-https-github-com-ned14-outcome-releases-tag-v2-1-5">v2.1.5 11th December 2020 (Boost 1.75) <a href="https://github.com/ned14/outcome/releases/tag/v2.1.5">[release]</a></a>
|
|
<dd><dl>
|
|
<dt><a href="#enhancements-1">Enhancements:</a></dt>
|
|
<dt><a href="#bug-fixes-1">Bug fixes:</a></dt>
|
|
</dl></dd></dt>
|
|
<dt><a href="#v2-1-4-14th-august-2020-boost-1-74-release-https-github-com-ned14-outcome-releases-tag-v2-1-4">v2.1.4 14th August 2020 (Boost 1.74) <a href="https://github.com/ned14/outcome/releases/tag/v2.1.4">[release]</a></a>
|
|
<dd><dl>
|
|
<dt><a href="#enhancements-2">Enhancements:</a></dt>
|
|
<dt><a href="#bug-fixes-2">Bug fixes:</a></dt>
|
|
</dl></dd></dt>
|
|
<dt><a href="#v2-1-3-29th-april-2020-boost-1-73-release-https-github-com-ned14-outcome-releases-tag-v2-1-3">v2.1.3 29th April 2020 (Boost 1.73) <a href="https://github.com/ned14/outcome/releases/tag/v2.1.3">[release]</a></a>
|
|
<dd><dl>
|
|
<dt><a href="#enhancements-3">Enhancements:</a></dt>
|
|
<dt><a href="#bug-fixes-3">Bug fixes:</a></dt>
|
|
</dl></dd></dt>
|
|
<dt><a href="#v2-1-2-11th-december-2019-boost-1-72-release-https-github-com-ned14-outcome-releases-tag-v2-1-2">v2.1.2 11th December 2019 (Boost 1.72) <a href="https://github.com/ned14/outcome/releases/tag/v2.1.2">[release]</a></a>
|
|
<dd><dl>
|
|
<dt><a href="#enhancements-4">Enhancements:</a></dt>
|
|
<dt><a href="#bug-fixes-4">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-5">Enhancements:</a></dt>
|
|
<dt><a href="#bug-fixes-5">Bug fixes:</a></dt>
|
|
</dl></dd></dt>
|
|
<dt><a href="#v2-1-12th-apr-2019-boost-1-70-release-https-github-com-ned14-outcome-releases-tag-v2-1">v2.1 12th Apr 2019 (Boost 1.70) <a href="https://github.com/ned14/outcome/releases/tag/v2.1">[release]</a></a></dt>
|
|
<dt><a href="#v2-0-18th-jan-2018-release-https-github-com-ned14-outcome-releases-tag-v2-0-boost-peer-review">v2.0 18th Jan 2018 <a href="https://github.com/ned14/outcome/releases/tag/v2.0-boost-peer-review">[release]</a></a></dt>
|
|
</dl></dd></dt>
|
|
</dl>
|
|
</div>
|
|
|
|
|
|
<hr />
|
|
|
|
<h2 id="v2-2-0-boost-1-76-release-https-github-com-ned14-outcome-releases-tag-v2-2-0">v2.2.0 ? (Boost 1.76) <a href="https://github.com/ned14/outcome/releases/tag/v2.2.0">[release]</a></h2>
|
|
|
|
<dl>
|
|
<dt>BREAKING CHANGE As announced for a year and three Boost releases, Outcome v2.2 became the default, replacing v2.1.</dt>
|
|
<dd>All v2.1 Outcome code will need to be upgraded as described in <a href="./changelog/upgrade_v21_v22.html">the v2.1 => v2.2 upgrade guide</a>.
|
|
This branch has a number of major breaking changes to Outcome v2.1, see
|
|
<a href="./changelog/v22.html">the list of v2.2 major changes</a>.</dd>
|
|
</dl>
|
|
|
|
<h3 id="enhancements">Enhancements:</h3>
|
|
|
|
<dl>
|
|
<dt>VS2019.8 compatibility</dt>
|
|
<dd>VS2019.8 changed how to enable Coroutines, which caused Outcome to not compile on that compiler.</dd>
|
|
<dt><a href="https://github.com/ned14/outcome/issues/237">#237</a></dt>
|
|
<dd>If on C++ 20, we now use C++ 20 <code>[[likely]]</code> instead of compiler-specific markup to indicate
|
|
when TRY has likely success or failure.</dd>
|
|
<dt>BREAKING CHANGE <a href="https://github.com/ned14/outcome/issues/247">#247</a></dt>
|
|
<dd><p>Previously the value of <a href="./reference/functions/hooks/spare_storage.html" class="api-reference"><code>spare_storage(const basic_result|basic_outcome *) noexcept</code></a>
|
|
was
|
|
not propagated over <code>BOOST_OUTCOME_TRY</code>, which causes things like stack backtraces captured at the point of
|
|
construction of an errored result to get dropped at every <code>TRY</code> point. This has been fixed by adding
|
|
an optional <code>spare_storage</code> to <a href="./reference/types/success_type.html" class="api-reference"><code>success_type<T></code></a>
|
|
and <a href="./reference/traits/is_failure_type.html" class="api-reference"><code>failure_type<T></code></a>
|
|
, as well
|
|
as to <a href="./reference/functions/success.html" class="api-reference"><code>auto success(T &&, ...)</code></a>
|
|
and <a href="./reference/functions/failure.html" class="api-reference"><code>auto failure(T &&, ...)</code></a>
|
|
.</p>
|
|
|
|
<p>You should not notice this in your code, except that where before spare storage values did not
|
|
propagate through TRY, now they do, which is a breaking change.</p></dd>
|
|
</dl>
|
|
|
|
<h3 id="bug-fixes">Bug fixes:</h3>
|
|
|
|
<dl>
|
|
<dt>BREAKING CHANGE <a href="https://github.com/ned14/outcome/issues/244">#244</a></dt>
|
|
<dd><p>It came as a shock to learn that <code>BOOST_OUTCOME_TRY</code> had been broken since the inception of this
|
|
library for certain corner case code:</p>
|
|
<div class="highlight"><pre class="chroma"><code class="language-c++" data-lang="c++"><span class="n">outcome</span><span class="o">::</span><span class="n">result</span><span class="o"><</span><span class="n">Foo</span><span class="o">></span> <span class="n">get_foo</span><span class="p">();</span>
|
|
<span class="n">outcome</span><span class="o">::</span><span class="n">result</span><span class="o"><</span><span class="n">Foo</span><span class="o">></span> <span class="n">filter1</span><span class="p">(</span><span class="n">outcome</span><span class="o">::</span><span class="n">result</span><span class="o"><</span><span class="n">Foo</span><span class="o">></span> <span class="o">&&</span><span class="p">);</span>
|
|
<span class="n">outcome</span><span class="o">::</span><span class="n">result</span><span class="o"><</span><span class="n">Foo</span><span class="o">></span> <span class="o">&&</span> <span class="n">filter2</span><span class="p">(</span><span class="n">outcome</span><span class="o">::</span><span class="n">result</span><span class="o"><</span><span class="n">Foo</span><span class="o">></span> <span class="o">&&</span><span class="p">);</span>
|
|
|
|
<span class="c1">// This works fine, and always has
|
|
</span><span class="c1"></span><span class="n">BOOST_OUTCOME_TRY</span><span class="p">(</span><span class="k">auto</span> <span class="n">v</span><span class="p">,</span> <span class="n">filter1</span><span class="p">(</span><span class="n">get_foo</span><span class="p">()))</span>
|
|
|
|
<span class="c1">// This causes UB due to result<Foo> being destructed before move of value into v
|
|
</span><span class="c1"></span><span class="n">BOOST_OUTCOME_TRY</span><span class="p">(</span><span class="k">auto</span> <span class="n">v</span><span class="p">,</span> <span class="n">filter2</span><span class="p">(</span><span class="n">get_foo</span><span class="p">()))</span>
|
|
</code></pre></div>
|
|
<p>Whilst reference passthrough filter functions are not common, they can turn up in highly generic
|
|
code, where destruction before copy/move is not helpful.</p>
|
|
|
|
<p>The cause is that TRY used to work by binding the result of the expression to an <code>auto &&unique</code>,
|
|
testing if that unique if successful or not, and if successful then moving from <code>unique.value()</code>
|
|
into the user’s output variable. If the expression returned is a prvalue, the Result’s lifetime is
|
|
extended by the bound reference to outside of the statement, and all is good. If the expression
|
|
returned is an xvalue or lvalue, then the lifetime extension does not exceed that of the statement,
|
|
and the Result is destructed after the semicolon succeeding the assignment to <code>auto &&unique</code>.</p>
|
|
|
|
<p>This bug has been fixed by TRY deducing the <a href="https://en.cppreference.com/w/cpp/language/value_category">value category</a>
|
|
of its input expression as follows:</p>
|
|
|
|
<ul>
|
|
<li>prvalues => <code>auto unique = (expr)</code> (breaking change)</li>
|
|
<li>xvalue => <code>auto unique = (expr)</code> (breaking change)</li>
|
|
<li>lvalue => <code>auto unique = (expr)</code> (breaking change)</li>
|
|
</ul>
|
|
|
|
<p>This ensures that xvalue and lvalue inputs do not cause unhelpfully early lifetime end, though it
|
|
does silently change the behaviour of existing code which relied on rvalues and lvalues being passed
|
|
through, as a new construct-move-destruct or construct-copy-destruct cycle is introduced to where
|
|
there was none before. Also, before C++ 17, there is now an added copy/move for prvalue inputs,
|
|
which does not affect runtime codegen due to Return Value Optimisation (RVO), but does cause
|
|
Results containing non-copying non-moving types to fail to compile, which is a breaking change
|
|
from beforehand.</p>
|
|
|
|
<p>If one wishes rvalues or lvalues to be passed through, one can avail of a new TRY syntax based on
|
|
preprocessor overloading:</p>
|
|
|
|
<ul>
|
|
<li><code>BOOST_OUTCOME_TRY((refspec, varname), expr)</code></li>
|
|
<li><code>BOOST_OUTCOME_TRYV2(refspec, expr)</code></li>
|
|
</ul>
|
|
|
|
<p>Here <code>refspec</code> is the storage to be used for <strong>both</strong> the internal temporary unique, AND <code>varname</code>.
|
|
So if you write:</p>
|
|
<div class="highlight"><pre class="chroma"><code class="language-c++" data-lang="c++"><span class="n">Foo</span> <span class="o">&&</span><span class="n">foo</span><span class="p">;</span>
|
|
<span class="n">BOOST_OUTCOME_TRY</span><span class="p">((</span><span class="k">auto</span> <span class="o">&&</span><span class="p">,</span> <span class="n">v</span><span class="p">),</span> <span class="n">filter2</span><span class="p">(</span><span class="n">foo</span><span class="p">))</span>
|
|
</code></pre></div>
|
|
<p>… then the internal unique is declared as <code>auto &&unique = (filter2(foo))</code>, and the output variable
|
|
is declared as <code>auto &&v = std::move(unique).assume_value()</code>. This passes through the rvalue referencing,
|
|
and completely avoids copies and moves of <code>Foo</code>. If you wish to not extract the value but also
|
|
specify unique storage, there is a new <code>BOOST_OUTCOME_TRYV2(refspec, expr)</code>.</p>
|
|
|
|
<p>My thanks to KamilCuk from <a href="https://stackoverflow.com/questions/66069152/token-detection-within-a-c-preprocessor-macro-argument">https://stackoverflow.com/questions/66069152/token-detection-within-a-c-preprocessor-macro-argument</a>
|
|
for all their help in designing the new overloaded TRY syntax. My thanks also to vasama for reporting this
|
|
issue and working through how best to fix it with me.</p></dd>
|
|
<dt><a href="https://github.com/ned14/outcome/issues/249">#249</a></dt>
|
|
<dd><p>The preprocessor logic for choosing when to use <code>bool</code> with <code>concept</code> on GCC was yet again refactored.
|
|
This should fix those choices of GCC configuration which caused failure due to the wrong combination
|
|
being chosen.</p></dd>
|
|
</dl>
|
|
|
|
<hr />
|
|
|
|
<h2 id="v2-1-5-11th-december-2020-boost-1-75-release-https-github-com-ned14-outcome-releases-tag-v2-1-5">v2.1.5 11th December 2020 (Boost 1.75) <a href="https://github.com/ned14/outcome/releases/tag/v2.1.5">[release]</a></h2>
|
|
|
|
<h3 id="enhancements-1">Enhancements:</h3>
|
|
|
|
<dl>
|
|
<dt><a href="./tutorial/advanced/hooks.html">The ADL discovered event hooks</a> have been replaced with policy-specified event hooks instead</dt>
|
|
<dd>This is due to brittleness (where hooks would quietly
|
|
self-disable if somebody changed something), compiler bugs (a difference in compiler settings causes
|
|
the wrong hooks, or some but not all hooks, to get discovered), and end user difficulty in using
|
|
them at all. The policy-specified event hooks can be told to default to ADL discovered hooks for
|
|
backwards compatibility: set <a href="./reference/macros/enable_legacy_support_for.html" class="api-reference"><code>BOOST_OUTCOME_ENABLE_LEGACY_SUPPORT_FOR</code></a>
|
|
to less than <code>220</code> to
|
|
enable emulation.</dd>
|
|
<dt>Improve configuring <code>BOOST_OUTCOME_GCC6_CONCEPT_BOOL</code></dt>
|
|
<dd>Older GCCs had boolean based concepts syntax, whereas newer GCCs are standards conforming.
|
|
However the precise logic of when to use legacy and conforming syntax was not well understood,
|
|
which caused Outcome to fail to compile depending on what options you pass to GCC. The new logic
|
|
always uses the legacy syntax if on GCC 8 or older, otherwise we use conforming syntax if and
|
|
only if GCC is in C++ 20 mode or later. This hopefully will resolve the corner case build
|
|
failures on GCC.</dd>
|
|
</dl>
|
|
|
|
<h3 id="bug-fixes-1">Bug fixes:</h3>
|
|
|
|
<dl>
|
|
<dt>Boost.Outcome should now compile with <code>BOOST_NO_EXCEPTIONS</code> defined</dt>
|
|
<dd>Thanks to Emil, maintainer of Boost.Exception, making a change for me, Boost.Outcome
|
|
should now compile with C++ exceptions globally disabled. You won’t be able to use
|
|
<code>boost::exception_ptr</code> as it can’t be included if C++ exceptions are globally disabled.</dd>
|
|
<dt><a href="https://github.com/ned14/outcome/issues/236">#236</a></dt>
|
|
<dd>In the Coroutine support the <code>final_suspend()</code> was not <code>noexcept</code>, despite being required
|
|
to be so in the C++ 20 standard. This has been fixed, but only if your compiler implements
|
|
<code>noop_coroutine</code>. Additionally, if <code>noop_coroutine</code> is available, we use the much more
|
|
efficient coroutine handle returning variant of <code>await_suspend()</code> which should significantly
|
|
improve codegen and context switching performance.</dd>
|
|
</dl>
|
|
|
|
<hr />
|
|
|
|
<h2 id="v2-1-4-14th-august-2020-boost-1-74-release-https-github-com-ned14-outcome-releases-tag-v2-1-4">v2.1.4 14th August 2020 (Boost 1.74) <a href="https://github.com/ned14/outcome/releases/tag/v2.1.4">[release]</a></h2>
|
|
|
|
<h3 id="enhancements-2">Enhancements:</h3>
|
|
|
|
<dl>
|
|
<dt>BREAKING CHANGE <code>void</code> results and outcomes no longer default construct types during explicit construction</dt>
|
|
<dd>Previously if you explicitly constructed a <code>result<T></code> from a non-errored
|
|
<code>result<void></code>, it default constructed <code>T</code>. This was found to cause unhelpful
|
|
surprise, so it has been disabled.</dd>
|
|
<dt>New macro <code>BOOST_OUTCOME_ENABLE_LEGACY_SUPPORT_FOR</code></dt>
|
|
<dd>The macro <a href="./reference/macros/enable_legacy_support_for.html" class="api-reference"><code>BOOST_OUTCOME_ENABLE_LEGACY_SUPPORT_FOR</code></a>
|
|
can be used to
|
|
enable aliasing of older naming and features to newer naming and features when
|
|
using a newer version of Outcome.</dd>
|
|
<dt>Concepts now have snake case style naming instead of camel case style</dt>
|
|
<dd>When Outcome was first implemented, it was thought that C++ 20 concepts were
|
|
going to have camel case style. This was changed before the C++ 20 release, and
|
|
Outcome’s concepts have been renamed similarly. This won’t break any code in
|
|
Outcome v2.1, as compatibility aliases are provided. However code compiled
|
|
against Outcome v2.2 will need to be upgraded, unless <code>BOOST_OUTCOME_ENABLE_LEGACY_SUPPORT_FOR</code>
|
|
is set to less than <code>220</code>.</dd>
|
|
<dt>Concepts now live in <code>BOOST_OUTCOME_V2_NAMESPACE::concepts</code> namespace</dt>
|
|
<dd>Previously concepts lived in the <code>convert</code> namespace, now they live in their
|
|
own namespace.</dd>
|
|
<dt>New concepts <a href="./reference/concepts/basic_result.html" class="api-reference"><code>basic_result<T></code></a>
|
|
and <a href="./reference/concepts/basic_outcome.html" class="api-reference"><code>basic_outcome<T></code></a>
|
|
added</dt>
|
|
<dd>End users were finding an unhelpful gap in between <a href="./reference/traits/is_basic_result.html" class="api-reference"><code>is_basic_result<T></code></a>
|
|
|
|
and <a href="./reference/concepts/value_or_error.html" class="api-reference"><code>value_or_error<T></code></a>
|
|
where they wanted a concept that matched
|
|
types which were <code>basic_result</code>, but not exactly one of those. Concepts filling
|
|
that gap were added.</dd>
|
|
<dt>Operation <code>TRY</code> works differently from Outcome v2.2 onwards</dt>
|
|
<dd>This is a severely code breaking change which change the syntax of how one uses
|
|
<code>BOOST_OUTCOME_TRY()</code>. A regular expression suitable for upgrading code can be found in
|
|
the list of changes between Outcome v2.1 and v2.2.</dd>
|
|
</dl>
|
|
|
|
<h3 id="bug-fixes-2">Bug fixes:</h3>
|
|
|
|
<dl>
|
|
<dt><a href="https://github.com/ned14/outcome/issues/224">#224</a></dt>
|
|
<dd>The clang Apple ships in Xcode 11.4 (currently the latest) has not been patched
|
|
with the fixes to LLVM clang that fix <code>noexcept(std::is_constructible<T, void>)</code>
|
|
failing to compile which I originally submitted years ago. So give up waiting on
|
|
Apple to fix their clang, add a workaround to Outcome.</dd>
|
|
<dt>Use of <code>void</code> in <code>T</code> or <code>E</code> caused <code>noexcept(false)</code></dt>
|
|
<dd>Direct traits examination of <code>void</code> was causing nothrow detection to return false,
|
|
fixed.</dd>
|
|
<dt>Spare storage could not be used from within no-value policy classes</dt>
|
|
<dd>Due to an obvious brain fart when writing the code at the time, the spare storage
|
|
APIs had the wrong prototype which prevented them working from within policy classes.
|
|
Sorry.</dd>
|
|
</dl>
|
|
|
|
<hr />
|
|
|
|
<h2 id="v2-1-3-29th-april-2020-boost-1-73-release-https-github-com-ned14-outcome-releases-tag-v2-1-3">v2.1.3 29th April 2020 (Boost 1.73) <a href="https://github.com/ned14/outcome/releases/tag/v2.1.3">[release]</a></h2>
|
|
|
|
<h3 id="enhancements-3">Enhancements:</h3>
|
|
|
|
<dl>
|
|
<dt>Performance of Outcome-based code compiled by clang has been greatly improved</dt>
|
|
<dd><p>The previous implementation of Outcome’s status bitfield confused clang’s
|
|
optimiser, which caused low quality codegen. Unlike most codegen issues, this was
|
|
noticeably in empirical benchmarks of real world code, as was shown by
|
|
<a href="https://wg21.link/P1886">P1886 <em>Error speed benchmarking</em></a>.</p>
|
|
|
|
<p>The safe part of the <a href="https://github.com/ned14/outcome/tree/better_optimisation"><code>better_optimisation</code></a>
|
|
Outcome v2.2.0 future branch was merged to Outcome v2.1.3 which includes a new
|
|
status bitfield implementation. This appears to not confuse clang’s optimiser,
|
|
and clang 9 produces code which routinely beats GCC 9’s code for various canned
|
|
use cases.</p></dd>
|
|
<dt>Precompiled headers are automatically enabled on new enough cmake’s for standalone Outcome</dt>
|
|
<dd><p>If on cmake 3.16 or later, its new precompiled headers build support is used
|
|
to tell consumers of the <code>outcome::hl</code> cmake target to precompile Outcome, <strong>if
|
|
and only if</strong> <code>PROJECT_IS_DEPENDENCY</code> is false. <code>PROJECT_IS_DEPENDENCY</code> is set
|
|
by Outcome’s CMakeLists.txt if it detects that it was included using
|
|
<code>add_subdirectory()</code>, so for the vast majority of Outcome end users, the use
|
|
of precompiled headers will NOT be enabled.</p>
|
|
|
|
<p>Exported targets do NOT request precompilation of headers, as it is
|
|
assumed that importers of the Outcome cmake targets will configure their own
|
|
precompiled headers which incorporate Outcome.</p></dd>
|
|
<dt>Installability is now CI tested per commit</dt>
|
|
<dd><p>Due to installability of standalone Outcome (e.g. <code>make install</code>) breaking
|
|
itself rather more frequently than is ideal, installability is now tested on CI
|
|
per commit.</p></dd>
|
|
<dt>Coroutines support has been documented</dt>
|
|
<dd><p>The coroutines support added in v2.1.2 has now been properly documented.</p></dd>
|
|
</dl>
|
|
|
|
<h3 id="bug-fixes-3">Bug fixes:</h3>
|
|
|
|
<dl>
|
|
<dt><a href="https://github.com/ned14/outcome/issues/214">#214</a></dt>
|
|
<dd>Newer Concepts implementing compilers were unhappy with the early check for
|
|
destructibility of <code>T</code> and <code>E</code>, so removed template constraints, falling back
|
|
to static assert which runs later in the type instantiation sequence.</dd>
|
|
<dt><a href="https://github.com/ned14/outcome/issues/215">#215</a></dt>
|
|
<dd>For standalone Outcome, <code>CMAKE_TOOLCHAIN_FILE</code> is now passed through during
|
|
dependency superbuild. This should solve build issues for some embedded toolchain
|
|
users.</dd>
|
|
<dt><a href="https://github.com/ned14/outcome/issues/220">#220</a></dt>
|
|
<dd>A false positive undefined behaviour sanitiser failure in some use cases of
|
|
Experimental Outcome was worked around to avoid the failure message.</dd>
|
|
<dt><a href="https://github.com/ned14/outcome/issues/221">#221</a></dt>
|
|
<dd>Restored compatibility with x86 on Windows, which was failing with link errors.
|
|
It was quite surprising that this bug was not reported sooner, but obviously
|
|
almost nobody is using Outcome with x86 on Windows.</dd>
|
|
<dt><a href="https://github.com/ned14/outcome/issues/223">#223</a></dt>
|
|
<dd>Fix a segfault in Debug builds only when cloning a <code>status_code_ptr</code> in
|
|
Experimental.Outcome only.</dd>
|
|
</dl>
|
|
|
|
<hr />
|
|
|
|
<h2 id="v2-1-2-11th-december-2019-boost-1-72-release-https-github-com-ned14-outcome-releases-tag-v2-1-2">v2.1.2 11th December 2019 (Boost 1.72) <a href="https://github.com/ned14/outcome/releases/tag/v2.1.2">[release]</a></h2>
|
|
|
|
<h3 id="enhancements-4">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>Non-permissive parsing is now default in Visual Studio</dt>
|
|
<dd>The default targets in standalone Outcome’s cmake now enable non-permissive parsing.
|
|
This was required partially because VS2019 16.3’s quite buggy Concepts implementation is
|
|
unusuable in permissive parsing mode. Even then, lazy ADL two phase lookup is broken
|
|
in VS2019 16.3 with <code>/std:latest</code>, you may wish to use an earlier language standard.</dd>
|
|
<dt><strong>Breaking change!</strong></dt>
|
|
<dd>The git submodule mechanism used by standalone Outcome of specifying dependent libraries
|
|
has been replaced with a cmake superbuild of dependencies mechanism instead. Upon cmake
|
|
configure, an internal copy of quickcpplib will be git cloned, built and installed into the
|
|
build directory from where an internal <code>find_package()</code> uses it. This breaks the use of
|
|
the unconfigured Outcome repo as an implementation of Outcome, one must now do one of:
|
|
|
|
<ol>
|
|
<li>Add Outcome as subdirectory to cmake build.</li>
|
|
<li>Use cmake superbuild (i.e. <code>ExternalProject_Add()</code>) to build and install Outcome into
|
|
a local installation.</li>
|
|
<li>Use one of the single header editions.</li>
|
|
</ol></dd>
|
|
<dt><strong>Breaking change!</strong></dt>
|
|
<dd>For standalone Outcome, the current compiler is now checked for whether it will compile
|
|
code containing C++ Concepts, and if it does, all cmake consumers of Outcome will enable
|
|
C++ Concepts. Set the cmake variable <code>BOOST_OUTCOME_C_CONCEPTS_FLAGS</code> to an empty string to prevent
|
|
auto detection and enabling of C++ Concepts support occurring.</dd>
|
|
<dt><code>BOOST_OUTCOME_TRY</code> operation now hints to the compiler that operation will be successful</dt>
|
|
<dd><a href="https://wg21.link/P1886">P1886 <em>Error speed benchmarking</em></a> showed that there is
|
|
considerable gain in very small functions by hinting to the compiler whether the expression
|
|
is expected to be successful or not. <code>BOOST_OUTCOME_TRY</code> previously did not hint to the compiler
|
|
at all, but now it does. A new suite of macros <code>BOOST_OUTCOME_TRY_FAILURE_LIKELY</code> hint to the
|
|
compiler that failure is expected. If you wish to return to the previously unhinted
|
|
behaviour, define <code>BOOST_OUTCOME_TRY_LIKELY(expr)</code> to <code>(!!expr)</code>.</dd>
|
|
<dt><a href="https://github.com/ned14/outcome/issues/199">#199</a></dt>
|
|
<dd>Support for C++ Coroutines has been added. This comes in two parts, firstly there is
|
|
now an <code>BOOST_OUTCOME_CO_TRY()</code> operation suitable for performing the <code>TRY</code> operation from
|
|
within a C++ Coroutine. Secondly, in the header <code>outcome/coroutine_support.hpp</code> there are
|
|
implementations of <code>eager<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-4">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-5">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-5">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: March 29, 2021 at 14:58:28 +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="./changelog/upgrade_v21_v22.html"><img src="./images/next.png" alt="Next"></a></div></body>
|
|
</html>
|