Document the exception safety of emplace

This commit is contained in:
Peter Dimov
2019-03-25 16:35:27 +02:00
parent 688849f9e8
commit 6d7be90ce0
2 changed files with 27 additions and 3 deletions

View File

@ -1346,7 +1346,7 @@ and <code>U</code> occurs exactly once in <code>T&#8230;&#8203;</code>.</p>
<dl>
<dt class="hdlist1">Requires: </dt>
<dd>
<p><code>I &lt; sizeof(T&#8230;&#8203;)</code>.</p>
<p><code>I &lt; sizeof&#8230;&#8203;(T)</code>.</p>
</dd>
<dt class="hdlist1">Effects: </dt>
<dd>
@ -1361,6 +1361,14 @@ value as if using the expression <code>Ti(std::forward&lt;A&gt;(a)&#8230;&#8203;
<dd>
<p>A reference to the new contained value.</p>
</dd>
<dt class="hdlist1">Throws: </dt>
<dd>
<p>Nothing unless the initialization of the new contained value throws.</p>
</dd>
<dt class="hdlist1">Exception Safety: </dt>
<dd>
<p>Basic. On exception the value of the variant is valid but unspecified.</p>
</dd>
<dt class="hdlist1">Remarks: </dt>
<dd>
<p>This function shall not participate in overload resolution unless
@ -1386,7 +1394,7 @@ value as if using the expression <code>Ti(std::forward&lt;A&gt;(a)&#8230;&#8203;
<dl>
<dt class="hdlist1">Requires: </dt>
<dd>
<p><code>I &lt; sizeof(T&#8230;&#8203;)</code>.</p>
<p><code>I &lt; sizeof&#8230;&#8203;(T)</code>.</p>
</dd>
<dt class="hdlist1">Effects: </dt>
<dd>
@ -1401,6 +1409,14 @@ value as if using the expression <code>Ti(il, std::forward&lt;A&gt;(a)&#8230;&#8
<dd>
<p>A reference to the new contained value.</p>
</dd>
<dt class="hdlist1">Throws: </dt>
<dd>
<p>Nothing unless the initialization of the new contained value throws.</p>
</dd>
<dt class="hdlist1">Exception Safety: </dt>
<dd>
<p>Basic. On exception the value of the variant is valid but unspecified.</p>
</dd>
<dt class="hdlist1">Remarks: </dt>
<dd>
<p>This function shall not participate in overload resolution unless
@ -2141,7 +2157,7 @@ the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License, Versi
</div>
<div id="footer">
<div id="footer-text">
Last updated 2019-02-22 19:16:54 GTBST
Last updated 2019-02-22 19:21:28 GTBST
</div>
</div>
<style>

View File

@ -502,6 +502,10 @@ Effects: ::
value as if using the expression `Ti(std::forward<A>(a)...)`.
Ensures: :: `index() == I`.
Returns: :: A reference to the new contained value.
Throws: ::
Nothing unless the initialization of the new contained value throws.
Exception Safety: ::
Basic. On exception the value of the variant is valid but unspecified.
Remarks: ::
This function shall not participate in overload resolution unless
`std::is_constructible_v<Ti, A...>` is `true`.
@ -520,6 +524,10 @@ Effects: ::
value as if using the expression `Ti(il, std::forward<A>(a)...)`.
Ensures: :: `index() == I`.
Returns: :: A reference to the new contained value.
Throws: ::
Nothing unless the initialization of the new contained value throws.
Exception Safety: ::
Basic. On exception the value of the variant is valid but unspecified.
Remarks: ::
This function shall not participate in overload resolution unless
`std::is_constructible_v<Ti, std::initializer_list<V>&, A...>` is `true`.