Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[conv.general, expr.static.cast] Remove inappropriate "temporary" #6646

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
Loading
from
Open
Changes from 1 commit
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
Next Next commit
[conv.general, expr.static.cast] Remove inappropriate "temporary"
It's not clear in which sense the invented variables in question are
"temporary". Since C++ already contains a notion of a "temporary
(object)", and since variables are precisely _not_ temporary objects,
it seems unnecessary to use the words "temporary variable" in the
present sense.
  • Loading branch information
tkoeppe committed Nov 9, 2023
commit c780a4d3ba2f24b7823bc4df30cce84a3ec3414f
10 changes: 5 additions & 5 deletions 10 source/expressions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -550,14 +550,14 @@
\pnum
An expression $E$ can be
\defnx{implicitly converted}{conversion!implicit} to a type \tcode{T} if and only if the
declaration \tcode{T t=$E$;} is well-formed, for some invented temporary
declaration \tcode{T t=$E$;} is well-formed, for some invented
tkoeppe marked this conversation as resolved.
Show resolved Hide resolved
variable \tcode{t}\iref{dcl.init}.

\pnum
Certain language constructs require that an expression be converted to a Boolean
value. An expression $E$ appearing in such a context is said to be
\defnx{contextually converted to \tcode{bool}}{conversion!contextual to \tcode{bool}} and is well-formed if and only if
the declaration \tcode{\keyword{bool} t($E$);} is well-formed, for some invented temporary
the declaration \tcode{\keyword{bool} t($E$);} is well-formed, for some invented
variable \tcode{t}\iref{dcl.init}.

\pnum
Expand All @@ -577,7 +577,7 @@
\pnum
The effect of any implicit
conversion is the same as performing the corresponding declaration and initialization
and then using the temporary variable as the result of the conversion.
and then using the invented variable as the result of the conversion.
The result is an lvalue if \tcode{T} is an lvalue reference
type or an rvalue reference to function type\iref{dcl.ref},
an xvalue if \tcode{T} is an rvalue reference to object type,
Expand Down Expand Up @@ -4027,8 +4027,8 @@
\begin{codeblock}
T t(@$E$@);
\end{codeblock}
for some invented temporary variable \tcode{t}\iref{dcl.init}
and then using the temporary variable as the result of the conversion.
for some invented variable \tcode{t}\iref{dcl.init}
and then using the variable as the result of the conversion.
Otherwise, the result object is direct-initialized from $E$.
\begin{note}
The conversion is ill-formed when attempting to convert an
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.