Compare commits

..

1 Commits

Author SHA1 Message Date
bf244e2712 Created a branch from trunk
[SVN r38959]
2007-08-26 05:34:35 +00:00
53 changed files with 1972 additions and 748 deletions

View File

@ -21,10 +21,8 @@ boostbook standalone
: :
optional optional
: :
<xsl:param>boost.root=../../../.. <xsl:param>toc.max.depth=1
<xsl:param>boost.libraries=../../../libraries.htm <xsl:param>toc.section.depth=1
<xsl:param>toc.max.depth=2
<xsl:param>toc.section.depth=2
<xsl:param>chunk.section.depth=1 <xsl:param>chunk.section.depth=1
; ;

View File

@ -12,17 +12,17 @@
Guarantees"> Guarantees">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%">
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../index.htm">Home</a></td>
<td align="center"><a href="../../../../libraries.htm">Libraries</a></td> <td align="center"><a href="../libraries.html">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td> <td align="center"><a href="../../../people/people.htm">People</a></td>
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td> <td align="center"><a href="../../../more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table> </table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="in_place_factories.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="exception_safety_guarantees.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a> <a accesskey="p" href="in_place_factories.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="exception_safety_guarantees.html"><img src="../images/next.png" alt="Next"></a>
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
@ -74,15 +74,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright <20> 2003 -2007 Fernando Luis Cacciola Carballal<p> <td align="right"><small>Copyright <20> 2003 -2007 Fernando Luis Cacciola Carballal</small></td>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="in_place_factories.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="exception_safety_guarantees.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a> <a accesskey="p" href="in_place_factories.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="exception_safety_guarantees.html"><img src="../images/next.png" alt="Next"></a>
</div> </div>
</body> </body>
</html> </html>

View File

@ -10,24 +10,24 @@
and Portability"> and Portability">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%">
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../index.htm">Home</a></td>
<td align="center"><a href="../../../../libraries.htm">Libraries</a></td> <td align="center"><a href="../libraries.html">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td> <td align="center"><a href="../../../people/people.htm">People</a></td>
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td> <td align="center"><a href="../../../more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table> </table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="dependencies_and_portability.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a> <a accesskey="p" href="dependencies_and_portability.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a>
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_optional.acknowledgments"></a><a href="acknowledgments.html" title="Acknowledgments">Acknowledgments</a> <a name="boost_optional.acknowledgments"></a><a href="acknowledgments.html" title="Acknowledgments">Acknowledgments</a>
</h2></div></div></div> </h2></div></div></div>
<a name="boost_optional.acknowledgments.pre_formal_review"></a><h4> <a name="boost_optional.acknowledgments.pre_formal_review"></a><h4>
<a name="id2645003"></a> <a name="id2644860"></a>
<a href="acknowledgments.html#boost_optional.acknowledgments.pre_formal_review">Pre-formal <a href="acknowledgments.html#boost_optional.acknowledgments.pre_formal_review">Pre-formal
review</a> review</a>
</h4> </h4>
@ -66,7 +66,7 @@
</li> </li>
</ul></div> </ul></div>
<a name="boost_optional.acknowledgments.post_formal_review"></a><h4> <a name="boost_optional.acknowledgments.post_formal_review"></a><h4>
<a name="id2645073"></a> <a name="id2644931"></a>
<a href="acknowledgments.html#boost_optional.acknowledgments.post_formal_review">Post-formal <a href="acknowledgments.html#boost_optional.acknowledgments.post_formal_review">Post-formal
review</a> review</a>
</h4> </h4>
@ -112,15 +112,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright <20> 2003 -2007 Fernando Luis Cacciola Carballal<p> <td align="right"><small>Copyright <20> 2003 -2007 Fernando Luis Cacciola Carballal</small></td>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="dependencies_and_portability.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a> <a accesskey="p" href="dependencies_and_portability.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a>
</div> </div>
</body> </body>
</html> </html>

View File

@ -11,17 +11,17 @@
<link rel="next" href="acknowledgments.html" title="Acknowledgments"> <link rel="next" href="acknowledgments.html" title="Acknowledgments">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%">
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../index.htm">Home</a></td>
<td align="center"><a href="../../../../libraries.htm">Libraries</a></td> <td align="center"><a href="../libraries.html">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td> <td align="center"><a href="../../../people/people.htm">People</a></td>
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td> <td align="center"><a href="../../../more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table> </table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="implementation_notes.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="acknowledgments.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a> <a accesskey="p" href="implementation_notes.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="acknowledgments.html"><img src="../images/next.png" alt="Next"></a>
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
@ -36,15 +36,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright <20> 2003 -2007 Fernando Luis Cacciola Carballal<p> <td align="right"><small>Copyright <20> 2003 -2007 Fernando Luis Cacciola Carballal</small></td>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="implementation_notes.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="acknowledgments.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a> <a accesskey="p" href="implementation_notes.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="acknowledgments.html"><img src="../images/next.png" alt="Next"></a>
</div> </div>
</body> </body>
</html> </html>

View File

@ -10,17 +10,17 @@
<link rel="next" href="examples.html" title="Examples"> <link rel="next" href="examples.html" title="Examples">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%">
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../index.htm">Home</a></td>
<td align="center"><a href="../../../../libraries.htm">Libraries</a></td> <td align="center"><a href="../libraries.html">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td> <td align="center"><a href="../../../people/people.htm">People</a></td>
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td> <td align="center"><a href="../../../more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table> </table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="synopsis.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="examples.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a> <a accesskey="p" href="synopsis.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="examples.html"><img src="../images/next.png" alt="Next"></a>
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
@ -29,42 +29,36 @@
<p> <p>
Because <code class="computeroutput"><span class="identifier">T</span></code> might be of reference Because <code class="computeroutput"><span class="identifier">T</span></code> might be of reference
type, in the sequel, those entries whose semantic depends on <code class="computeroutput"><span class="identifier">T</span></code> being of reference type or not will be type, in the sequel, those entries whose semantic depends on <code class="computeroutput"><span class="identifier">T</span></code> being of reference type or not will be
distinguished using the following convention: distinguished using the following convention: * If the entry reads: <code class="computeroutput"><span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">T</span></code><span class="emphasis"><em>(not a ref)</em></span><code class="computeroutput"><span class="special">&gt;</span></code>, the description corresponds only to the
</p> case where <code class="computeroutput"><span class="identifier">T</span></code> is not of reference
<div class="itemizedlist"><ul type="disc"> type. * If the entry reads: <code class="computeroutput"><span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&amp;&gt;</span></code>,
<li>
If the entry reads: <code class="computeroutput"><span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">T</span></code><span class="emphasis"><em>(not
a ref)</em></span><code class="computeroutput"><span class="special">&gt;</span></code>, the description
corresponds only to the case where <code class="computeroutput"><span class="identifier">T</span></code>
is not of reference type.
</li>
<li>
If the entry reads: <code class="computeroutput"><span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&amp;&gt;</span></code>,
the description corresponds only to the case where <code class="computeroutput"><span class="identifier">T</span></code> the description corresponds only to the case where <code class="computeroutput"><span class="identifier">T</span></code>
is of reference type. is of reference type. * If the entry reads: <code class="computeroutput"><span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span></code>,
</li>
<li>
If the entry reads: <code class="computeroutput"><span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span></code>,
the description is the same for both cases. the description is the same for both cases.
</li> </p>
</ul></div>
<div class="note"><table border="0" summary="Note"> <div class="note"><table border="0" summary="Note">
<tr> <tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../doc/html/images/note.png"></td> <td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th> <th align="left">Note</th>
</tr> </tr>
<tr><td align="left" valign="top"><p> <tr><td align="left" valign="top">
<p>
</p>
<p>
The following section contains various <code class="computeroutput"><span class="identifier">assert</span><span class="special">()</span></code> which are used only to show the postconditions The following section contains various <code class="computeroutput"><span class="identifier">assert</span><span class="special">()</span></code> which are used only to show the postconditions
as sample code. It is not implied that the type <code class="computeroutput"><span class="identifier">T</span></code> as sample code. It is not implied that the type <code class="computeroutput"><span class="identifier">T</span></code>
must support each particular expression but that if the expression is supported, must support each particular expression but that if the expression is supported,
the implied condition holds. the implied condition holds.
</p></td></tr> </p>
<p>
</p>
</td></tr>
</table></div> </table></div>
<p> <p>
<span class="inlinemediaobject"><img src="../images/space.png" alt="space"></span> <span class="inlinemediaobject"><img src="../images/space.png" alt="space"></span>
</p> </p>
<a name="boost_optional.detailed_semantics.optional_class_member_functions"></a><h4> <a name="boost_optional.detailed_semantics.optional_class_member_functions"></a><h4>
<a name="id2620257"></a> <a name="id2620116"></a>
<a href="detailed_semantics.html#boost_optional.detailed_semantics.optional_class_member_functions">optional <a href="detailed_semantics.html#boost_optional.detailed_semantics.optional_class_member_functions">optional
class member functions</a> class member functions</a>
</h4> </h4>
@ -1340,7 +1334,7 @@
<span class="inlinemediaobject"><img src="../images/space.png" alt="space"></span> <span class="inlinemediaobject"><img src="../images/space.png" alt="space"></span>
</p> </p>
<a name="boost_optional.detailed_semantics.free_functions"></a><h4> <a name="boost_optional.detailed_semantics.free_functions"></a><h4>
<a name="id2633426"></a> <a name="id2633284"></a>
<a href="detailed_semantics.html#boost_optional.detailed_semantics.free_functions">Free functions</a> <a href="detailed_semantics.html#boost_optional.detailed_semantics.free_functions">Free functions</a>
</h4> </h4>
<p> <p>
@ -1699,15 +1693,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright <20> 2003 -2007 Fernando Luis Cacciola Carballal<p> <td align="right"><small>Copyright <20> 2003 -2007 Fernando Luis Cacciola Carballal</small></td>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="synopsis.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="examples.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a> <a accesskey="p" href="synopsis.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="examples.html"><img src="../images/next.png" alt="Next"></a>
</div> </div>
</body> </body>
</html> </html>

