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