Reverted specialization for trivial types

It caused too many problems. I left only specialiation for scalar types.
I will need to devise clever type traits for reconizing trivial types with working constructor.
This commit is contained in:
Andrzej Krzemienski
2017-11-04 17:42:22 +01:00
parent cbf3cd05af
commit 06dea2cb9b
11 changed files with 293 additions and 123 deletions

View File

@ -33,11 +33,10 @@
</h4>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
On newer compilers <code class="computeroutput"><span class="identifier">optional</span></code>
is now trivially-copyable for trivial <code class="computeroutput"><span class="identifier">T</span></code>s.
is now trivially-copyable for scalar <code class="computeroutput"><span class="identifier">T</span></code>s.
This uses a different storage (just <code class="computeroutput"><span class="identifier">T</span></code>
rather than <code class="computeroutput"><span class="identifier">aligned_storage</span></code>).
We require the compiler to support defaulted functions and type traits.
Otherwise, we still use the the plain storage for scalar types.
We require the compiler to support defaulted functions.
</li></ul></div>
<h4>
<a name="boost_optional.relnotes.h1"></a>