Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / outcome / doc / html / changelog.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
3 <title>Changelog - Boost.Outcome documentation</title>
4 <link rel="stylesheet" href="./css/boost.css" type="text/css">
5 <meta name="generator" content="Hugo 0.52 with Boostdoc theme">
6 <meta name="viewport" content="width=device-width,initial-scale=1.0"/>
7
8 <link rel="icon" href="./images/favicon.ico" type="image/ico"/>
9 <body><div class="spirit-nav">
10 <a accesskey="p" href="./videos.html"><img src="./images/prev.png" alt="Prev"></a>
11     <a accesskey="u" href="./index.html"><img src="./images/up.png" alt="Up"></a>
12     <a accesskey="h" href="./index.html"><img src="./images/home.png" alt="Home"></a><a accesskey="n" href="./history.html"><img src="./images/next.png" alt="Next"></a></div><div id="content">
13
14   <div class="titlepage"><div><div><h1 style="clear: both">Changelog</h1></div></div></div>
15   <div class="toc"><dl class="toc">
16 <dt>
17 <dd><dl>
18 <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>
19 <dd><dl>
20 <dt><a href="#enhancements">Enhancements:</a></dt>
21 <dt><a href="#bug-fixes">Bug fixes:</a></dt>
22 </dl></dd></dt>
23 <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>
24 <dd><dl>
25 <dt><a href="#enhancements-1">Enhancements:</a></dt>
26 <dt><a href="#bug-fixes-1">Bug fixes:</a></dt>
27 </dl></dd></dt>
28 <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>
29 <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>
30 </dl></dd></dt>
31 </dl>
32   </div>
33
34
35 <hr />
36
37 <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>
38
39 <h3 id="enhancements">Enhancements:</h3>
40
41 <dl>
42 <dt>Improved compatibility with cmake tooling</dt>
43 <dd>Standalone outcome is now <code>make install</code>-able, and cmake <code>find_package()</code> can find it.
44 Note that you must separately install and <code>find_package()</code> Outcome&rsquo;s dependency, quickcpplib,
45 else <code>find_package()</code> of Outcome will fail.</dd>
46 <dt>Non-permissive parsing is now default in Visual Studio</dt>
47 <dd>The default targets in standalone Outcome&rsquo;s cmake now enable non-permissive parsing.
48 This was required partially because VS2019 16.3&rsquo;s quite buggy Concepts implementation is
49 unusuable in permissive parsing mode. Even then, lazy ADL two phase lookup is broken
50 in VS2019 16.3 with <code>/std:latest</code>, you may wish to use an earlier language standard.</dd>
51 <dt><strong>Breaking change!</strong></dt>
52 <dd>The git submodule mechanism used by standalone Outcome of specifying dependent libraries
53 has been replaced with a cmake superbuild of dependencies mechanism instead. Upon cmake
54 configure, an internal copy of quickcpplib will be git cloned, built and installed into the
55 build directory from where an internal <code>find_package()</code> uses it. This breaks the use of
56 the unconfigured Outcome repo as an implementation of Outcome, one must now do one of:
57
58 <ol>
59 <li>Add Outcome as subdirectory to cmake build.</li>
60 <li>Use cmake superbuild (i.e. <code>ExternalProject_Add()</code>) to build and install Outcome into
61 a local installation.</li>
62 <li>Use one of the single header editions.</li>
63 </ol></dd>
64 <dt><strong>Breaking change!</strong></dt>
65 <dd>For standalone Outcome, the current compiler is now checked for whether it will compile
66 code containing C++ Concepts, and if it does, all cmake consumers of Outcome will enable
67 C++ Concepts. Set the cmake variable <code>BOOST_OUTCOME_C_CONCEPTS_FLAGS</code> to an empty string to prevent
68 auto detection and enabling of C++ Concepts support occurring.</dd>
69 <dt><code>BOOST_OUTCOME_TRY</code> operation now hints to the compiler that operation will be successful</dt>
70 <dd><a href="https://wg21.link/P1886">P1886 <em>Error speed benchmarking</em></a> showed that there is
71 considerable gain in very small functions by hinting to the compiler whether the expression
72 is expected to be successful or not. <code>BOOST_OUTCOME_TRY</code> previously did not hint to the compiler
73 at all, but now it does. A new suite of macros <code>BOOST_OUTCOME_TRY_FAILURE_LIKELY</code> hint to the
74 compiler that failure is expected. If you wish to return to the previously unhinted
75 behaviour, define <code>BOOST_OUTCOME_TRY_LIKELY(expr)</code> to <code>(!!expr)</code>.</dd>
76 <dt><a href="https://github.com/ned14/outcome/issues/199">#199</a></dt>
77 <dd>Support for C++ Coroutines has been added. This comes in two parts, firstly there is
78 now an <code>BOOST_OUTCOME_CO_TRY()</code> operation suitable for performing the <code>TRY</code> operation from
79 within a C++ Coroutine. Secondly, in the header <code>outcome/coroutine_support.hpp</code> there are
80 implementations of <code>eager&lt;OutcomeType&gt;</code> and <code>lazy&lt;OutcomeType&gt;</code> which let you more
81 naturally and efficiently use <code>basic_result</code> or <code>basic_outcome</code> from within C++
82 Coroutines &ndash; specifically, if the result or outcome will construct from an exception
83 pointer, exceptions thrown in the coroutine return an errored or excepted result with
84 the thrown exception instead of throwing the exception through the coroutine machinery
85 (which in current compilers, has a high likelihood of blowing up the program). Both
86 <code>eager&lt;T&gt;</code> and <code>lazy&lt;T&gt;</code> can accept any <code>T</code> as well. Both have been tested and found
87 working on VS2019 and clang 9.</dd>
88 <dt><a href="https://github.com/ned14/outcome/issues/210">#210</a></dt>
89 <dd><code>make_error_code()</code> and <code>make_exception_ptr()</code> are now additionally considered for
90 compatible copy and move conversions for <code>basic_result&lt;&gt;</code>. This lets you construct
91 a <code>basic_result&lt;T, E&gt;</code> into a <code>basic_result&lt;T, error_code&gt;</code>, where <code>E</code> is a
92 custom type which has implemented the ADL discovered free function
93 <code>error_code make_error_code(E)</code>, but is otherwise unrelated to <code>error_code</code>.
94 The same availability applies for <code>exception_ptr</code> with <code>make_exception_ptr()</code> being
95 the ADL discovered free function. <code>basic_outcome&lt;&gt;</code> has less support for this than
96 <code>basic_result&lt;&gt;</code> in order to keep constructor count down, but it will accept via
97 this mechanism conversions from <code>basic_result&lt;&gt;</code> and <code>failure_type&lt;&gt;</code>.</dd>
98 </dl>
99
100 <h3 id="bug-fixes">Bug fixes:</h3>
101
102 <dl>
103 <dt><a href="https://github.com/ned14/outcome/issues/207">#184</a></dt>
104 <dd>The detection of <code>[[nodiscard]]</code> support in the compiler was very mildly broken.</dd>
105 </dl>
106
107 <hr />
108
109 <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>
110
111 <h3 id="enhancements-1">Enhancements:</h3>
112
113 <dl>
114 <dt><a href="https://github.com/ned14/outcome/issues/184">#184</a></dt>
115 <dd>As per request from Boost release managers, relocated <code>version.hpp</code> and
116 <code>revision.hpp</code> into detail, and added the Boost licence boilerplate to the top
117 of every source file which was missing one (I think). Also took the opportunity
118 to run the licence restamping script over all Outcome, so copyright dates are now
119 up to date.</dd>
120 <dt><a href="https://github.com/ned14/outcome/issues/185">#185</a></dt>
121 <dd>Add FAQ item explaining issue #185, and why we will do nothing to
122 fix it right now.</dd>
123 <dt><a href="https://github.com/ned14/outcome/issues/189">#189</a></dt>
124 <dd>Refactored the <code>BOOST_OUTCOME_TRY</code> implementation to use more clarified
125 customisation points capable of accepting very foreign inputs. Removed the
126 <code>std::experimental::expected&lt;T, E&gt;</code> specialisations, as those are no longer
127 necessary. Fixed the documentation for the customisation points which
128 previously claimed that they are ADL discovered, which they are not. Added
129 a recipe describing how to add in support for foreign input types.</dd>
130 <dt><a href="https://github.com/ned14/outcome/issues/183">#183</a></dt>
131 <dd>Added a separate <code>motivation/plug_error_code</code> specifically for Boost.</dd>
132 </dl>
133
134 <h3 id="bug-fixes-1">Bug fixes:</h3>
135
136 <dl>
137 <dt>-</dt>
138 <dd><code>BOOST_OUTCOME_VERSION_MINOR</code> hadn&rsquo;t been updated to 1.</dd>
139 <dt><a href="https://github.com/ned14/outcome/issues/181">#181</a></dt>
140 <dd>Fix issue #181 where Outcome didn&rsquo;t actually implement the strong swap guarantee,
141 despite being documented as doing so.</dd>
142 <dt><a href="https://github.com/ned14/outcome/issues/190">#190</a></dt>
143 <dd>Fix issue #190 in Boost edition where unit test suite was not runnable from
144 the Boost release distro.</dd>
145 <dt><a href="https://github.com/ned14/outcome/issues/182">#182</a></dt>
146 <dd>Fix issue #182 where <code>trait::is_exception_ptr_available&lt;T&gt;</code> was always true,
147 thus causing much weirdness, like not printing diagnostics and trying to feed
148 everything to <code>make_exception_ptr()</code>.</dd>
149 <dt><a href="https://github.com/ned14/outcome/issues/192">#194</a></dt>
150 <dd>Fix issue #192 where the <code>std::basic_outcome_failure_exception_from_error()</code>
151 was being defined twice for translation units which combine standalone and
152 Boost Outcome&rsquo;s.</dd>
153 </dl>
154
155 <hr />
156
157 <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>
158
159 <ul>
160 <li><p><a href="https://github.com/ned14/outcome/issues/180">#180</a></p>
161
162 <ul>
163 <li><code>success()</code> and <code>failure()</code> now produce types marked <code>[[nodiscard]]</code>.</li>
164 </ul></li>
165
166 <li><p><code>include/outcome/outcome.natvis</code> is now namespace permuted like the rest of
167 Outcome, so debugging Outcome based code in Visual Studio should look much
168 prettier than before.</p></li>
169
170 <li><p><a href="https://github.com/ned14/outcome/issues/162">#162</a></p>
171
172 <ul>
173 <li><code>.has_failure()</code> was returning false at times when it should have returned true.</li>
174 </ul></li>
175
176 <li><p><a href="https://github.com/ned14/outcome/issues/152">#152</a></p>
177
178 <ul>
179 <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>.
180 Added explicit version trap for GCC 5 to say it can not work. Note this is not a
181 breaking change, GCC 5 was never supported officially in any v2 Outcome.</li>
182 </ul></li>
183
184 <li><p><a href="https://github.com/ned14/outcome/issues/150">#150</a></p>
185
186 <ul>
187 <li><strong>BREAKING CHANGE</strong> <code>result&lt;T, E&gt;</code>, <code>boost_result&lt;T, E&gt;</code> and <code>std_result&lt;T, E&gt;</code>
188 no longer implement hard UB on fetching a value from a valueless instance if <code>E</code> is
189 a UDT, they now fail to compile with a useful error message. If you wish hard UB,
190 use <code>unchecked&lt;T, E&gt;</code>, <code>boost_unchecked&lt;T, E&gt;</code> or <code>std_unchecked&lt;T, E&gt;</code> instead.</li>
191 </ul></li>
192
193 <li><p><a href="https://github.com/ned14/outcome/issues/140">#140</a></p>
194
195 <ul>
196 <li>Fixed a nasty corner case bug where value type&rsquo;s without a copy constructor
197 but with a move constructor would indicate via traits that copy construction
198 was available. Thanks to Microsoft&rsquo;s compiler team for reporting this issue.</li>
199 </ul></li>
200
201 <li><p>Added experimental <code>status_result</code> and <code>status_outcome</code> based on experimental
202 <code>status_code</code>.</p></li>
203
204 <li><p>Boost edition is now 100% Boost, so defaults for <code>result</code> and <code>outcome</code> are
205 <code>boost::system::error_code::errc_t</code> and <code>boost::exception_ptr</code>. Moreover,
206 the test suite in the Boost edition now exclusively tests the Boost edition.
207 One can, of course, freely use the standalone edition with Boost, and the Boost
208 edition with <code>std</code> types.</p></li>
209
210 <li><p>Renamed ADL discovered customisation point <code>throw_as_system_error_with_payload()</code>
211 to <code>outcome_throw_as_system_error_with_payload()</code>.</p></li>
212
213 <li><p><a href="https://github.com/ned14/outcome/issues/135">#135</a></p>
214
215 <ul>
216 <li>Added much clearer compile failure when user tries <code>result&lt;T, T&gt;</code> or <code>outcome</code>
217 where two or more types are identical. Thanks to Andrzej KrzemieĊ„ski
218 for suggesting a technique which combines SFINAE correctness with
219 the remaining ability for <code>result&lt;T, T&gt;</code> etc to be a valid type, but
220 not constructible.</li>
221 </ul></li>
222
223 <li><p><a href="https://github.com/ned14/outcome/issues/67">#67</a></p>
224
225 <ul>
226 <li>Fixed one of the oldest long open bugs in Outcome, that the noexcept
227 unit tests failed on OS X for an unknown reason.</li>
228 </ul></li>
229
230 <li><p><a href="https://github.com/ned14/outcome/issues/115">#115</a></p>
231
232 <ul>
233 <li>Outcome did not construct correctly from <code>failure_type</code>.</li>
234 </ul></li>
235
236 <li><p>Inexplicably outcome&rsquo;s error + exception constructor had been removed.
237 Nobody noticed during the Boost peer review, which is worrying seeing as that
238 constructor is needed for one of the main advertised features to Boost!</p></li>
239
240 <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>
241
242 <ul>
243 <li><code>operator==</code> and <code>operator!=</code> now become disabled if the value, error and
244 exception types do not implement the same operator.</li>
245 <li>Relatedly, both comparison operators simply didn&rsquo;t work right. Fixed.</li>
246 </ul></li>
247
248 <li><p><a href="https://github.com/ned14/outcome/issues/109">#109</a></p>
249
250 <ul>
251 <li><code>swap()</code> now has correct <code>noexcept</code> calculation and now correctly orders
252 the swaps to be whichever is the throwing swap first.</li>
253 </ul></li>
254
255 <li><p>Added reference dump of v2.1 ABI so we can check if ABI breakage detection
256 works in the next set of changes, plus Travis job to check ABI and API compatibility
257 per commit.</p></li>
258
259 <li><p><a href="https://github.com/ned14/outcome/issues/124">#124</a></p>
260
261 <ul>
262 <li><code>BOOST_OUTCOME_TRY</code> is now overloaded and selects <code>void</code> or <code>auto</code> edition
263 according to input parameter count.</li>
264 </ul></li>
265
266 <li><p><a href="https://github.com/ned14/outcome/issues/120">#120</a></p>
267
268 <ul>
269 <li>Fix generation of double underscored temporary variables in
270 <code>BOOST_OUTCOME_UNIQUE_NAME</code>, which is UB.</li>
271 </ul></li>
272
273 <li><p><a href="https://github.com/ned14/outcome/issues/110">#110</a></p>
274
275 <ul>
276 <li>Separated <code>result</code> from its hard coded dependency on the <code>&lt;system_error&gt;</code> header.</li>
277 <li>Renamed <code>result</code> and <code>outcome</code> to <code>basic_result</code> and <code>basic_outcome</code>.</li>
278 <li>Renamed <code>result.hpp</code> into <code>basic_result.hpp</code>.</li>
279 <li>Moved <code>&lt;system_error&gt;</code> and <code>&lt;exception&gt;</code> dependent code into new
280 <code>std_result.hpp</code> and <code>std_outcome.hpp</code> header files.</li>
281 <li>Added <code>boost_result.hpp</code> and <code>boost_outcome.hpp</code> which use Boost.System
282 and Boost.Exception (these are <code>result.hpp</code> and <code>outcome.hpp</code> in the Boost edition).</li>
283 </ul></li>
284 </ul>
285
286 <hr />
287
288 <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>
289
290 <ul>
291 <li>Boost peer review edition. This is what was reviewed.</li>
292 <li>Changelog from v1 can be found in the release notes for this release.</li>
293 </ul>
294
295
296
297         </div><p><small>Last revised: November 15, 2019 at 15:43:29 UTC</small></p>
298 <hr>
299 <div class="spirit-nav">
300 <a accesskey="p" href="./videos.html"><img src="./images/prev.png" alt="Prev"></a>
301     <a accesskey="u" href="./index.html"><img src="./images/up.png" alt="Up"></a>
302     <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>
303 </html>