View File

@ -10,17 +10,17 @@
<link rel="next" href="synopsis.html" title="Synopsis"> <link rel="next" href="synopsis.html" title="Synopsis">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%">
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../index.htm">Home</a></td>
<td align="center"><a href="../../../../libraries.htm">Libraries</a></td> <td align="center"><a href="../libraries.html">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td> <td align="center"><a href="../../../people/people.htm">People</a></td>
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td> <td align="center"><a href="../../../more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table> </table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="../index.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="synopsis.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a> <a accesskey="p" href="../index.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="synopsis.html"><img src="../images/next.png" alt="Next"></a>
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
@ -292,7 +292,7 @@
itself which are supported by a special interface. itself which are supported by a special interface.
</p> </p>
<a name="boost_optional.development.the_interface.lexically_hinted_value_access_in_the_presence_of_possibly_untitialized_optional_objects__the_operators___and___gt_"></a><h5> <a name="boost_optional.development.the_interface.lexically_hinted_value_access_in_the_presence_of_possibly_untitialized_optional_objects__the_operators___and___gt_"></a><h5>
<a name="id2615375"></a> <a name="id2615242"></a>
<a href="development.html#boost_optional.development.the_interface.lexically_hinted_value_access_in_the_presence_of_possibly_untitialized_optional_objects__the_operators___and___gt_">Lexically-hinted <a href="development.html#boost_optional.development.the_interface.lexically_hinted_value_access_in_the_presence_of_possibly_untitialized_optional_objects__the_operators___and___gt_">Lexically-hinted
Value Access in the presence of possibly untitialized optional objects: The Value Access in the presence of possibly untitialized optional objects: The
operators * and -&gt;</a> operators * and -&gt;</a>
@ -357,7 +357,7 @@
incarnated by pointers. incarnated by pointers.
</p> </p>
<a name="boost_optional.development.the_interface.optional_lt_t_gt__as_a_model_of_optionalpointee"></a><h5> <a name="boost_optional.development.the_interface.optional_lt_t_gt__as_a_model_of_optionalpointee"></a><h5>
<a name="id2615714"></a> <a name="id2615580"></a>
<a href="development.html#boost_optional.development.the_interface.optional_lt_t_gt__as_a_model_of_optionalpointee">Optional&lt;T&gt; <a href="development.html#boost_optional.development.the_interface.optional_lt_t_gt__as_a_model_of_optionalpointee">Optional&lt;T&gt;
as a model of OptionalPointee</a> as a model of OptionalPointee</a>
</h5> </h5>
@ -369,12 +369,19 @@
</p> </p>
<div class="warning"><table border="0" summary="Warning"> <div class="warning"><table border="0" summary="Warning">
<tr> <tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../../../../../doc/html/images/warning.png"></td> <td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../images/warning.png"></td>
<th align="left">Warning</th> <th align="left">Warning</th>
</tr> </tr>
<tr><td align="left" valign="top"><p> <tr><td align="left" valign="top">
However, it is particularly important to note that <code class="computeroutput"><span class="identifier">optional</span><span class="special">&lt;&gt;</span></code> objects are not pointers. <span class="underline"><code class="computeroutput"><span class="identifier">optional</span><span class="special">&lt;&gt;</span></code> is not, and does not model, a pointer</span>. <p>
</p></td></tr> </p>
<p>
However, it is particularly important to note that <code class="computeroutput"><span class="identifier">optional</span><span class="special">&lt;&gt;</span></code> objects are not pointers. <span class="underline"><code class="computeroutput"><span class="identifier">optional</span><span class="special">&lt;&gt;</span></code> is not, and does not model, a
pointer</span>.
</p>
<p>
</p>
</td></tr>
</table></div> </table></div>
<p> <p>
For instance, <code class="computeroutput"><span class="identifier">optional</span><span class="special">&lt;&gt;</span></code> For instance, <code class="computeroutput"><span class="identifier">optional</span><span class="special">&lt;&gt;</span></code>
@ -398,15 +405,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright <20> 2003 -2007 Fernando Luis Cacciola Carballal<p> <td align="right"><small>Copyright <20> 2003 -2007 Fernando Luis Cacciola Carballal</small></td>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="../index.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="synopsis.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a> <a accesskey="p" href="../index.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="synopsis.html"><img src="../images/next.png" alt="Next"></a>
</div> </div>
</body> </body>
</html> </html>

View File

@ -10,17 +10,17 @@
<link rel="next" href="optional_references.html" title="Optional references"> <link rel="next" href="optional_references.html" title="Optional references">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%">
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../index.htm">Home</a></td>
<td align="center"><a href="../../../../libraries.htm">Libraries</a></td> <td align="center"><a href="../libraries.html">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td> <td align="center"><a href="../../../people/people.htm">People</a></td>
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td> <td align="center"><a href="../../../more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table> </table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="detailed_semantics.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="optional_references.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a> <a accesskey="p" href="detailed_semantics.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="optional_references.html"><img src="../images/next.png" alt="Next"></a>
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
@ -141,15 +141,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright <20> 2003 -2007 Fernando Luis Cacciola Carballal<p> <td align="right"><small>Copyright <20> 2003 -2007 Fernando Luis Cacciola Carballal</small></td>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="detailed_semantics.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="optional_references.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a> <a accesskey="p" href="detailed_semantics.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="optional_references.html"><img src="../images/next.png" alt="Next"></a>
</div> </div>
</body> </body>
</html> </html>

View File

@ -12,17 +12,17 @@
<link rel="next" href="type_requirements.html" title="Type requirements"> <link rel="next" href="type_requirements.html" title="Type requirements">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%">
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../index.htm">Home</a></td>
<td align="center"><a href="../../../../libraries.htm">Libraries</a></td> <td align="center"><a href="../libraries.html">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td> <td align="center"><a href="../../../people/people.htm">People</a></td>
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td> <td align="center"><a href="../../../more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table> </table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="a_note_about_optional_bool_.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="type_requirements.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a> <a accesskey="p" href="a_note_about_optional_bool_.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="type_requirements.html"><img src="../images/next.png" alt="Next"></a>
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
@ -116,7 +116,7 @@
<span class="special">}</span> <span class="special">}</span>
</pre> </pre>
<a name="boost_optional.exception_safety_guarantees.swap"></a><h4> <a name="boost_optional.exception_safety_guarantees.swap"></a><h4>
<a name="id2644478"></a> <a name="id2644335"></a>
<a href="exception_safety_guarantees.html#boost_optional.exception_safety_guarantees.swap">Swap</a> <a href="exception_safety_guarantees.html#boost_optional.exception_safety_guarantees.swap">Swap</a>
</h4> </h4>
<p> <p>
@ -130,15 +130,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright <20> 2003 -2007 Fernando Luis Cacciola Carballal<p> <td align="right"><small>Copyright <20> 2003 -2007 Fernando Luis Cacciola Carballal</small></td>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="a_note_about_optional_bool_.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="type_requirements.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a> <a accesskey="p" href="a_note_about_optional_bool_.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="type_requirements.html"><img src="../images/next.png" alt="Next"></a>
</div> </div>
</body> </body>
</html> </html>

