none_t is no loner constructible from literal 0

This caused problems because:
optional<T> o = 0;
always worked. But often it would create an uninitialized optional.
This commit is contained in:
Andrzej Krzemienski
2014-11-22 01:18:25 +01:00
parent 5435021ea4
commit 53e53171c4
7 changed files with 63 additions and 5 deletions

View File

@ -30,7 +30,7 @@
<p>
Type <code class="computeroutput"><span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span></code> is
<a href="http://www.sgi.com/tech/stl/EqualityComparable.html" target="_top"><code class="computeroutput"><span class="identifier">EqualityComparable</span></code></a> whenever <code class="computeroutput"><span class="identifier">T</span></code> is <a href="http://www.sgi.com/tech/stl/EqualityComparable.html" target="_top"><code class="computeroutput"><span class="identifier">EqualityComparable</span></code></a>. Two optional
objects containing a value compare in the same as their contained values.
objects containing a value compare in the same way as their contained values.
The uninitialized state of <code class="computeroutput"><span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span></code>
is treated as a distinct value, equal to itself, and unequal to any value
of type <code class="computeroutput"><span class="identifier">T</span></code>: