mirror of
https://github.com/boostorg/optional.git
synced 2025-07-25 10:07:15 +02:00
Doc typeo fixes + 1 test fix
This commit is contained in:
@ -49,11 +49,11 @@
|
||||
in an indeterminate state. Its state is always well defined. Instruction
|
||||
<code class="computeroutput"><span class="identifier">ans</span> <span class="special">=</span>
|
||||
<span class="identifier">i</span></code> initializes the optional object.
|
||||
It uses the assignment from <code class="computeroutput"><span class="keyword">int</span></code>.
|
||||
It uses the 'mixed' assignment from <code class="computeroutput"><span class="keyword">int</span></code>.
|
||||
In general, for <code class="computeroutput"><span class="identifier">optional</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span></code>,
|
||||
when an assignment from <code class="computeroutput"><span class="identifier">T</span></code>
|
||||
is invoked, it can do two things. If the optional object is not initialized
|
||||
our case here), it initializes it with <code class="computeroutput"><span class="identifier">T</span></code>'s
|
||||
(our case here), it initializes the contained value using <code class="computeroutput"><span class="identifier">T</span></code>'s
|
||||
copy constructor. If the optional object is already initialized, it assigns
|
||||
the new value to it using <code class="computeroutput"><span class="identifier">T</span></code>'s
|
||||
copy assignment.
|
||||
|
Reference in New Issue
Block a user