View File

@ -11,17 +11,17 @@
and Portability"> and Portability">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%">
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../index.htm">Home</a></td>
<td align="center"><a href="../../../../libraries.htm">Libraries</a></td> <td align="center"><a href="../libraries.html">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td> <td align="center"><a href="../../../people/people.htm">People</a></td>
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td> <td align="center"><a href="../../../more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table> </table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="type_requirements.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="dependencies_and_portability.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a> <a accesskey="p" href="type_requirements.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="dependencies_and_portability.html"><img src="../images/next.png" alt="Next"></a>
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
@ -42,15 +42,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright <20> 2003 -2007 Fernando Luis Cacciola Carballal<p> <td align="right"><small>Copyright <20> 2003 -2007 Fernando Luis Cacciola Carballal</small></td>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="type_requirements.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="dependencies_and_portability.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a> <a accesskey="p" href="type_requirements.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="dependencies_and_portability.html"><img src="../images/next.png" alt="Next"></a>
</div> </div>
</body> </body>
</html> </html>

View File

@ -12,17 +12,17 @@
optional&lt;bool&gt;"> optional&lt;bool&gt;">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%">
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../index.htm">Home</a></td>
<td align="center"><a href="../../../../libraries.htm">Libraries</a></td> <td align="center"><a href="../libraries.html">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td> <td align="center"><a href="../../../people/people.htm">People</a></td>
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td> <td align="center"><a href="../../../more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table> </table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="rebinding_semantics_for_assignment_of_optional_references.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="a_note_about_optional_bool_.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a> <a accesskey="p" href="rebinding_semantics_for_assignment_of_optional_references.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="a_note_about_optional_bool_.html"><img src="../images/next.png" alt="Next"></a>
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
@ -190,15 +190,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright <20> 2003 -2007 Fernando Luis Cacciola Carballal<p> <td align="right"><small>Copyright <20> 2003 -2007 Fernando Luis Cacciola Carballal</small></td>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="rebinding_semantics_for_assignment_of_optional_references.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="a_note_about_optional_bool_.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a> <a accesskey="p" href="rebinding_semantics_for_assignment_of_optional_references.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="a_note_about_optional_bool_.html"><img src="../images/next.png" alt="Next"></a>
</div> </div>
</body> </body>
</html> </html>

View File

@ -11,17 +11,17 @@
semantics for assignment of optional references"> semantics for assignment of optional references">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%">
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../index.htm">Home</a></td>
<td align="center"><a href="../../../../libraries.htm">Libraries</a></td> <td align="center"><a href="../libraries.html">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td> <td align="center"><a href="../../../people/people.htm">People</a></td>
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td> <td align="center"><a href="../../../more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table> </table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="examples.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="rebinding_semantics_for_assignment_of_optional_references.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a> <a accesskey="p" href="examples.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="rebinding_semantics_for_assignment_of_optional_references.html"><img src="../images/next.png" alt="Next"></a>
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
@ -72,15 +72,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright <20> 2003 -2007 Fernando Luis Cacciola Carballal<p> <td align="right"><small>Copyright <20> 2003 -2007 Fernando Luis Cacciola Carballal</small></td>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="examples.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="rebinding_semantics_for_assignment_of_optional_references.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a> <a accesskey="p" href="examples.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="rebinding_semantics_for_assignment_of_optional_references.html"><img src="../images/next.png" alt="Next"></a>
</div> </div>
</body> </body>
</html> </html>

View File

@ -11,17 +11,17 @@
<link rel="next" href="in_place_factories.html" title="In-Place Factories"> <link rel="next" href="in_place_factories.html" title="In-Place Factories">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%">
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../index.htm">Home</a></td>
<td align="center"><a href="../../../../libraries.htm">Libraries</a></td> <td align="center"><a href="../libraries.html">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td> <td align="center"><a href="../../../people/people.htm">People</a></td>
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td> <td align="center"><a href="../../../more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table> </table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="optional_references.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="in_place_factories.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a> <a accesskey="p" href="optional_references.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="in_place_factories.html"><img src="../images/next.png" alt="Next"></a>
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
@ -75,7 +75,7 @@
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">b</span><span class="special">==</span><span class="number">3</span><span class="special">);</span> <span class="identifier">assert</span><span class="special">(</span><span class="identifier">b</span><span class="special">==</span><span class="number">3</span><span class="special">);</span>
</pre> </pre>
<a name="boost_optional.rebinding_semantics_for_assignment_of_optional_references.rationale"></a><h4> <a name="boost_optional.rebinding_semantics_for_assignment_of_optional_references.rationale"></a><h4>
<a name="id2640074"></a> <a name="id2639932"></a>
<a href="rebinding_semantics_for_assignment_of_optional_references.html#boost_optional.rebinding_semantics_for_assignment_of_optional_references.rationale">Rationale</a> <a href="rebinding_semantics_for_assignment_of_optional_references.html#boost_optional.rebinding_semantics_for_assignment_of_optional_references.rationale">Rationale</a>
</h4> </h4>
<p> <p>
@ -141,15 +141,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright <20> 2003 -2007 Fernando Luis Cacciola Carballal<p> <td align="right"><small>Copyright <20> 2003 -2007 Fernando Luis Cacciola Carballal</small></td>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="optional_references.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="in_place_factories.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a> <a accesskey="p" href="optional_references.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="in_place_factories.html"><img src="../images/next.png" alt="Next"></a>
</div> </div>
</body> </body>
</html> </html>

View File

@ -10,17 +10,17 @@
<link rel="next" href="detailed_semantics.html" title="Detailed Semantics"> <link rel="next" href="detailed_semantics.html" title="Detailed Semantics">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%">
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../index.htm">Home</a></td>
<td align="center"><a href="../../../../libraries.htm">Libraries</a></td> <td align="center"><a href="../libraries.html">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td> <td align="center"><a href="../../../people/people.htm">People</a></td>
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td> <td align="center"><a href="../../../more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table> </table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="development.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="detailed_semantics.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a> <a accesskey="p" href="development.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="detailed_semantics.html"><img src="../images/next.png" alt="Next"></a>
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
@ -137,15 +137,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright <20> 2003 -2007 Fernando Luis Cacciola Carballal<p> <td align="right"><small>Copyright <20> 2003 -2007 Fernando Luis Cacciola Carballal</small></td>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="development.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="detailed_semantics.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a> <a accesskey="p" href="development.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="detailed_semantics.html"><img src="../images/next.png" alt="Next"></a>
</div> </div>
</body> </body>
</html> </html>

View File

@ -11,17 +11,17 @@
<link rel="next" href="implementation_notes.html" title="Implementation Notes"> <link rel="next" href="implementation_notes.html" title="Implementation Notes">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%">
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../index.htm">Home</a></td>
<td align="center"><a href="../../../../libraries.htm">Libraries</a></td> <td align="center"><a href="../libraries.html">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td> <td align="center"><a href="../../../people/people.htm">People</a></td>
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td> <td align="center"><a href="../../../more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table> </table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="exception_safety_guarantees.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="implementation_notes.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a> <a accesskey="p" href="exception_safety_guarantees.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="implementation_notes.html"><img src="../images/next.png" alt="Next"></a>
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
@ -40,15 +40,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright <20> 2003 -2007 Fernando Luis Cacciola Carballal<p> <td align="right"><small>Copyright <20> 2003 -2007 Fernando Luis Cacciola Carballal</small></td>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="exception_safety_guarantees.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="implementation_notes.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a> <a accesskey="p" href="exception_safety_guarantees.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="implementation_notes.html"><img src="../images/next.png" alt="Next"></a>
</div> </div>
</body> </body>
</html> </html>

