Fix some more typos and grammatical errors.

[SVN r71089]
This commit is contained in:
Steven Watanabe
2011-04-07 19:56:55 +00:00
parent c1d2381a9b
commit f9c46f9a86
5 changed files with 21 additions and 22 deletions

View File

@ -474,13 +474,12 @@
<div class="blockquote"><blockquote class="blockquote"><p> <div class="blockquote"><blockquote class="blockquote"><p>
<code class="computeroutput"><span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&amp;&gt;&amp;</span> <code class="computeroutput"><span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&amp;&gt;&amp;</span>
<span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&amp;&gt;::</span><span class="keyword">operator</span><span class="special">=</span> <span class="special">(</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&amp;&gt;::</span><span class="keyword">operator</span><span class="special">=</span> <span class="special">(</span> <span class="identifier">T</span><span class="special">&amp;</span>
<span class="keyword">const</span><span class="special">&amp;</span>
<span class="identifier">rhs</span> <span class="special">)</span> <span class="identifier">rhs</span> <span class="special">)</span>
<span class="special">;</span></code> <span class="special">;</span></code>
</p></blockquote></div> </p></blockquote></div>
<div class="itemizedlist"><ul class="itemizedlist" type="disc"> <div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem"> <li class="listitem">
<span class="bold"><strong>Effect:</strong></span> (Re)binds thee wrapped reference. <span class="bold"><strong>Effect:</strong></span> (Re)binds the wrapped reference.
</li> </li>
<li class="listitem"> <li class="listitem">
<span class="bold"><strong>Postconditions: </strong></span> <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> is initialized and it references the <span class="bold"><strong>Postconditions: </strong></span> <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> is initialized and it references the

View File

@ -42,7 +42,7 @@
</pre> </pre>
<p> <p>
If you assign to a bare C++ reference, the assignment is forwarded to the referenced If you assign to a bare C++ reference, the assignment is forwarded to the referenced
object; it's value changes but the reference is never rebound. object; its value changes but the reference is never rebound.
</p> </p>
<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">a</span> <span class="special">=</span> <span class="number">1</span> <span class="special">;</span> <pre class="programlisting"><span class="keyword">int</span> <span class="identifier">a</span> <span class="special">=</span> <span class="number">1</span> <span class="special">;</span>
<span class="keyword">int</span><span class="special">&amp;</span> <span class="identifier">ra</span> <span class="special">=</span> <span class="identifier">a</span> <span class="special">;</span> <span class="keyword">int</span><span class="special">&amp;</span> <span class="identifier">ra</span> <span class="special">=</span> <span class="identifier">a</span> <span class="special">;</span>
@ -117,16 +117,16 @@
or not. or not.
</p> </p>
<p> <p>
That is, you would have to discriminate in order to be consistency. That is, you would have to discriminate in order to be consistent.
</p> </p>
<p> <p>
If in your code rebinding to another object is not an option, then is very If in your code rebinding to another object is not an option, then it is very
likely that binding for the fist time isn't either. In such case, assignment likely that binding for the first time isn't either. In such case, assignment
to an <span class="emphasis"><em>uninitialized </em></span> <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> to an <span class="emphasis"><em>uninitialized </em></span> <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>
shall be prohibited. It is quite possible that in such scenario the precondition shall be prohibited. It is quite possible that in such a scenario it is a precondition
that the lvalue must be already initialized exist. If it doesn't, then binding that the lvalue must be already initialized. If it isn't, then binding for
for the first time is OK while rebinding is not which is IMO very unlikely. the first time is OK while rebinding is not which is IMO very unlikely. In
In such scenario, you can assign the value itself directly, as in: such a scenario, you can assign the value itself directly, as in:
</p> </p>
<pre class="programlisting"><span class="identifier">assert</span><span class="special">(!!</span><span class="identifier">opt</span><span class="special">);</span> <pre class="programlisting"><span class="identifier">assert</span><span class="special">(!!</span><span class="identifier">opt</span><span class="special">);</span>
<span class="special">*</span><span class="identifier">opt</span><span class="special">=</span><span class="identifier">value</span><span class="special">;</span> <span class="special">*</span><span class="identifier">opt</span><span class="special">=</span><span class="identifier">value</span><span class="special">;</span>

View File

@ -27,7 +27,7 @@
</h3></div></div> </h3></div></div>
<div><p class="copyright">Copyright &#169; 2003-2007 Fernando Luis Cacciola Carballal</p></div> <div><p class="copyright">Copyright &#169; 2003-2007 Fernando Luis Cacciola Carballal</p></div>
<div><div class="legalnotice"> <div><div class="legalnotice">
<a name="id2854050"></a><p> <a name="id2846608"></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>
@ -163,7 +163,7 @@
</div> </div>
</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: April 06, 2011 at 21:53:26 GMT</small></p></td> <td align="left"><p><small>Last revised: April 07, 2011 at 19:52:21 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td> <td align="right"><div class="copyright-footer"></div></td>
</tr></table> </tr></table>
<hr> <hr>

View File

@ -379,9 +379,9 @@ assert ( *opt == y ) ;
__SPACE__ __SPACE__
[: `optional<T&>& optional<T&>::operator= ( T& const& rhs ) ;`] [: `optional<T&>& optional<T&>::operator= ( T& rhs ) ;`]
* [*Effect:] (Re)binds thee wrapped reference. * [*Effect:] (Re)binds the wrapped reference.
* [*Postconditions: ] `*this` is initialized and it references the same * [*Postconditions: ] `*this` is initialized and it references the same
object referenced by `rhs`. object referenced by `rhs`.
* [*Notes:] If `*this` was initialized, is is ['rebound] to the new object. * [*Notes:] If `*this` was initialized, is is ['rebound] to the new object.

View File

@ -1,4 +1,4 @@

[section Optional references] [section Optional references]
This library allows the template parameter `T` to be of reference type: This library allows the template parameter `T` to be of reference type:
@ -37,7 +37,7 @@ the first time) to the object. Clearly, there is no other choice.
assert(x==2); assert(x==2);
If you assign to a bare C++ reference, the assignment is forwarded to the If you assign to a bare C++ reference, the assignment is forwarded to the
referenced object; it's value changes but the reference is never rebound. referenced object; its value changes but the reference is never rebound.
int a = 1 ; int a = 1 ;
int& ra = a ; int& ra = a ;
@ -95,15 +95,15 @@ use Optional's assignment without explicitly handling the previous
initialization state unless your code is capable of functioning whether initialization state unless your code is capable of functioning whether
after the assignment, `a` aliases the same object as `b` or not. after the assignment, `a` aliases the same object as `b` or not.
That is, you would have to discriminate in order to be consistency. That is, you would have to discriminate in order to be consistent.
If in your code rebinding to another object is not an option, then is very If in your code rebinding to another object is not an option, then it is very
likely that binding for the fist time isn't either. In such case, assignment likely that binding for the first time isn't either. In such case, assignment
to an ['uninitialized ] `optional<T&>` shall be prohibited. It is quite possible to an ['uninitialized ] `optional<T&>` shall be prohibited. It is quite possible
that in such scenario the precondition that the lvalue must be already that in such a scenario it is a precondition that the lvalue must be already
initialized exist. If it doesn't, then binding for the first time is OK initialized. If it isn't, then binding for the first time is OK
while rebinding is not which is IMO very unlikely. while rebinding is not which is IMO very unlikely.
In such scenario, you can assign the value itself directly, as in: In such a scenario, you can assign the value itself directly, as in:
assert(!!opt); assert(!!opt);
*opt=value; *opt=value;