Skip to content

Commit

Permalink
[P0547] Reorganize bullets in Move/CopyConstructible
Browse files Browse the repository at this point in the history
per LWG Kona direction
  • Loading branch information
CaseyCarter committed Mar 10, 2017
1 parent c6efdfe commit 283b722
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 25 deletions.
22 changes: 8 additions & 14 deletions ext/constructible/P0547.html
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ <h1 id="proposed-resolution"><span class="header-section-number">4</span> Propos
<p><ednote>The issue was discussed in the Issaquah 2016 meeting. The guidance given there was to narrowly focus this concept on “traditional” assignability only – assignments to non-<code>const</code> lvalues from non-proxy expressions – and solve the proxy problem at a later date. That is the direction taken here.]</ednote></p>
<p><ednote>[<em>Editor’s note:</em> Move subsection “Concept <code>Destructible</code>” ([concepts.lib.object.destructible]) to subsection “Core language concepts” ([concepts.lib.corelang]) after [concepts.lib.corelang.swappable], change its stable id to [concepts.lib.corelang.destructible] and edit it as follows:]</ednote></p>
<blockquote>
<p>1 <del>The <code>Destructible</code> concept is the base of the hierarchy of object concepts. It specifies properties that all such object types have in common.</del><ins>The <code>Destructible</code> concept specifies properties of all types instances of which can be destroyed at the end of their lifetime, or reference types.</ins></p>
<p>1 <del>The <code>Destructible</code> concept is the base of the hierarchy of object concepts. It specifies properties that all such object types have in common.</del><ins>The <code>Destructible</code> concept specifies properties of all types, instances of which can be destroyed at the end of their lifetime, or reference types.</ins></p>
<blockquote>
<p><tt>template &lt;class T&gt;</tt><br />
<tt>concept bool Destructible() {</tt><br />
Expand Down Expand Up @@ -311,14 +311,11 @@ <h1 id="proposed-resolution"><span class="header-section-number">4</span> Propos
<tt>    ConvertibleTo&lt;<del>remove_cv_t&lt;</del>T<del>&gt;</del>&amp;&amp;, T&gt;();</tt><br />
<tt>}</tt></p>
</blockquote>
<p>1 <ins>If <code>T</code> is an object type, then</ins></p>
<p>1 <ins>If <code>T</code> is an object type, then</ins> let <code>rv</code> be an rvalue of type <del><code>remove_cv_t&lt;</code></del><code>T</code><del><code>&gt;</code></del><ins> and <code>u2</code> a distinct object of type <code>T</code> equal to <code>rv</code></ins>. <del>Then</del> <code>MoveConstructible&lt;T&gt;()</code> is satisfied if and only if</p>
<blockquote>
<p><ins>(1.1)</ins> Let <code>rv</code> be an rvalue of type <del><code>remove_cv_t&lt;</code></del><code>T</code><del><code>&gt;</code></del><ins> and <code>u2</code> a distinct object of type <code>T</code> equal to <code>rv</code></ins>. Then <code>MoveConstructible&lt;T&gt;()</code> is satisfied if and only if</p>
<blockquote>
<p>(<ins>1.</ins>1.1) – After the definition <code>T u = rv;</code>, <code>u</code> is equal to <ins><code>u2</code></ins><del>the value of <code>rv</code> before the construction</del>.</p>
<p>(<ins>1.</ins>1.2) – <code>T{rv}</code> <del>or <code>*new T{rv}</code></del> is equal to <ins><code>u2</code></ins><del>the value of <code>rv</code> before the construction</del>.</p>
</blockquote>
<p><ins>(1.</ins>2<ins>) If <code>T</code> is not <code>const</code>,</ins> <code>rv</code>’s resulting state is unspecified<ins>; otherwise, it is unchanged</ins>. [ <em>Note:</em> <code>rv</code> must still meet the requirements of the library component that is using it. The operations listed in those requirements must work as specified whether <code>rv</code> has been moved from or not. –<em>end note</em> ]</p>
<p>(1.1) – After the definition <code>T u = rv;</code>, <code>u</code> is equal to <ins><code>u2</code></ins><del>the value of <code>rv</code> before the construction</del>.</p>
<p>(1.2) – <code>T{rv}</code> <del>or <code>*new T{rv}</code></del> is equal to <ins><code>u2</code></ins><del>the value of <code>rv</code> before the construction</del>.</p>
<p><ins>(1.3</ins><del>2</del><ins>) If <code>T</code> is not <code>const</code>,</ins> <code>rv</code>’s resulting state is valid but unspecified ([lib.types.movedfrom])<ins>; otherwise, it is unchanged</ins>.</p>
</blockquote>
</blockquote>
<p><ednote>[<em>Editor’s note:</em> We no longer strip top-level <code>const</code> from the parameter to harmonize <code>MoveConstructible</code> with <code>is_move_constructible</code>. And as with <code>is_move_constructible</code>, <code>MoveConstructible&lt;int&amp;&amp;&gt;()</code> is <code>true</code>. See <a href="https://cplusplus.github.io/LWG/lwg-active.html#2146">LWG#2146</a>.</ednote></p>
Expand All @@ -338,13 +335,10 @@ <h1 id="proposed-resolution"><span class="header-section-number">4</span> Propos
<tt>    <ins>Constructible&lt;T, const T&amp;&amp;&gt;() &amp;&amp; ConvertibleTo&lt;const T&amp;&amp;, T&gt;();</ins></tt><br />
<tt>}</tt></p>
</blockquote>
<p>1 <ins>If <code>T</code> is an object type, then</ins></p>
<p>1 <ins>If <code>T</code> is an object type, then</ins> let <code>v</code> be an lvalue of type (possibly <code>const</code>) <del><code>remove_cv_t&lt;</code></del><code>T</code><del><code>&gt;</code></del> or an rvalue of type <code>const</code> <del><code>remove_cv_t&lt;</code></del><code>T</code><del><code>&gt;</code></del>. <del>Then</del> <code>CopyConstructible&lt;T&gt;()</code> is satisfied if and only if</p>
<blockquote>
<p><ins>(1.1)</ins> Let <code>v</code> be an lvalue of type (possibly <code>const</code>) <del><code>remove_cv_t&lt;</code></del><code>T</code><del><code>&gt;</code></del> or an rvalue of type <code>const</code> <del><code>remove_cv_t&lt;</code></del><code>T</code><del><code>&gt;</code></del>. Then <code>CopyConstructible&lt;T&gt;()</code> is satisfied if and only if</p>
<blockquote>
<p>(<ins>1.</ins>1.1) – After the definition <code>T u = v;</code>, <code>v</code> is equal to <code>u</code>.</p>
<p>(<ins>1.</ins>1.2) – <code>T{v}</code> <del>or <code>*new T{v}</code></del> is equal to <code>v</code>.</p>
</blockquote>
<p>(1.1) – After the definition <code>T u = v;</code>, <code>u</code> is equal to <code>v</code>.</p>
<p>(1.2) – <code>T{v}</code> <del>or <code>*new T{v}</code></del> is equal to <code>v</code>.</p>
</blockquote>
</blockquote>
<p><ednote>[<em>Editor’s note:</em> As with <code>MoveConstructible</code>, we no longer strip top-level <em>cv</em>-qualifiers to bring <code>CopyConstructible</code> into harmony with <code>is_copy_constructible</code>.</ednote></p>
Expand Down
18 changes: 7 additions & 11 deletions ext/constructible/constructible.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,15 +229,13 @@ In the "Proposed Resolution" that follows, there are editorial notes that highli
> > <tt>&nbsp;&nbsp;&nbsp;&nbsp;ConvertibleTo&lt;<del>remove_cv_t&lt;</del>T<del>&gt;</del>&amp;&amp;, T&gt;();</tt>
> > <tt>}</tt>
>
> 1 <ins>If `T` is an object type, then</ins>
> 1 <ins>If `T` is an object type, then</ins> let `rv` be an rvalue of type <del>`remove_cv_t<`</del>`T`<del>`>`</del><ins> and `u2` a distinct object of type `T` equal to `rv`</ins>. <del>Then</del> `MoveConstructible<T>()` is satisfied if and only if
>
> > &#8203;<ins>(1.1)</ins> Let `rv` be an rvalue of type <del>`remove_cv_t<`</del>`T`<del>`>`</del><ins> and `u2` a distinct object of type `T` equal to `rv`</ins>. Then `MoveConstructible<T>()` is satisfied if and only if
> > (1.1) -- After the definition `T u = rv;`, `u` is equal to <ins>`u2`</ins><del>the value of `rv` before the construction</del>.
> >
> > > (<ins>1.</ins>1.1) -- After the definition `T u = rv;`, `u` is equal to <ins>`u2`</ins><del>the value of `rv` before the construction</del>.
> > >
> > > (<ins>1.</ins>1.2) -- `T{rv}` <del>or `*new T{rv}`</del> is equal to <ins>`u2`</ins><del>the value of `rv` before the construction</del>.
> > (1.2) -- `T{rv}` <del>or `*new T{rv}`</del> is equal to <ins>`u2`</ins><del>the value of `rv` before the construction</del>.
> >
> > &#8203;<ins>(1.</ins>2<ins>) If `T` is not `const`,</ins> `rv`'s resulting state is unspecified<ins>; otherwise, it is unchanged</ins>. [ _Note:_ `rv` must still meet the requirements of the library component that is using it. The operations listed in those requirements must work as specified whether `rv` has been moved from or not. --_end note_ ]
> > &#8203;<ins>(1.3</ins><del>2</del><ins>) If `T` is not `const`,</ins> `rv`'s resulting state is valid but unspecified ([lib.types.movedfrom])<ins>; otherwise, it is unchanged</ins>.