0
doc/html/boostbook.css Normal file → Executable file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 B

BIN
doc/html/images/caution.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
doc/html/images/home.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
doc/html/images/important.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
doc/html/images/next.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 B

BIN
doc/html/images/note.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
doc/html/images/prev.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 741 B

BIN
doc/html/images/tip.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
doc/html/images/up.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

BIN
doc/html/images/warning.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -8,16 +8,16 @@
<link rel="next" href="boost_optional/development.html" title="Development"> <link rel="next" href="boost_optional/development.html" title="Development">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%">
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../boost.png"></td>
<td align="center"><a href="../../../../index.htm">Home</a></td> <td align="center"><a href="../../index.htm">Home</a></td>
<td align="center"><a href="../../../libraries.htm">Libraries</a></td> <td align="center"><a href="libraries.html">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td> <td align="center"><a href="../../people/people.htm">People</a></td>
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td> <td align="center"><a href="../../more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td> <td align="center"><a href="../../more/index.htm">More</a></td>
</tr></table> </table>
<hr> <hr>
<div class="spirit-nav"><a accesskey="n" href="boost_optional/development.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a></div> <div class="spirit-nav"><a accesskey="n" href="boost_optional/development.html"><img src="images/next.png" alt="Next"></a></div>
<div class="chapter" lang="en"> <div class="chapter" lang="en">
<div class="titlepage"><div> <div class="titlepage"><div>
<div><h2 class="title"> <div><h2 class="title">
@ -27,7 +27,7 @@
</h3></div></div> </h3></div></div>
<div><p class="copyright">Copyright <20> 2003 -2007 Fernando Luis Cacciola Carballal</p></div> <div><p class="copyright">Copyright <20> 2003 -2007 Fernando Luis Cacciola Carballal</p></div>
<div><div class="legalnotice"> <div><div class="legalnotice">
<a name="id2604939"></a><p> <a name="id2604804"></a><p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p> </p>
@ -38,24 +38,9 @@
<dl> <dl>
<dt><span class="section"><a href="index.html#optional.motivation">Motivation</a></span></dt> <dt><span class="section"><a href="index.html#optional.motivation">Motivation</a></span></dt>
<dt><span class="section"><a href="boost_optional/development.html">Development</a></span></dt> <dt><span class="section"><a href="boost_optional/development.html">Development</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="boost_optional/development.html#boost_optional.development.the_models">The models</a></span></dt>
<dt><span class="section"><a href="boost_optional/development.html#boost_optional.development.the_semantics">The semantics</a></span></dt>
<dt><span class="section"><a href="boost_optional/development.html#boost_optional.development.the_interface">The Interface</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="boost_optional/synopsis.html">Synopsis</a></span></dt> <dt><span class="section"><a href="boost_optional/synopsis.html">Synopsis</a></span></dt>
<dt><span class="section"><a href="boost_optional/detailed_semantics.html">Detailed Semantics</a></span></dt> <dt><span class="section"><a href="boost_optional/detailed_semantics.html">Detailed Semantics</a></span></dt>
<dt><span class="section"><a href="boost_optional/examples.html">Examples</a></span></dt> <dt><span class="section"><a href="boost_optional/examples.html">Examples</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="boost_optional/examples.html#boost_optional.examples.optional_return_values">Optional
return values</a></span></dt>
<dt><span class="section"><a href="boost_optional/examples.html#boost_optional.examples.optional_local_variables">Optional
local variables</a></span></dt>
<dt><span class="section"><a href="boost_optional/examples.html#boost_optional.examples.optional_data_members">Optional
data members</a></span></dt>
<dt><span class="section"><a href="boost_optional/examples.html#boost_optional.examples.bypassing_expensive_unnecessary_default_construction">Bypassing
expensive unnecessary default construction</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="boost_optional/optional_references.html">Optional references</a></span></dt> <dt><span class="section"><a href="boost_optional/optional_references.html">Optional references</a></span></dt>
<dt><span class="section"><a href="boost_optional/rebinding_semantics_for_assignment_of_optional_references.html">Rebinding <dt><span class="section"><a href="boost_optional/rebinding_semantics_for_assignment_of_optional_references.html">Rebinding
semantics for assignment of optional references</a></span></dt> semantics for assignment of optional references</a></span></dt>
@ -174,10 +159,10 @@
</p> </p>
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"><p><small>Last revised: February 12, 2008 at 22:47:14 GMT</small></p></td> <td align="left"><small><p>Last revised: May 29, 2007 at 06:31:03 GMT</p></small></td>
<td align="right"><div class="copyright-footer"></div></td> <td align="right"><small></small></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"><a accesskey="n" href="boost_optional/development.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a></div> <div class="spirit-nav"><a accesskey="n" href="boost_optional/development.html"><img src="images/next.png" alt="Next"></a></div>
</body> </body>
</html> </html>

1676
doc/optional.html Normal file

File diff suppressed because it is too large Load Diff

View File

