Skip to content

Commit

Permalink
Better wording
Browse files Browse the repository at this point in the history
  • Loading branch information
brevzin committed Jan 30, 2024
1 parent 9d22bfa commit bc4c78a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
4 changes: 1 addition & 3 deletions 3074_consexpr_union_lifetime/constexpr-union-lifetime.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,7 @@ public:
[#]{.pnum} `uninitialized<T>` is a trivially default constructible and trivially destructible type.
[#]{.pnum} If `T` is an implicit-lifetime type, then the construction of `uninitialized<T>` also starts the lifetime of `$value$`.
[#]{.pnum} An object of type `T` and an object of type `uninitialized<T>` have distinct addresses ([intro.object]).
[#]{.pnum} [An object of type `T` and the `$value$` subobject of `uninitialized<T>` have distinct addresses ([intro.object])]{.note}
```cpp
constexpr uninitialized();
Expand Down
9 changes: 4 additions & 5 deletions 3074_consexpr_union_lifetime/p3074r1.html
Original file line number Diff line number Diff line change
Expand Up @@ -815,15 +815,14 @@ <h1 data-number="3" style="border-bottom:1px solid #cccccc" id="wording"><span c
<span id="cb11-18"><a href="#cb11-18"></a> <span class="kw">constexpr</span> <span class="kw">const</span> remove_extent_t<span class="op">&lt;</span>T<span class="op">&gt;&amp;</span> ref<span class="op">()</span> <span class="kw">const</span> <span class="kw">noexcept</span> <span class="op">{</span> <span class="cf">return</span> <span class="op">*</span>ptr<span class="op">()</span>; <span class="op">}</span></span>
<span id="cb11-19"><a href="#cb11-19"></a><span class="op">}</span>;</span></code></pre></div>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_2" id="pnum_2">10</a></span> <code class="sourceCode cpp">uninitialized<span class="op">&lt;</span>T<span class="op">&gt;</span></code> is a trivially default constructible and trivially destructible type.</p>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_3" id="pnum_3">11</a></span> If <code class="sourceCode cpp">T</code> is an implicit-lifetime type, then the construction of <code class="sourceCode cpp">uninitialized<span class="op">&lt;</span>T<span class="op">&gt;</span></code> also starts the lifetime of <code class="sourceCode cpp"><em>value</em></code>.</p>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_4" id="pnum_4">12</a></span> An object of type <code class="sourceCode cpp">T</code> and an object of type <code class="sourceCode cpp">uninitialized<span class="op">&lt;</span>T<span class="op">&gt;</span></code> have distinct addresses ([intro.object]).</p>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_3" id="pnum_3">11</a></span> <span class="note"><span><em>Note 1:</em> </span>An object of type <code class="sourceCode cpp">T</code> and the <code class="sourceCode cpp"><em>value</em></code> subobject of <code class="sourceCode cpp">uninitialized<span class="op">&lt;</span>T<span class="op">&gt;</span></code> have distinct addresses ([intro.object])<span> — <em>end note</em> ]</span></span></p>
<div class="sourceCode" id="cb12"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb12-1"><a href="#cb12-1"></a><span class="kw">constexpr</span> uninitialized<span class="op">()</span>;</span></code></pre></div>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_5" id="pnum_5">13</a></span> <em>Effects</em>: If <code class="sourceCode cpp">T</code> is an implicit-lifetime type, begins the lifetime of <code class="sourceCode cpp"><em>value</em></code>. Otherwise, none. <span class="note"><span><em>Note 1:</em> </span>The constructor of <code class="sourceCode cpp">T</code>, if any, is not called<span> — <em>end note</em> ]</span></span></p>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_4" id="pnum_4">12</a></span> <em>Effects</em>: If <code class="sourceCode cpp">T</code> is an implicit-lifetime type, begins the lifetime of <code class="sourceCode cpp"><em>value</em></code>. Otherwise, none. <span class="note"><span><em>Note 2:</em> </span>The constructor of <code class="sourceCode cpp">T</code>, if any, is not called<span> — <em>end note</em> ]</span></span></p>
<div class="sourceCode" id="cb13"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb13-1"><a href="#cb13-1"></a><span class="kw">constexpr</span> uninitialized<span class="op">(</span><span class="kw">const</span> uninitialized<span class="op">&amp;)</span>;</span>
<span id="cb13-2"><a href="#cb13-2"></a><span class="kw">constexpr</span> uninitialized<span class="op">&amp;</span> <span class="kw">operator</span><span class="op">=(</span><span class="kw">const</span> uninitialized<span class="op">&amp;)</span>;</span></code></pre></div>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_6" id="pnum_6">14</a></span> If <code class="sourceCode cpp">T</code> is a trivially copyable type, then <code class="sourceCode cpp">uninitialized<span class="op">&lt;</span>T<span class="op">&gt;</span></code> is a trivially copyable type. Otherwise, <code class="sourceCode cpp">uninitialized<span class="op">&lt;</span>T<span class="op">&gt;</span></code> is not copyable.</p>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_5" id="pnum_5">13</a></span> If <code class="sourceCode cpp">T</code> is a trivially copyable type, then <code class="sourceCode cpp">uninitialized<span class="op">&lt;</span>T<span class="op">&gt;</span></code> is a trivially copyable type. Otherwise, <code class="sourceCode cpp">uninitialized<span class="op">&lt;</span>T<span class="op">&gt;</span></code> is not copyable.</p>
<div class="sourceCode" id="cb14"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb14-1"><a href="#cb14-1"></a><span class="kw">constexpr</span> <span class="op">~</span>uninitialized<span class="op">()</span>;</span></code></pre></div>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_7" id="pnum_7">15</a></span> <em>Effects</em>: None. <span class="note"><span><em>Note 2:</em> </span>The destructor of <code class="sourceCode cpp">T</code>, if any, is not called<span> — <em>end note</em> ]</span></span></p>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_6" id="pnum_6">14</a></span> <em>Effects</em>: None. <span class="note"><span><em>Note 3:</em> </span>The destructor of <code class="sourceCode cpp">T</code>, if any, is not called<span> — <em>end note</em> ]</span></span></p>
</div>
</blockquote>
<h1 data-number="4" style="border-bottom:1px solid #cccccc" id="bibliography"><span class="header-section-number">4</span> References<a href="#bibliography" class="self-link"></a></h1>
Expand Down

0 comments on commit bc4c78a

Please sign in to comment.