mirror of
https://github.com/boostorg/optional.git
synced 2025-07-23 17:17:17 +02:00
Copy-editing optional documentation. Fixes #5382 and a few other issues I noticed while I was at it.
[SVN r71052]
This commit is contained in:
@ -217,8 +217,7 @@
|
||||
otherwise, same as:
|
||||
</li></ul></div>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<code class="computeroutput"><span class="identifier">optional</span><span class="special"><</span><span class="identifier">T</span> <span class="special">[</span><span class="error">'</span><span class="special">(</span><span class="keyword">not</span> <span class="identifier">a</span>
|
||||
<span class="identifier">ref</span><span class="special">)]>::</span><span class="identifier">optional</span><span class="special">()</span></code>
|
||||
<code class="computeroutput"><span class="identifier">optional</span><span class="special"><</span><span class="identifier">T</span> </code><span class="emphasis"><em>(not a ref)</em></span><code class="computeroutput"><span class="special">>::</span><span class="identifier">optional</span><span class="special">()</span></code>
|
||||
</p></blockquote></div>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<code class="computeroutput"><span class="identifier">optional</span><span class="special"><</span><span class="identifier">T</span><span class="special">&></span> <span class="special">::</span><span class="identifier">optional</span><span class="special">()</span></code>
|
||||
@ -712,7 +711,7 @@
|
||||
<span class="bold"><strong>Exception Safety:</strong></span> Exceptions can only
|
||||
be thrown during the call to the <code class="computeroutput"><span class="identifier">T</span></code>
|
||||
constructor used by the factory; in that case, the <code class="computeroutput"><span class="identifier">optional</span></code>
|
||||
object will be left empty.
|
||||
object will be reset to be <span class="emphasis"><em>uninitialized</em></span>.
|
||||
</li>
|
||||
</ul></div>
|
||||
<p>
|
||||
|
@ -96,7 +96,7 @@
|
||||
value of <code class="computeroutput"><span class="identifier">T</span></code> or nothing.
|
||||
</p>
|
||||
<p>
|
||||
As of this writing I don't know of any precedence for a variable-size fixed-capacity
|
||||
As of this writing I don't know of any precedent for a variable-size fixed-capacity
|
||||
(of 1) stack-based container model for optional values, yet I believe this
|
||||
is the consequence of the lack of practical implementations of such a container
|
||||
rather than an inherent shortcoming of the container model.
|
||||
@ -302,7 +302,7 @@
|
||||
A relevant feature of a pointer is that it can have a <span class="bold"><strong>null
|
||||
pointer value</strong></span>. This is a <span class="emphasis"><em>special</em></span> value which
|
||||
is used to indicate that the pointer is not referring to any object at all.
|
||||
In other words, null pointer values convey the notion of inexistent objects.
|
||||
In other words, null pointer values convey the notion of nonexistent objects.
|
||||
</p>
|
||||
<p>
|
||||
This meaning of the null pointer value allowed pointers to became a <span class="emphasis"><em>de
|
||||
@ -310,7 +310,7 @@
|
||||
to do to refer to a value which you don't really have is to use a null pointer
|
||||
value of the appropriate type. Pointers have been used for decades—from
|
||||
the days of C APIs to modern C++ libraries—to <span class="emphasis"><em>refer</em></span>
|
||||
to optional (that is, possibly inexistent) objects; particularly as optional
|
||||
to optional (that is, possibly nonexistent) objects; particularly as optional
|
||||
arguments to a function, but also quite often as optional data members.
|
||||
</p>
|
||||
<p>
|
||||
|
Reference in New Issue
Block a user