@ -21,16 +21,16 @@ Distributed under the Boost Software License, Version 1.0.
[/ Cited Boost resources ] [/ Cited Boost resources ]
[def __BOOST_VARIANT__ [@/libs/variant/index.html Boost.Variant]] [def __BOOST_VARIANT__ [@../../../variant/index.html Boost.Variant]]
[def __BOOST_TRIBOOL__ [@/doc/html/tribool.html boost::tribool]] [def __BOOST_TRIBOOL__ [@../../../tribool/index.html boost::tribool]]
[def __OPTIONAL_POINTEE__ [@/libs/utility/OptionalPointee.html OptionalPointee]] [def __OPTIONAL_POINTEE__ [@../../../utility/OptionalPointee.html OptionalPointee]]
[def __COPY_CONSTRUCTIBLE__ [@/libs/utility/CopyConstructible.html Copy Constructible]] [def __COPY_CONSTRUCTIBLE__ [@../../../utility/CopyConstructible.html Copy Constructible]]
[def __FUNCTION_EQUAL_POINTEES__ [@/libs/utility/OptionalPointee.html#equal `equal_pointees()`]] [def __FUNCTION_EQUAL_POINTEES__ [@../../../utility/OptionalPointee.html#equal `equal_pointees()`]]
[def __FUNCTION_LESS_POINTEES__ [@/libs/utility/OptionalPointee.html#less `less_pointees()`]] [def __FUNCTION_LESS_POINTEES__ [@../../../utility/OptionalPointee.html#less `less_pointees()`]]
[def __IN_PLACE_FACTORY_HPP__ [@/boost/utility/in_place_factory.hpp in_place_factory.hpp]] [def __IN_PLACE_FACTORY_HPP__ [@../../../../boost/utility/in_place_factory.hpp in_place_factory.hpp]]
[def __TYPED_IN_PLACE_FACTORY_HPP__ [@/boost/utility/typed_in_place_factory.hpp typed_in_place_factory.hpp]] [def __TYPED_IN_PLACE_FACTORY_HPP__ [@../../../../boost/utility/typed_in_place_factory.hpp typed_in_place_factory.hpp]]
[/ Other web resources ] [/ Other web resources ]
@ -40,6 +40,11 @@ Distributed under the Boost Software License, Version 1.0.
[/ Icons ] [/ Icons ]
[def __NOTE__ [$images/note.png]]
[def __ALERT__ [$images/caution.png]]
[def __DETAIL__ [$images/note.png]]
[def __TIP__ [$images/tip.png]]
[def __QUESTION_MARK__ [$images/question.png]]
[def __SPACE__ [$images/space.png]] [def __SPACE__ [$images/space.png]]
[def __GO_TO__ [$images/callouts/R.png]] [def __GO_TO__ [$images/callouts/R.png]]

View File

@ -126,7 +126,6 @@
Because `T` might be of reference type, in the sequel, those entries whose Because `T` might be of reference type, in the sequel, those entries whose
semantic depends on `T` being of reference type or not will be distinguished semantic depends on `T` being of reference type or not will be distinguished
using the following convention: using the following convention:
* If the entry reads: `optional<T`['(not a ref)]`>`, the description * If the entry reads: `optional<T`['(not a ref)]`>`, the description
corresponds only to the case where `T` is not of reference type. corresponds only to the case where `T` is not of reference type.
* If the entry reads: `optional<T&>`, the description corresponds only to * If the entry reads: `optional<T&>`, the description corresponds only to

View File

@ -4,7 +4,7 @@
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
// See http://www.boost.org/libs/optional for documentation. // See http://www.boost.org/lib/optional/ for documentation.
// //
// You are welcome to contact the author at: // You are welcome to contact the author at:
// fernando_cacciola@hotmail.com // fernando_cacciola@hotmail.com

View File

@ -4,7 +4,7 @@
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
// See http://www.boost.org/libs/optional for documentation. // See http://www.boost.org/lib/optional for documentation.
// //
// You are welcome to contact the author at: // You are welcome to contact the author at:
// fernando_cacciola@hotmail.com // fernando_cacciola@hotmail.com

View File

@ -4,7 +4,7 @@
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
// See http://www.boost.org/libs/optional for documentation. // See http://www.boost.org/lib/optional for documentation.
// //
// You are welcome to contact the author at: // You are welcome to contact the author at:
// fernando_cacciola@hotmail.com // fernando_cacciola@hotmail.com

View File

@ -1,4 +1,4 @@
// Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal. // Copyright (C) 2003, Fernando Luis Cacciola Carballal.
// //
// Use, modification, and distribution is subject to the Boost Software // Use, modification, and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@ -9,9 +9,6 @@
// You are welcome to contact the author at: // You are welcome to contact the author at:
// fernando_cacciola@hotmail.com // fernando_cacciola@hotmail.com
// //
// Revisions:
// 25 Apr 2008 (improved swap) Fernando Cacciola, Niels Dekker, Thorsten Ottosen
//
#ifndef BOOST_OPTIONAL_OPTIONAL_FLC_19NOV2002_HPP #ifndef BOOST_OPTIONAL_OPTIONAL_FLC_19NOV2002_HPP
#define BOOST_OPTIONAL_OPTIONAL_FLC_19NOV2002_HPP #define BOOST_OPTIONAL_OPTIONAL_FLC_19NOV2002_HPP
@ -22,7 +19,6 @@
#include "boost/assert.hpp" #include "boost/assert.hpp"
#include "boost/type.hpp" #include "boost/type.hpp"
#include "boost/type_traits/alignment_of.hpp" #include "boost/type_traits/alignment_of.hpp"
#include "boost/type_traits/has_nothrow_constructor.hpp"
#include "boost/type_traits/type_with_alignment.hpp" #include "boost/type_traits/type_with_alignment.hpp"
#include "boost/type_traits/remove_reference.hpp" #include "boost/type_traits/remove_reference.hpp"
#include "boost/type_traits/is_reference.hpp" #include "boost/type_traits/is_reference.hpp"
@ -30,9 +26,8 @@
#include "boost/mpl/bool.hpp" #include "boost/mpl/bool.hpp"
#include "boost/mpl/not.hpp" #include "boost/mpl/not.hpp"
#include "boost/detail/reference_content.hpp" #include "boost/detail/reference_content.hpp"
#include "boost/none.hpp" #include "boost/none_t.hpp"
#include "boost/utility/compare_pointees.hpp" #include "boost/utility/compare_pointees.hpp"
#include "boost/utility/in_place_factory.hpp"
#include "boost/optional/optional_fwd.hpp" #include "boost/optional/optional_fwd.hpp"
@ -81,19 +76,6 @@
#define BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION #define BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
#endif #endif
// Daniel Wallin discovered that bind/apply.hpp badly interacts with the apply<>
// member template of a factory as used in the optional<> implementation.
// He proposed this simple fix which is to move the call to apply<> outside
// namespace boost.
namespace boost_optional_detail
{
template <class T, class Factory>
void construct(Factory const& factory, void* address)
{
factory.BOOST_NESTED_TEMPLATE apply<T>(address);
}
}
namespace boost { namespace boost {
@ -191,7 +173,7 @@ class optional_base : public optional_tag
// Creates an optional<T> uninitialized. // Creates an optional<T> uninitialized.
// No-throw // No-throw
optional_base ( none_t ) optional_base ( none_t const& )
: :
m_initialized(false) {} m_initialized(false) {}
@ -284,7 +266,7 @@ class optional_base : public optional_tag
// Assigns from "none", destroying the current value, if any, leaving this UNINITIALIZED // Assigns from "none", destroying the current value, if any, leaving this UNINITIALIZED
// No-throw (assuming T::~T() doesn't) // No-throw (assuming T::~T() doesn't)
void assign ( none_t ) { destroy(); } void assign ( none_t const& ) { destroy(); }
#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT #ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
template<class Expr> template<class Expr>
@ -327,7 +309,7 @@ class optional_base : public optional_tag
void construct ( Expr const& factory, in_place_factory_base const* ) void construct ( Expr const& factory, in_place_factory_base const* )
{ {
BOOST_STATIC_ASSERT ( ::boost::mpl::not_<is_reference_predicate>::value ) ; BOOST_STATIC_ASSERT ( ::boost::mpl::not_<is_reference_predicate>::value ) ;
boost_optional_detail::construct<value_type>(factory, m_storage.address()); factory.BOOST_NESTED_TEMPLATE apply<value_type>(m_storage.address()) ;
m_initialized = true ; m_initialized = true ;
} }
@ -446,8 +428,6 @@ class optional_base : public optional_tag
// the following olverloads are used to filter out the case and guarantee an error in case of T being a reference. // the following olverloads are used to filter out the case and guarantee an error in case of T being a reference.
pointer_const_type cast_ptr( internal_type const* p, is_not_reference_tag ) const { return p ; } pointer_const_type cast_ptr( internal_type const* p, is_not_reference_tag ) const { return p ; }
pointer_type cast_ptr( internal_type * p, is_not_reference_tag ) { return p ; } pointer_type cast_ptr( internal_type * p, is_not_reference_tag ) { return p ; }
pointer_const_type cast_ptr( internal_type const* p, is_reference_tag ) const { return &p->get() ; }
pointer_type cast_ptr( internal_type * p, is_reference_tag ) { return &p->get() ; }
bool m_initialized ; bool m_initialized ;
storage_type m_storage ; storage_type m_storage ;
@ -479,7 +459,7 @@ class optional : public optional_detail::optional_base<T>
// Creates an optional<T> uninitialized. // Creates an optional<T> uninitialized.
// No-throw // No-throw
optional( none_t none_ ) : base(none_) {} optional( none_t const& none_ ) : base(none_) {}
// Creates an optional<T> initialized with 'val'. // Creates an optional<T> initialized with 'val'.
// Can throw if T::T(T const&) does // Can throw if T::T(T const&) does
@ -521,7 +501,7 @@ class optional : public optional_detail::optional_base<T>
// Creates a deep copy of another optional<T> // Creates a deep copy of another optional<T>
// Can throw if T::T(T const&) does // Can throw if T::T(T const&) does
optional ( optional const& rhs ) : base( static_cast<base const&>(rhs) ) {} optional ( optional const& rhs ) : base(rhs) {}
// No-throw (assuming T::~T() doesn't) // No-throw (assuming T::~T() doesn't)
~optional() {} ~optional() {}
@ -555,7 +535,7 @@ class optional : public optional_detail::optional_base<T>
// (NOTE: On BCB, this operator is not actually called and left is left UNMODIFIED in case of a throw) // (NOTE: On BCB, this operator is not actually called and left is left UNMODIFIED in case of a throw)
optional& operator= ( optional const& rhs ) optional& operator= ( optional const& rhs )
{ {
this->assign( static_cast<base const&>(rhs) ) ; this->assign( rhs ) ;
return *this ; return *this ;
} }
@ -570,20 +550,12 @@ class optional : public optional_detail::optional_base<T>
// Assigns from a "none" // Assigns from a "none"
// Which destroys the current value, if any, leaving this UNINITIALIZED // Which destroys the current value, if any, leaving this UNINITIALIZED
// No-throw (assuming T::~T() doesn't) // No-throw (assuming T::~T() doesn't)
optional& operator= ( none_t none_ ) optional& operator= ( none_t const& none_ )
{ {
this->assign( none_ ) ; this->assign( none_ ) ;
return *this ; return *this ;
} }
void swap( optional & arg )
{
// allow for Koenig lookup
using std::swap ;
swap(*this, arg);
}
// Returns a reference to the value if this is initialized, otherwise, // Returns a reference to the value if this is initialized, otherwise,
// the behaviour is UNDEFINED // the behaviour is UNDEFINED
// No-throw // No-throw
@ -706,11 +678,6 @@ get_pointer ( optional<T>& opt )
// optional's relational operators ( ==, !=, <, >, <=, >= ) have deep-semantics (compare values). // optional's relational operators ( ==, !=, <, >, <=, >= ) have deep-semantics (compare values).
// WARNING: This is UNLIKE pointers. Use equal_pointees()/less_pointess() in generic code instead. // WARNING: This is UNLIKE pointers. Use equal_pointees()/less_pointess() in generic code instead.
//
// optional<T> vs optional<T> cases
//
template<class T> template<class T>
inline inline
bool operator == ( optional<T> const& x, optional<T> const& y ) bool operator == ( optional<T> const& x, optional<T> const& y )
@ -741,141 +708,64 @@ inline
bool operator >= ( optional<T> const& x, optional<T> const& y ) bool operator >= ( optional<T> const& x, optional<T> const& y )
{ return !( x < y ) ; } { return !( x < y ) ; }
//
// optional<T> vs T cases
//
template<class T> template<class T>
inline inline
bool operator == ( optional<T> const& x, T const& y ) bool operator == ( optional<T> const& x, none_t const& )
{ return equal_pointees(x, optional<T>(y)); }
template<class T>
inline
bool operator < ( optional<T> const& x, T const& y )
{ return less_pointees(x, optional<T>(y)); }
template<class T>
inline
bool operator != ( optional<T> const& x, T const& y )
{ return !( x == y ) ; }
template<class T>
inline
bool operator > ( optional<T> const& x, T const& y )
{ return y < x ; }
template<class T>
inline
bool operator <= ( optional<T> const& x, T const& y )
{ return !( y < x ) ; }
template<class T>
inline
bool operator >= ( optional<T> const& x, T const& y )
{ return !( x < y ) ; }
//
// T vs optional<T> cases
//
template<class T>
inline
bool operator == ( T const& x, optional<T> const& y )
{ return equal_pointees( optional<T>(x), y ); }
template<class T>
inline
bool operator < ( T const& x, optional<T> const& y )
{ return less_pointees( optional<T>(x), y ); }
template<class T>
inline
bool operator != ( T const& x, optional<T> const& y )
{ return !( x == y ) ; }
template<class T>
inline
bool operator > ( T const& x, optional<T> const& y )
{ return y < x ; }
template<class T>
inline
bool operator <= ( T const& x, optional<T> const& y )
{ return !( y < x ) ; }
template<class T>
inline
bool operator >= ( T const& x, optional<T> const& y )
{ return !( x < y ) ; }
//
// optional<T> vs none cases
//
template<class T>
inline
bool operator == ( optional<T> const& x, none_t )
{ return equal_pointees(x, optional<T>() ); } { return equal_pointees(x, optional<T>() ); }
template<class T> template<class T>
inline inline
bool operator < ( optional<T> const& x, none_t ) bool operator < ( optional<T> const& x, none_t const& )
{ return less_pointees(x,optional<T>() ); } { return less_pointees(x,optional<T>() ); }
template<class T> template<class T>
inline inline
bool operator != ( optional<T> const& x, none_t y ) bool operator != ( optional<T> const& x, none_t const& y )
{ return !( x == y ) ; } { return !( x == y ) ; }
template<class T> template<class T>
inline inline
bool operator > ( optional<T> const& x, none_t y ) bool operator > ( optional<T> const& x, none_t const& y )
{ return y < x ; } { return y < x ; }
template<class T> template<class T>
inline inline
bool operator <= ( optional<T> const& x, none_t y ) bool operator <= ( optional<T> const& x, none_t const& y )
{ return !( y < x ) ; } { return !( y < x ) ; }
template<class T> template<class T>
inline inline
bool operator >= ( optional<T> const& x, none_t y ) bool operator >= ( optional<T> const& x, none_t const& y )
{ return !( x < y ) ; } { return !( x < y ) ; }
//
// none vs optional<T> cases
//
template<class T> template<class T>
inline inline
bool operator == ( none_t x, optional<T> const& y ) bool operator == ( none_t const& x, optional<T> const& y )
{ return equal_pointees(optional<T>() ,y); } { return equal_pointees(optional<T>() ,y); }
template<class T> template<class T>
inline inline
bool operator < ( none_t x, optional<T> const& y ) bool operator < ( none_t const& x, optional<T> const& y )
{ return less_pointees(optional<T>() ,y); } { return less_pointees(optional<T>() ,y); }
template<class T> template<class T>
inline inline
bool operator != ( none_t x, optional<T> const& y ) bool operator != ( none_t const& x, optional<T> const& y )
{ return !( x == y ) ; } { return !( x == y ) ; }
template<class T> template<class T>
inline inline
bool operator > ( none_t x, optional<T> const& y ) bool operator > ( none_t const& x, optional<T> const& y )
{ return y < x ; } { return y < x ; }
template<class T> template<class T>
inline inline
bool operator <= ( none_t x, optional<T> const& y ) bool operator <= ( none_t const& x, optional<T> const& y )
{ return !( y < x ) ; } { return !( y < x ) ; }
template<class T> template<class T>
inline inline
bool operator >= ( none_t x, optional<T> const& y ) bool operator >= ( none_t const& x, optional<T> const& y )
{ return !( x < y ) ; } { return !( x < y ) ; }
// //
@ -891,77 +781,44 @@ namespace optional_detail {
#define BOOST_OPTIONAL_STD_SWAP_INTRODUCED_AT_NS_SCOPE #define BOOST_OPTIONAL_STD_SWAP_INTRODUCED_AT_NS_SCOPE
#endif #endif
template<bool use_default_constructor> struct swap_selector; // optional's swap:
// If both are initialized, calls swap(T&, T&). If this swap throws, both will remain initialized but their values are now unspecified.
template<> // If only one is initialized, calls U.reset(*I), THEN I.reset().
struct swap_selector<true> // If U.reset(*I) throws, both are left UNCHANGED (U is kept uinitialized and I is never reset)
// If both are uninitialized, do nothing (no-throw)
template<class T>
inline
void optional_swap ( optional<T>& x, optional<T>& y )
{
if ( !x && !!y )
{ {
template<class T> x.reset(*y);
static void optional_swap ( optional<T>& x, optional<T>& y ) y.reset();
}
else if ( !!x && !y )
{ {
bool hasX = x; y.reset(*x);
bool hasY = y; x.reset();
}
if ( !hasX && !hasY ) else if ( !!x && !!y )
return; {
// GCC > 3.2 and all other compilers have the using declaration at function scope (FLC)
if( !hasX )
x = boost::in_place();
else if ( !hasY )
y = boost::in_place();
// GCC > 3.2 and all other compilers have the using declaration at function scope (FLC)
#ifndef BOOST_OPTIONAL_STD_SWAP_INTRODUCED_AT_NS_SCOPE #ifndef BOOST_OPTIONAL_STD_SWAP_INTRODUCED_AT_NS_SCOPE
// allow for Koenig lookup // allow for Koenig lookup
using std::swap ; using std::swap ;
#endif #endif
swap(*x,*y); swap(*x,*y);
if( !hasX )
y = boost::none ;
else if( !hasY )
x = boost::none ;
} }
}; }
template<>
struct swap_selector<false>
{
template<class T>
static void optional_swap ( optional<T>& x, optional<T>& y )
{
if ( !x && !!y )
{
x = *y;
y = boost::none ;
}
else if ( !!x && !y )
{
y = *x ;
x = boost::none ;
}
else if ( !!x && !!y )
{
// GCC > 3.2 and all other compilers have the using declaration at function scope (FLC)
#ifndef BOOST_OPTIONAL_STD_SWAP_INTRODUCED_AT_NS_SCOPE
// allow for Koenig lookup
using std::swap ;
#endif
swap(*x,*y);
}
}
};
} // namespace optional_detail } // namespace optional_detail
template<class T>
struct optional_swap_should_use_default_constructor : has_nothrow_default_constructor<T> {} ;
template<class T> inline void swap ( optional<T>& x, optional<T>& y ) template<class T> inline void swap ( optional<T>& x, optional<T>& y )
{ {
optional_detail::swap_selector<optional_swap_should_use_default_constructor<T>::value>::optional_swap(x, y); optional_detail::optional_swap(x,y);
} }
} // namespace boost } // namespace boost
#endif #endif

View File

@ -1,11 +1,11 @@
<html> <html>
<head> <head>
<meta http-equiv="refresh" content="0; URL=doc/html/index.html"> <meta http-equiv="refresh" content="0; URL=doc/optional.html">
</head> </head>
<body> <body>
Automatic redirection failed, please go to Automatic redirection failed, please go to
<a href="doc/html/index.html">doc/html/index.html</a>.&nbsp;<hr> <a href="doc/optional.html">doc/optional.html</a>.&nbsp;<hr>
<p><EFBFBD> Copyright Beman Dawes, 2001</p> <p><EFBFBD> Copyright Beman Dawes, 2001</p>
<p>Distributed under the Boost Software License, Version 1.0. (See accompanying <p>Distributed under the Boost Software License, Version 1.0. (See accompanying
file <a href="../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or copy file <a href="../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or copy
at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</p> at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</p>

1
test/.cvsignore Normal file
View File

@ -0,0 +1 @@
bin

View File

@ -22,9 +22,11 @@ import testing ;
[ run optional_test_inplace.cpp ] [ run optional_test_inplace.cpp ]
[ run optional_test_io.cpp ] [ run optional_test_io.cpp ]
[ compile-fail optional_test_fail1.cpp ] [ compile-fail optional_test_fail1.cpp ]
[ compile-fail optional_test_fail2.cpp ]
[ compile-fail optional_test_fail3a.cpp ] [ compile-fail optional_test_fail3a.cpp ]
[ compile-fail optional_test_fail3b.cpp ] [ compile-fail optional_test_fail3b.cpp ]
[ compile-fail optional_test_ref_fail1.cpp ] [ compile-fail optional_test_ref_fail1.cpp ]
[ compile-fail optional_test_ref_fail2.cpp ]
[ compile-fail optional_test_ref_fail3.cpp ] [ compile-fail optional_test_ref_fail3.cpp ]
[ compile-fail optional_test_ref_fail4.cpp ] [ compile-fail optional_test_ref_fail4.cpp ]
[ compile-fail optional_test_inplace_fail.cpp ] [ compile-fail optional_test_inplace_fail.cpp ]

View File

@ -1,4 +1,4 @@
// Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal. // Copyright (C) 2003, Fernando Luis Cacciola Carballal.
// //
// Use, modification, and distribution is subject to the Boost Software // Use, modification, and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@ -9,9 +9,6 @@
// You are welcome to contact the author at: // You are welcome to contact the author at:
// fernando_cacciola@hotmail.com // fernando_cacciola@hotmail.com
// //
// Revisions:
// 25 Apr 2008 (added more swap tests)
//
#include<iostream> #include<iostream>
#include<stdexcept> #include<stdexcept>
#include<string> #include<string>
@ -19,8 +16,6 @@
#define BOOST_ENABLE_ASSERT_HANDLER #define BOOST_ENABLE_ASSERT_HANDLER
#include "boost/bind/apply.hpp" // Included just to test proper interaction with boost::apply<> as reported by Daniel Wallin #include "boost/bind/apply.hpp" // Included just to test proper interaction with boost::apply<> as reported by Daniel Wallin
#include "boost/mpl/bool.hpp"
#include "boost/mpl/bool_fwd.hpp" // For mpl::true_ and mpl::false_
#include "boost/optional/optional.hpp" #include "boost/optional/optional.hpp"
@ -709,9 +704,9 @@ void test_relops( T const* )
{ {
TRACE( std::endl << BOOST_CURRENT_FUNCTION ); TRACE( std::endl << BOOST_CURRENT_FUNCTION );
T v0(0); T v0(18);
T v1(1); T v1(19);
T v2(1); T v2(19);
optional<T> def0 ; optional<T> def0 ;
optional<T> def1 ; optional<T> def1 ;
@ -756,33 +751,6 @@ void test_relops( T const* )
BOOST_CHECK ( opt1 > opt0 ) ; BOOST_CHECK ( opt1 > opt0 ) ;
BOOST_CHECK ( opt1 <= opt2 ) ; BOOST_CHECK ( opt1 <= opt2 ) ;
BOOST_CHECK ( opt1 >= opt0 ) ; BOOST_CHECK ( opt1 >= opt0 ) ;
// Compare against a value directly
BOOST_CHECK ( opt0 == v0 ) ;
BOOST_CHECK ( opt0 != v1 ) ;
BOOST_CHECK ( opt1 == v2 ) ;
BOOST_CHECK ( opt0 < v1 ) ;
BOOST_CHECK ( opt1 > v0 ) ;
BOOST_CHECK ( opt1 <= v2 ) ;
BOOST_CHECK ( opt1 >= v0 ) ;
BOOST_CHECK ( v0 != opt1 ) ;
BOOST_CHECK ( v1 == opt2 ) ;
BOOST_CHECK ( v0 < opt1 ) ;
BOOST_CHECK ( v1 > opt0 ) ;
BOOST_CHECK ( v1 <= opt2 ) ;
BOOST_CHECK ( v1 >= opt0 ) ;
BOOST_CHECK ( def0 != v0 ) ;
BOOST_CHECK ( !(def0 == v0) ) ;
BOOST_CHECK ( def0 < v0 ) ;
BOOST_CHECK ( !(def0 > v0) ) ;
BOOST_CHECK ( def0 <= v0 ) ;
BOOST_CHECK ( !(def0 >= v0) ) ;
BOOST_CHECK ( v0 != def0 ) ;
BOOST_CHECK ( !(v0 == def0) ) ;
BOOST_CHECK ( !(v0 < def0) ) ;
BOOST_CHECK ( v0 > def0 ) ;
BOOST_CHECK ( !(v0 <= def0) ) ;
BOOST_CHECK ( v0 >= opt0 ) ;
} }
template<class T> template<class T>
@ -799,10 +767,6 @@ void test_none( T const* )
BOOST_CHECK ( def0 == none ) ; BOOST_CHECK ( def0 == none ) ;
BOOST_CHECK ( non_def != none ) ; BOOST_CHECK ( non_def != none ) ;
BOOST_CHECK ( !def1 ) ; BOOST_CHECK ( !def1 ) ;
BOOST_CHECK ( !(non_def < none) ) ;
BOOST_CHECK ( non_def > none ) ;
BOOST_CHECK ( !(non_def <= none) ) ;
BOOST_CHECK ( non_def >= none ) ;
non_def = none ; non_def = none ;
BOOST_CHECK ( !non_def ) ; BOOST_CHECK ( !non_def ) ;
@ -810,24 +774,6 @@ void test_none( T const* )
test_default_implicit_construction(T(1),none); test_default_implicit_construction(T(1),none);
} }
template<class T>
void test_arrow( T const* )
{
TRACE( std::endl << BOOST_CURRENT_FUNCTION );
T a(1234);
optional<T> oa(a) ;
optional<T> const coa(a) ;
BOOST_CHECK ( coa->V() == 1234 ) ;
oa->V() = 4321 ;
BOOST_CHECK ( a.V() = 1234 ) ;
BOOST_CHECK ( (*oa).V() = 4321 ) ;
}
void test_with_builtin_types() void test_with_builtin_types()
{ {
TRACE( std::endl << BOOST_CURRENT_FUNCTION ); TRACE( std::endl << BOOST_CURRENT_FUNCTION );
@ -858,7 +804,6 @@ void test_with_class_type()
test_throwing_swap( ARG(X) ); test_throwing_swap( ARG(X) );
test_relops( ARG(X) ) ; test_relops( ARG(X) ) ;
test_none( ARG(X) ) ; test_none( ARG(X) ) ;
test_arrow( ARG(X) ) ;
BOOST_CHECK ( X::count == 0 ) ; BOOST_CHECK ( X::count == 0 ) ;
} }
@ -932,185 +877,6 @@ void test_conversions2()
BOOST_CHECK(*get(&opt1) == static_cast<double>(f)); BOOST_CHECK(*get(&opt1) == static_cast<double>(f));
} }
namespace optional_swap_test
{
class default_ctor_exception : public std::exception {} ;
class copy_ctor_exception : public std::exception {} ;
class assignment_exception : public std::exception {} ;
//
// Base class for swap test classes. Its assignment should not be called, when swapping
// optional<T> objects. (The default std::swap would do so.)
//
class base_class_with_forbidden_assignment
{
public:
base_class_with_forbidden_assignment & operator=(const base_class_with_forbidden_assignment &)
{
BOOST_CHECK(!"The assignment should not be used while swapping!");
throw assignment_exception();
}
virtual ~base_class_with_forbidden_assignment() {}
};
//
// Class without default constructor
//
class class_without_default_ctor : public base_class_with_forbidden_assignment
{
public:
char data;
explicit class_without_default_ctor(char arg) : data(arg) {}
};
//
// Class whose default constructor should not be used by optional::swap!
//
class class_whose_default_ctor_should_not_be_used : public base_class_with_forbidden_assignment
{
public:
char data;
explicit class_whose_default_ctor_should_not_be_used(char arg) : data(arg) {}
class_whose_default_ctor_should_not_be_used()
{
BOOST_CHECK(!"This default constructor should not be used while swapping!");
throw default_ctor_exception();
}
};
//
// Class whose default constructor should be used by optional::swap.
// Its copy constructor should be avoided!
//
class class_whose_default_ctor_should_be_used : public base_class_with_forbidden_assignment
{
public:
char data;
explicit class_whose_default_ctor_should_be_used(char arg) : data(arg) { }
class_whose_default_ctor_should_be_used() : data('\0') { }
class_whose_default_ctor_should_be_used(const class_whose_default_ctor_should_be_used &)
{
BOOST_CHECK(!"This copy constructor should not be used while swapping!");
throw copy_ctor_exception();
}
};
void swap(class_whose_default_ctor_should_not_be_used & lhs, class_whose_default_ctor_should_not_be_used & rhs)
{
std::swap(lhs.data, rhs.data);
}
void swap(class_whose_default_ctor_should_be_used & lhs, class_whose_default_ctor_should_be_used & rhs)
{
std::swap(lhs.data, rhs.data);
}
void swap(class_without_default_ctor & lhs, class_without_default_ctor & rhs)
{
std::swap(lhs.data, rhs.data);
}
} // End of namespace optional_swap_test.
namespace boost {
//
// Compile time tweaking on whether or not swap should use the default constructor:
//
template <> struct optional_swap_should_use_default_constructor<
::optional_swap_test::class_whose_default_ctor_should_be_used> : mpl::true_ {} ;
template <> struct optional_swap_should_use_default_constructor<
::optional_swap_test::class_whose_default_ctor_should_not_be_used> : mpl::false_ {} ;
}
//
// Tests whether the swap function works properly for optional<T>.
// Assumes that T has one data member, of type char.
// Returns true iff the test is passed.
//
template <class T>
bool test_swap_function( T const* )
{
const boost::unit_test::counter_t counter_before_test = boost::minimal_test::errors_counter();
try
{
optional<T> obj1;
optional<T> obj2('a');
// Test if obj1 and obj2 are properly initialized.
BOOST_CHECK(!obj1);
BOOST_CHECK(!!obj2 && obj2->data == 'a');
// Call non-member swap
swap(obj1, obj2);
// Test if obj1 and obj2 are really swapped
BOOST_CHECK(!!obj1 && obj1->data == 'a');
BOOST_CHECK(!obj2);
}
catch(const std::exception &)
{
// The swap function should not throw, for our test cases.
return false ;
}
return boost::minimal_test::errors_counter() == counter_before_test ;
}
//
// Tests whether the optional<T>::swap member function works properly.
// Assumes that T has one data member, of type char.
// Returns true iff the test is passed.
//
template <class T>
bool test_swap_member_function( T const* )
{
const boost::unit_test::counter_t counter_before_test = boost::minimal_test::errors_counter();
try
{
optional<T> obj1;
optional<T> obj2('a');
// Test if obj1 and obj2 are properly initialized.
BOOST_CHECK(!obj1);
BOOST_CHECK(!!obj2 && obj2->data == 'a');
// Call member swap
obj1.swap(obj2);
// Test if obj1 and obj2 are really swapped
BOOST_CHECK(!!obj1 && obj1->data == 'a');
BOOST_CHECK(!obj2);
}
catch(const std::exception &)
{
// The optional<T>::swap member function should not throw, for our test cases.
return false ;
}
return boost::minimal_test::errors_counter() == counter_before_test ;
}
//
// Tests compile time tweaking of swap, by means of
// optional_swap_should_use_default_constructor.
//
void test_swap_tweaking()
{
BOOST_CHECK( test_swap_function( ARG(optional_swap_test::class_without_default_ctor) ) );
BOOST_CHECK( test_swap_function( ARG(optional_swap_test::class_whose_default_ctor_should_be_used) ) );
BOOST_CHECK( test_swap_function( ARG(optional_swap_test::class_whose_default_ctor_should_not_be_used) ) );
BOOST_CHECK( test_swap_member_function( ARG(optional_swap_test::class_without_default_ctor) ) );
BOOST_CHECK( test_swap_member_function( ARG(optional_swap_test::class_whose_default_ctor_should_be_used) ) );
BOOST_CHECK( test_swap_member_function( ARG(optional_swap_test::class_whose_default_ctor_should_not_be_used) ) );
}
int test_main( int, char* [] ) int test_main( int, char* [] )
{ {
try try
@ -1120,7 +886,6 @@ int test_main( int, char* [] )
test_no_implicit_conversions(); test_no_implicit_conversions();
test_conversions1(); test_conversions1();
test_conversions2(); test_conversions2();
test_swap_tweaking();
} }
catch ( ... ) catch ( ... )
{ {

View File

@ -299,23 +299,6 @@ void test_none( T const* )
BOOST_CHECK ( !non_def ) ; BOOST_CHECK ( !non_def ) ;
} }
template<class T>
void test_arrow( T const* )
{
TRACE( std::endl << BOOST_CURRENT_FUNCTION );
T a(1234);
optional<T&> oa(a) ;
optional<T&> const coa(a) ;
BOOST_CHECK ( coa->V() == 1234 ) ;
oa->V() = 4321 ;
BOOST_CHECK ( a.V() = 4321 ) ;
}
void test_with_builtin_types() void test_with_builtin_types()
{ {
TRACE( std::endl << BOOST_CURRENT_FUNCTION ); TRACE( std::endl << BOOST_CURRENT_FUNCTION );
@ -332,35 +315,16 @@ void test_with_class_type()
test_basics( ARG(X) ); test_basics( ARG(X) );
test_relops( ARG(X) ) ; test_relops( ARG(X) ) ;
test_none ( ARG(X) ) ; test_none ( ARG(X) ) ;
test_arrow ( ARG(X) ) ;
BOOST_CHECK ( X::count == 0 ) ; BOOST_CHECK ( X::count == 0 ) ;
} }
void test_binding()
{
int i = 0 ;
optional<int&> ori1 = i ;
BOOST_CHECK( &(*ori1) == &i ) ;
optional<int&> ori2(i) ;
BOOST_CHECK( &(*ori2) == &i ) ;
int const ci = 0 ;
optional<int const&> orci1 = ci ;
BOOST_CHECK( &(*orci1) == &ci ) ;
optional<int const&> orci2(ci) ;
BOOST_CHECK( &(*orci2) == &ci ) ;
}
int test_main( int, char* [] ) int test_main( int, char* [] )
{ {
try try
{ {
test_with_class_type(); test_with_class_type();
test_with_builtin_types(); test_with_builtin_types();
test_binding();
} }
catch ( ... ) catch ( ... )
{ {

View File

@ -0,0 +1,23 @@
// Copyright (C) 2003, Fernando Luis Cacciola Carballal.
//
// Use, modification, and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/lib/optional for documentation.
//
// You are welcome to contact the author at:
// fernando_cacciola@hotmail.com
//
#include "boost/optional.hpp"
//
// THIS TEST SHOULD FAIL TO COMPILE
//
void optional_reference__test_no_ptr_access()
{
boost::optional<int&> opt ;
opt.get_ptr();
}