<ednote>[_Editor's note:_ We no longer strip top-level `const` from the parameter to harmonize `MoveConstructible` with `is_move_constructible`. And as with `is_move_constructible`, `MoveConstructible<int&&>()` is `true`. See [LWG#2146](https://cplusplus.github.io/LWG/lwg-active.html#2146).</ednote>

Expand All @@ -257,13 +255,11 @@ In the "Proposed Resolution" that follows, there are editorial notes that highli
> > <tt>&nbsp;&nbsp;&nbsp;&nbsp;<ins>Constructible&lt;T, const T&amp;&amp;&gt;() &amp;&amp; ConvertibleTo&lt;const T&amp;&amp;, T&gt;();</ins></tt>
> > <tt>}</tt>
>
> 1 <ins>If `T` is an object type, then</ins>
> 1 <ins>If `T` is an object type, then</ins> let `v` be an lvalue of type (possibly `const`) <del>`remove_cv_t<`</del>`T`<del>`>`</del> or an rvalue of type `const` <del>`remove_cv_t<`</del>`T`<del>`>`</del>. <del>Then</del> `CopyConstructible<T>()` is satisfied if and only if
>
> > &#8203;<ins>(1.1)</ins> Let `v` be an lvalue of type (possibly `const`) <del>`remove_cv_t<`</del>`T`<del>`>`</del> or an rvalue of type `const` <del>`remove_cv_t<`</del>`T`<del>`>`</del>. Then `CopyConstructible<T>()` is satisfied if and only if
> > (1.1) -- After the definition `T u = v;`, `u` is equal to `v`.
> >
> > > (<ins>1.</ins>1.1) -- After the definition `T u = v;`, `v` is equal to `u`.
> > >
> > > (<ins>1.</ins>1.2) -- `T{v}` <del>or `*new T{v}`</del> is equal to `v`.
> > (1.2) -- `T{v}` <del>or `*new T{v}`</del> is equal to `v`.

<ednote>[_Editor's note:_ As with `MoveConstructible`, we no longer strip top-level _cv_-qualifiers to bring `CopyConstructible` into harmony with `is_copy_constructible`.</ednote>

Expand Down

0 comments on commit 283b722

Please sign in to comment.