Skip to content

Commit

Permalink
Set priority for 4130
Browse files Browse the repository at this point in the history
  • Loading branch information
jwakely committed Oct 2, 2024
1 parent 8dce3b2 commit e6a953f
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions xml/issue4130.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,24 @@
<section><sref ref="[ptr.launder]"/></section>
<submitter>Jiang An</submitter>
<date>30 Jul 2024</date>
<priority>99</priority>
<priority>3</priority>

<discussion>
<p>
From issue <a href="https://github.com/cplusplus/draft/issues/4553">cplusplus/draft#4553</a>
From issue <a href="https://github.com/cplusplus/draft/issues/4553">cplusplus/draft#4553</a>
which is considered non-editorial.
<p/>
Currently, <tt>std::launder</tt> has a precondition that the pointed to object must be within
its lifetime. However, per the example added by <paper num="P0593R6"/>, it's probably intended
that the result of <tt>std::launder</tt> should be allowed to point to an array element
Currently, <tt>std::launder</tt> has a precondition that the pointed to object must be within
its lifetime. However, per the example added by <paper num="P0593R6"/>, it's probably intended
that the result of <tt>std::launder</tt> should be allowed to point to an array element
subobject whose lifetime has not started yet.
</p>

<note>2024-10-02; Reflector poll</note>
<p>
Set priority to 3 after reflector poll. Needs review by Core.
</p>

</discussion>

<resolution>
Expand All @@ -36,12 +42,12 @@ template&lt;class T&gt; [[nodiscard]] constexpr T* launder(T* p) noexcept;
<p>
-1- <i>Mandates</i>: <tt>!is_function_v&lt;T&gt; &amp;&amp; !is_void_v&lt;T&gt;</tt> is <tt>true</tt>.
<p/>
-2- <i>Preconditions</i>: <tt>p</tt> represents the address <i>A</i> of a byte in memory.
An object <i>X</i> <del>that is within its lifetime (<sref ref="[basic.life]"/>) and</del>
whose type is similar (<sref ref="[conv.qual]"/>) to <tt>T</tt> is located at the address
<i>A</i><ins>, and is either within its lifetime (<sref ref="[basic.life]"/>) or is an array
element subobject whose containing array object is within its lifetime</ins>. All bytes of storage
that would be reachable through (<sref ref="[basic.compound]"/>) the result are reachable through
-2- <i>Preconditions</i>: <tt>p</tt> represents the address <i>A</i> of a byte in memory.
An object <i>X</i> <del>that is within its lifetime (<sref ref="[basic.life]"/>) and</del>
whose type is similar (<sref ref="[conv.qual]"/>) to <tt>T</tt> is located at the address
<i>A</i><ins>, and is either within its lifetime (<sref ref="[basic.life]"/>) or is an array
element subobject whose containing array object is within its lifetime</ins>. All bytes of storage
that would be reachable through (<sref ref="[basic.compound]"/>) the result are reachable through
<tt>p</tt>.
<p/>
-3- <i>Returns</i>: A value of type <tt>T*</tt> that points to <i>X</i>.
Expand Down

0 comments on commit e6a953f

Please sign in to comment.