trivially-copyable optional<T> for trivial T

This commit is contained in:
Andrzej Krzemienski
2017-10-28 16:51:13 +02:00
parent e95f9fc254
commit 2d2c3c3f6f
9 changed files with 826 additions and 21 deletions

View File

@ -11,6 +11,11 @@
[section:relnotes Release Notes]
[heading Boost Release 1.66]
* On newer compilers `optional` is now trivially-copyable for trivial `T`s. This uses a different storage (just `T` rather than `aligned_storage`). We require the compiler to support defaulted functions and type traits. Otherwise, we still use the the plain storage for scalar types.
[heading Boost Release 1.63]
* Added two new in-place constructors. They work similarly to `emplace()` functions: they initialize the contained value by perfect-forwarding the obtained arguments. One constructor always initializes the contained value, the other based on a boolean condition.
* Syntax `o = {}` now correctly un-initializes optional, just like in `std::optional`.