Skip to content

[expr.prim.lambda.capture], [expr.const], [ostream.formatted.print] Clarify automatic variable #7358

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading