value_or() requires that U is convertible to T

Due to Vladimir Batov.
This commit is contained in:
Andrzej Krzemienski
2014-06-14 22:49:37 +02:00
parent 8fc2901fad
commit 31c9119266
9 changed files with 66 additions and 17 deletions

View File

@ -98,10 +98,11 @@
</p>
<p>
Such a <span class="emphasis"><em>de facto</em></span> idiom for referring to optional objects
can be formalized in the form of a concept: the <a href="../../../../../../utility/OptionalPointee.html" target="_top">OptionalPointee</a>
concept. This concept captures the syntactic usage of operators <code class="computeroutput"><span class="special">*</span></code>, <code class="computeroutput"><span class="special">-&gt;</span></code>
and contextual conversion to <code class="computeroutput"><span class="keyword">bool</span></code>
to convey the notion of optionality.
can be formalized in the form of a concept: the <a href="../../../../../../utility/OptionalPointee.html" target="_top"><code class="computeroutput"><span class="identifier">OptionalPointee</span></code></a> concept. This
concept captures the syntactic usage of operators <code class="computeroutput"><span class="special">*</span></code>,
<code class="computeroutput"><span class="special">-&gt;</span></code> and contextual conversion
to <code class="computeroutput"><span class="keyword">bool</span></code> to convey the notion
of optionality.
</p>
<p>
However, pointers are good to <span class="underline">refer</span>
@ -127,7 +128,7 @@
this semantics, so are inappropriate for the initialization and transport
of optional values, yet are quite convenient for handling the access to
the possible undefined value because of the idiomatic aid present in the
<a href="../../../../../../utility/OptionalPointee.html" target="_top">OptionalPointee</a>
<a href="../../../../../../utility/OptionalPointee.html" target="_top"><code class="computeroutput"><span class="identifier">OptionalPointee</span></code></a>
concept incarnated by pointers.
</p>
<h6>