mirror of
https://github.com/boostorg/optional.git
synced 2025-07-14 21:06:37 +02:00
fixed wrong namespace in docs
This commit is contained in:
@ -102,7 +102,7 @@ Sometimes on GCC compilers below version 5.1 you may get an -Wmaybe-uninitialize
|
||||
|
||||
This is a bug in the compiler. As a workaround (provided in [@http://stackoverflow.com/questions/21755206/how-to-get-around-gcc-void-b-4-may-be-used-uninitialized-in-this-funct this Stack Overflow question]) use the following way of initializing an optional containing no value:
|
||||
|
||||
boost::optional<int> b = std::make_optional(false, int());
|
||||
boost::optional<int> b = boost::make_optional(false, int());
|
||||
|
||||
This is obviously redundant, but makes the warning disappear.
|
||||
|
||||
|
@ -55,7 +55,7 @@
|
||||
Stack Overflow question</a>) use the following way of initializing
|
||||
an optional containing no value:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">optional</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">b</span> <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">make_optional</span><span class="special">(</span><span class="keyword">false</span><span class="special">,</span> <span class="keyword">int</span><span class="special">());</span>
|
||||
<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">optional</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">b</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">make_optional</span><span class="special">(</span><span class="keyword">false</span><span class="special">,</span> <span class="keyword">int</span><span class="special">());</span>
|
||||
</pre>
|
||||
<p>
|
||||
This is obviously redundant, but makes the warning disappear.
|
||||
|
@ -145,7 +145,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"><p><small>Last revised: November 24, 2016 at 22:27:48 GMT</small></p></td>
|
||||
<td align="left"><p><small>Last revised: February 14, 2017 at 22:51:08 GMT</small></p></td>
|
||||
<td align="right"><div class="copyright-footer"></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
Reference in New Issue
Block a user