Skip to content

Commit

Permalink
[expr.prim.lambda.capture], [expr.const], [ostream.formatted.print] C…
Browse files Browse the repository at this point in the history
…larify automatic variable
  • Loading branch information
Eisenwave committed Oct 27, 2024
1 parent a470ff8 commit 0ce9574
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions source/expressions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2656,7 +2656,7 @@
void g() {
const int N = 10;
[=] {
int arr[N]; // OK, not an odr-use, refers to automatic variable
int arr[N]; // OK, not an odr-use, refers to variable with automatic storage duration
f(&N); // OK, causes \tcode{N} to be captured; \tcode{\&N} points to
// the corresponding member of the closure type
};
Expand Down Expand Up @@ -7609,7 +7609,8 @@
\begin{note}
If the odr-use occurs in an invocation
of a function call operator of a closure type,
it no longer refers to \keyword{this} or to an enclosing automatic variable
it no longer refers to \keyword{this} or to an enclosing
variable with automatic storage duration
due to the transformation\iref{expr.prim.lambda.capture}
of the \grammarterm{id-expression} into
an access of the corresponding data member.
Expand Down
2 changes: 1 addition & 1 deletion source/iostreams.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6855,7 +6855,7 @@
without turning on \tcode{ios_base::badbit} in the error state of \tcode{os}.
\end{itemize}
After constructing a \tcode{sentry} object,
the function initializes an automatic variable via
the function initializes a variable with automatic storage duration via
\begin{codeblock}
string out = vformat(os.getloc(), fmt, args);
\end{codeblock}
Expand Down

0 comments on commit 0ce9574

Please # to comment.