diff --git a/release-notes/boost_1_91_0.adoc b/release-notes/boost_1_91_0.adoc index 293acb0..443364b 100644 --- a/release-notes/boost_1_91_0.adoc +++ b/release-notes/boost_1_91_0.adoc @@ -77,6 +77,61 @@ a `boost::tuple` (and similarly for the rest of affected class templates). ** **Breaking change (`backmp11`)**: Direct access to the event pool is changed from `public` to `protected`, because manipulating it outside of the library code can lead to undefined behavior. + + +* boost_phrase:library[Optional,/libs/optional/]: +** For compilers with full C++11 support (including "unrestricted unions" and ref-qualifiers) + changed the implementation from aligned storage to union storage. This enables the gradual + `constexpr` support: + +*** In C++11, some constructors and `const`-qualified accessors become usable + in compile-time contexts (are _core constant expressions_) for types + satisfying certain constraints. +*** In C++14 even some mutating operations become core constant expressions (those + that do not require changing the state of `optional` from not having a value to + having a value), for co-operating types. +*** In C++17 all constructors (including copy and move) become core constant expressions for co-operating types. + ++ + +This addresses issues https://github.com/boostorg/optional/issues/132[#132] and https://github.com/boostorg/optional/issues/143[#143]. + +** *Breaking change.* Abandoned the mechanism for customizing + `swap`. Hardly anyone knows about this mechanism and it was never documented. + +** Applied a couple of small changes to get closer to the interface of `std::optional`: + *** Enabled syntax `o = {}` for putting optional objects to no-value state. + *** Enabled syntax `o.value_or({})`, which uses a default-constructed `T`. + *** Construct `o = u`, where `o` is of type `optional` and `u` is of type `U` convertible to `T`, + does not create a temporary `T`. + +** Added a conversion from `optional&` to `optional`. This addresses https://github.com/boostorg/optional/issues/142[#142]. + +** `none_t` is now `std::equality_comparable`, which means that `none_t` and `optional` + model concept `std::equality_comparable_with` (for `std::equality_comparable` `T`), + which means that you can `std::ranges::find(rng, boost::none)` for a range of optional objects. + +** *Warning.* In the future releases we intend to introduce the range interface + in `optional`, so that `std::ranges::range>` will be `true`. + This will affect the overload resolution in programs in certain cases that make decisions based + on predicates such as `std::ranges::range`. For instance, the following code + will start behaving differently: + ++ + + template + void serialize(T const& v) + { + if constexpr (std::ranges::range) + serialize_as_range(v); + else if constexpr (custom::is_optional_like) + serialize_as_optional(v); + else + serialize_as_value(v); + } + + + * boost_phrase:library[Unordered,/libs/unordered/]: ** Fixed the returned value of range insertion in concurrent containers (boost_gh:pr[unordered,344]).