more unit test for opt ref swap and abstract types

This commit is contained in:
Andrzej Krzemienski
2016-02-16 23:49:15 +01:00
parent 143bda7c9f
commit b0602a1161
9 changed files with 66 additions and 124 deletions

View File

@ -31,11 +31,32 @@
<span class="phrase"><a name="boost_optional.relnotes.boost_release_x_xx"></a></span><a class="link" href="relnotes.html#boost_optional.relnotes.boost_release_x_xx">Boost
Release X.XX</a>
</h4>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
Now <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">optional</span></code> is specialized for reference
parameters. This way the <code class="computeroutput"><span class="keyword">sizeof</span></code>
of optional reference is that of a pointer, and a number of bugs is avoided.
</li></ul></div>
parameters. This addresses a couple of issues:
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
the <code class="computeroutput"><span class="keyword">sizeof</span></code> of optional
reference is that of a pointer,
</li>
<li class="listitem">
some bugs connected to copying optional references are gone,
</li>
<li class="listitem">
you can swap optional references: it is like swapping pointers: shalow,
underlying objects are not affected,
</li>
<li class="listitem">
optional references to abstract types work.
</li>
</ul></div>
</li>
<li class="listitem">
Documented nested typedefs (<a href="https://svn.boost.org/trac/boost/ticket/5193" target="_top">Trac
#5193</a>).
</li>
</ul></div>
<h4>
<a name="boost_optional.relnotes.h1"></a>
<span class="phrase"><a name="boost_optional.relnotes.boost_release_1_60"></a></span><a class="link" href="relnotes.html#boost_optional.relnotes.boost_release_1_60">Boost