trivially-copyable optional<T> for trivial T

This commit is contained in:
Andrzej Krzemienski committed 2017-11-07 23:34:05 +01:00
1 parent e95f9fc254
commit 2d2c3c3f6f
9 files changed
+826 -21

No files matched your search

+5
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`.