changelog.html 17 KB

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