Skip to content

Commit a5592a8

Browse files
committed
[P2806] Minor correction
1 parent b81c226 commit a5592a8

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

2806_do_expr/do-expr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ The reason we're not simply proposing to standardize the existing extension is t
800800

801801
For (1), there is simply no obvious place to put the `$trailing-return-type$`. For (2), you can't turn `if`s into expressions in any meaningful way. It is fairly straightforward to answer both questions for our proposed form.
802802

803-
With allowing [implicit last value](#implicit-last-value), the simple translation from gcc statement-expression to `do` expression is just a matter of swapping parentheses for a leading `do`. We're just generalizing to make the feature more flexible.
803+
With allowing [implicit last value](#implicit-last-value), the simple translation from gcc statement-expression to `do` expression is just a matter of swapping parentheses for a leading `do` (and dropping the `;` on the last statement). We're just generalizing to make the feature more flexible.
804804

805805
## What About Reflection?
806806

2806_do_expr/p2806r4.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="utf-8" />
55
<meta name="generator" content="mpark/wg21" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
7-
<meta name="dcterms.date" content="2026-07-13" />
7+
<meta name="dcterms.date" content="2026-07-15" />
88
<title>`do` expressions</title>
99
<style>
1010

@@ -698,7 +698,7 @@ <h1 class="title" style="text-align:center"><code class="sourceCode cpp"><span c
698698
</tr>
699699
<tr>
700700
<td>Date:</td>
701-
<td>2026-07-13</td>
701+
<td>2026-07-15</td>
702702
</tr>
703703
<tr>
704704
<td style="vertical-align:top">Project:</td>
@@ -2133,8 +2133,11 @@ <h2 data-number="3.10" id="prior-art"><span class="header-section-number">3.10</
21332133
the simple translation from gcc statement-expression to
21342134
<code class="sourceCode cpp"><span class="cf">do</span></code>
21352135
expression is just a matter of swapping parentheses for a leading
2136-
<code class="sourceCode cpp"><span class="cf">do</span></code>. We’re
2137-
just generalizing to make the feature more flexible.</p>
2136+
<code class="sourceCode cpp"><span class="cf">do</span></code> (and
2137+
dropping the
2138+
<code class="sourceCode cpp"><span class="op">;</span></code> on the
2139+
last statement). We’re just generalizing to make the feature more
2140+
flexible.</p>
21382141
<h2 data-number="3.11" id="what-about-reflection"><span class="header-section-number">3.11</span> What About Reflection?<a href="#what-about-reflection" class="self-link"></a></h2>
21392142
<p>A question that often comes up, for any language feature: if we had
21402143
reflection and, in particular, code injection: would we need this

0 commit comments

Comments
 (0)