3 <meta http-equiv=
"Content-Type" content=
"text/html; charset=US-ASCII">
4 <title>Detailed semantics
</title>
5 <link rel=
"stylesheet" href=
"../../../../../../../doc/src/boostbook.css" type=
"text/css">
6 <meta name=
"generator" content=
"DocBook XSL Stylesheets V1.78.1">
7 <link rel=
"home" href=
"../../../index.html" title=
"Boost.Optional">
8 <link rel=
"up" href=
"../io_header.html" title=
"Header <boost/optional/optional_io.hpp>">
9 <link rel=
"prev" href=
"../io_header.html" title=
"Header <boost/optional/optional_io.hpp>">
10 <link rel=
"next" href=
"../header__boost_optional_optional_fwd_hpp_.html" title=
"Header <boost/optional/optional_fwd.hpp>">
12 <body bgcolor=
"white" text=
"black" link=
"#0000FF" vlink=
"#840084" alink=
"#0000FF">
13 <table cellpadding=
"2" width=
"100%"><tr>
14 <td valign=
"top"><img alt=
"Boost C++ Libraries" width=
"277" height=
"86" src=
"../../../../../../../boost.png"></td>
15 <td align=
"center"><a href=
"../../../../../../../index.html">Home
</a></td>
16 <td align=
"center"><a href=
"../../../../../../../libs/libraries.htm">Libraries
</a></td>
17 <td align=
"center"><a href=
"http://www.boost.org/users/people.html">People
</a></td>
18 <td align=
"center"><a href=
"http://www.boost.org/users/faq.html">FAQ
</a></td>
19 <td align=
"center"><a href=
"../../../../../../../more/index.htm">More
</a></td>
22 <div class=
"spirit-nav">
23 <a accesskey=
"p" href=
"../io_header.html"><img src=
"../../../../../../../doc/src/images/prev.png" alt=
"Prev"></a><a accesskey=
"u" href=
"../io_header.html"><img src=
"../../../../../../../doc/src/images/up.png" alt=
"Up"></a><a accesskey=
"h" href=
"../../../index.html"><img src=
"../../../../../../../doc/src/images/home.png" alt=
"Home"></a><a accesskey=
"n" href=
"../header__boost_optional_optional_fwd_hpp_.html"><img src=
"../../../../../../../doc/src/images/next.png" alt=
"Next"></a>
26 <div class=
"titlepage"><div><div><h4 class=
"title">
27 <a name=
"boost_optional.reference.io_header.io_semantics"></a><a class=
"link" href=
"io_semantics.html" title=
"Detailed semantics">Detailed
29 </h4></div></div></div>
31 <a name=
"reference_operator_ostream"></a><code class=
"computeroutput"><span class=
"keyword">template
</span>
32 <span class=
"special"><</span><span class=
"keyword">class
</span>
33 <span class=
"identifier">CharType
</span><span class=
"special">,
</span>
34 <span class=
"keyword">class
</span> <span class=
"identifier">CharTrait
</span><span class=
"special">,
</span> <span class=
"keyword">class
</span> <span class=
"identifier">T
</span><span class=
"special">></span></code>
35 <br>     <code class=
"computeroutput"><span class=
"identifier">std
</span><span class=
"special">::
</span><span class=
"identifier">basic_ostream
</span><span class=
"special"><</span><span class=
"identifier">CharType
</span><span class=
"special">,
</span> <span class=
"identifier">CharTrait
</span><span class=
"special">>&</span></code> <br>     <code class=
"computeroutput"><span class=
"keyword">operator
</span><span class=
"special"><<(
</span><span class=
"identifier">std
</span><span class=
"special">::
</span><span class=
"identifier">basic_ostream
</span><span class=
"special"><</span><span class=
"identifier">CharType
</span><span class=
"special">,
</span> <span class=
"identifier">CharTrait
</span><span class=
"special">>&</span>
36 <span class=
"identifier">out
</span><span class=
"special">,
</span>
37 <span class=
"identifier">optional
</span><span class=
"special"><</span><span class=
"identifier">T
</span><span class=
"special">></span> <span class=
"keyword">const
</span><span class=
"special">&</span> <span class=
"identifier">v
</span><span class=
"special">);
</span></code>
39 <div class=
"itemizedlist"><ul class=
"itemizedlist" style=
"list-style-type: disc; ">
41 <span class=
"bold"><strong>Effect:
</strong></span> Outputs an implementation-defined
42 string. The output contains the information about whether the optional
43 object contains a value or not. If
<code class=
"computeroutput"><span class=
"identifier">v
</span></code>
44 contains a value, the output contains result of calling
<code class=
"computeroutput"><span class=
"identifier">out
</span> <span class=
"special"><<</span>
45 <span class=
"special">*
</span><span class=
"identifier">v
</span></code>.
48 <span class=
"bold"><strong>Returns:
</strong></span> <code class=
"computeroutput"><span class=
"identifier">out
</span></code>.
52 <span class=
"inlinemediaobject"><img src=
"../../../images/space.png" alt=
"space"></span> <a name=
"reference_operator_ostream_none"></a>
55 <code class=
"computeroutput"><span class=
"keyword">template
</span> <span class=
"special"><</span><span class=
"keyword">class
</span> <span class=
"identifier">CharType
</span><span class=
"special">,
</span> <span class=
"keyword">class
</span> <span class=
"identifier">CharTrait
</span><span class=
"special">,
</span>
56 <span class=
"keyword">class
</span> <span class=
"identifier">T
</span><span class=
"special">></span></code> <br>     <code class=
"computeroutput"><span class=
"identifier">std
</span><span class=
"special">::
</span><span class=
"identifier">basic_ostream
</span><span class=
"special"><</span><span class=
"identifier">CharType
</span><span class=
"special">,
</span> <span class=
"identifier">CharTrait
</span><span class=
"special">>&</span></code>
57 <br>     <code class=
"computeroutput"><span class=
"keyword">operator
</span><span class=
"special"><<(
</span><span class=
"identifier">std
</span><span class=
"special">::
</span><span class=
"identifier">basic_ostream
</span><span class=
"special"><</span><span class=
"identifier">CharType
</span><span class=
"special">,
</span> <span class=
"identifier">CharTrait
</span><span class=
"special">>&</span> <span class=
"identifier">out
</span><span class=
"special">,
</span> <span class=
"identifier">none_t
</span><span class=
"special">);
</span></code>
59 <div class=
"itemizedlist"><ul class=
"itemizedlist" style=
"list-style-type: disc; ">
61 <span class=
"bold"><strong>Effect:
</strong></span> Outputs an implementation-defined
65 <span class=
"bold"><strong>Returns:
</strong></span> <code class=
"computeroutput"><span class=
"identifier">out
</span></code>.
69 <span class=
"inlinemediaobject"><img src=
"../../../images/space.png" alt=
"space"></span> <a name=
"reference_operator_istream"></a>
72 <code class=
"computeroutput"><span class=
"keyword">template
</span> <span class=
"special"><</span><span class=
"keyword">class
</span> <span class=
"identifier">CharType
</span><span class=
"special">,
</span> <span class=
"keyword">class
</span> <span class=
"identifier">CharTrait
</span><span class=
"special">,
</span>
73 <span class=
"keyword">class
</span> <span class=
"identifier">T
</span><span class=
"special">></span></code> <br>     <code class=
"computeroutput"><span class=
"identifier">std
</span><span class=
"special">::
</span><span class=
"identifier">basic_ostream
</span><span class=
"special"><</span><span class=
"identifier">CharType
</span><span class=
"special">,
</span> <span class=
"identifier">CharTrait
</span><span class=
"special">>&</span></code>
74 <br>     <code class=
"computeroutput"><span class=
"keyword">operator
</span><span class=
"special">>>(
</span><span class=
"identifier">std
</span><span class=
"special">::
</span><span class=
"identifier">basic_istream
</span><span class=
"special"><</span><span class=
"identifier">CharType
</span><span class=
"special">,
</span> <span class=
"identifier">CharTrait
</span><span class=
"special">>&</span> <span class=
"identifier">in
</span><span class=
"special">,
</span> <span class=
"identifier">optional
</span><span class=
"special"><</span><span class=
"identifier">T
</span><span class=
"special">>&</span> <span class=
"identifier">v
</span><span class=
"special">);
</span></code>
76 <div class=
"itemizedlist"><ul class=
"itemizedlist" style=
"list-style-type: disc; ">
78 <span class=
"bold"><strong>Requires:
</strong></span> <code class=
"computeroutput"><span class=
"identifier">T
</span></code>
79 is
<a href=
"http://www.sgi.com/tech/stl/DefaultConstructible.html" target=
"_top"><code class=
"computeroutput"><span class=
"identifier">DefaultConstructible
</span></code></a> and
80 <code class=
"computeroutput"><span class=
"identifier">MoveConstructible
</span></code>.
83 <span class=
"bold"><strong>Effect:
</strong></span> Reads the value of optional
84 object from
<code class=
"computeroutput"><span class=
"identifier">in
</span></code>. If
85 the string representation indicates that the optional object should
86 contain a value,
<code class=
"computeroutput"><span class=
"identifier">v
</span></code>
87 contains a value and its contained value is obtained as if by default-constructing
88 an object
<code class=
"computeroutput"><span class=
"identifier">o
</span></code> of type
89 <code class=
"computeroutput"><span class=
"identifier">T
</span></code> and then calling
90 <code class=
"computeroutput"><span class=
"identifier">in
</span> <span class=
"special">>></span>
91 <span class=
"identifier">o
</span></code>; otherwise
<code class=
"computeroutput"><span class=
"identifier">v
</span></code> does not contain a value, and the
92 previously contained value (if any) has been destroyed.
95 <span class=
"bold"><strong>Returns:
</strong></span> <code class=
"computeroutput"><span class=
"identifier">out
</span></code>.
99 <table xmlns:
rev=
"http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width=
"100%"><tr>
100 <td align=
"left"></td>
101 <td align=
"right"><div class=
"copyright-footer">Copyright
© 2003-
2007 Fernando Luis Cacciola Carballal
<br>Copyright
© 2014-
2016 Andrzej Krzemie
ński
<p>
102 Distributed under the Boost Software License, Version
1.0. (See accompanying
103 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>)
108 <div class=
"spirit-nav">
109 <a accesskey=
"p" href=
"../io_header.html"><img src=
"../../../../../../../doc/src/images/prev.png" alt=
"Prev"></a><a accesskey=
"u" href=
"../io_header.html"><img src=
"../../../../../../../doc/src/images/up.png" alt=
"Up"></a><a accesskey=
"h" href=
"../../../index.html"><img src=
"../../../../../../../doc/src/images/home.png" alt=
"Home"></a><a accesskey=
"n" href=
"../header__boost_optional_optional_fwd_hpp_.html"><img src=
"../../../../../../../doc/src/images/next.png" alt=
"Next"></a>