From c780a4d3ba2f24b7823bc4df30cce84a3ec3414f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Wed, 8 Nov 2023 13:38:08 -1000 Subject: [PATCH 1/2] [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. --- source/expressions.tex | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/expressions.tex b/source/expressions.tex index a7dd8e065e..c35f74db91 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -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 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 @@ -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, @@ -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 From c8e01c1c534da6b408b5a7d7dc05f619eae62798 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Thu, 9 Nov 2023 06:01:11 -1000 Subject: [PATCH 2/2] No more commas --- source/expressions.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/expressions.tex b/source/expressions.tex index c35f74db91..dce7ad5db8 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -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 +declaration \tcode{T t=$E$;} is well-formed for some invented 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 +the declaration \tcode{\keyword{bool} t($E$);} is well-formed for some invented variable \tcode{t}\iref{dcl.init}. \pnum