From e1bb9a2083d47b08ac19e8529c7274eca846f1cf Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Sun, 26 Sep 2021 21:48:16 +0200 Subject: [PATCH] [std] Fix cross-references to 'unevaluated operand' --- source/algorithms.tex | 2 +- source/declarations.tex | 4 ++-- source/expressions.tex | 21 +++++++++++---------- source/future.tex | 2 +- source/iostreams.tex | 2 +- source/threads.tex | 2 +- source/time.tex | 10 +++++----- source/utilities.tex | 18 +++++++++--------- 8 files changed, 31 insertions(+), 30 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 672230323d..c35079a748 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -10827,7 +10827,7 @@ \pnum \constraints The expression \tcode{::new (declval()) T(declval()...)} -is well-formed when treated as an unevaluated operand. +is well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand}. \pnum \effects diff --git a/source/declarations.tex b/source/declarations.tex index 3f3040e327..8e77caef23 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -1581,7 +1581,7 @@ \end{itemize} The operand of the \keyword{decltype} specifier is an unevaluated -operand\iref{expr.prop}. +operand\iref{term.unevaluated.operand}. \begin{example} \begin{codeblock} @@ -4157,7 +4157,7 @@ int f(int a, int b = a); // error: parameter \tcode{a} used as default argument typedef int I; int g(float I, int b = I(2)); // error: parameter \tcode{I} found -int h(int a, int b = sizeof(a)); // OK, unevaluated operand +int h(int a, int b = sizeof(a)); // OK, unevaluated operand\iref{term.unevaluated.operand} \end{codeblock} \end{example} A non-static member shall not appear in a default argument unless it appears as diff --git a/source/expressions.tex b/source/expressions.tex index 3299608292..759f2db0c3 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -424,6 +424,7 @@ \rSec2[expr.context]{Context dependence} \pnum +\label{term.unevaluated.operand}% In some contexts, \defnx{unevaluated operands}{unevaluated operand} appear~(\ref{expr.prim.req}, \ref{expr.typeid}, @@ -1384,7 +1385,7 @@ In the declaration of \tcode{p2}, those constraints are required to be satisfied even though -\tcode{f} is an unevaluated operand\iref{expr.prop}. +\tcode{f} is an unevaluated operand\iref{term.unevaluated.operand}. \end{example} \end{note} @@ -2694,7 +2695,7 @@ A \grammarterm{requires-expression} is a prvalue of type \tcode{bool} whose value is described below. Expressions appearing within a \grammarterm{requirement-body} -are unevaluated operands\iref{expr.prop}. +are unevaluated operands\iref{term.unevaluated.operand}. \pnum \begin{example} @@ -2781,7 +2782,7 @@ \begin{note} The enclosing \grammarterm{requires-expression} will evaluate to \keyword{false} if substitution of template arguments into the \grammarterm{expression} fails. -The \grammarterm{expression} is an unevaluated operand\iref{expr.prop}. +The \grammarterm{expression} is an unevaluated operand\iref{term.unevaluated.operand}. \end{note} \begin{example} \begin{codeblock} @@ -2956,7 +2957,7 @@ \end{example} \pnum -A local parameter shall only appear as an unevaluated operand\iref{expr.prop} +A local parameter shall only appear as an unevaluated operand\iref{term.unevaluated.operand} within the \grammarterm{constraint-expression}. \begin{example} \begin{codeblock} @@ -3779,7 +3780,7 @@ If the expression is a prvalue, the temporary materialization conversion\iref{conv.rval} is applied. -The expression is an unevaluated operand\iref{expr.prop}. +The expression is an unevaluated operand\iref{term.unevaluated.operand}. \pnum When \keyword{typeid} is applied to a \grammarterm{type-id}, the result @@ -4771,7 +4772,7 @@ The \keyword{sizeof} operator yields the number of bytes occupied by a non-potentially-overlapping object of the type of its operand. The operand is either an expression, -which is an unevaluated operand\iref{expr.prop}, or a parenthesized +which is an unevaluated operand\iref{term.unevaluated.operand}, or a parenthesized \grammarterm{type-id}. \indextext{type!incomplete}% The \keyword{sizeof} operator shall not be applied to an expression that @@ -4886,7 +4887,7 @@ \indextext{\idxcode{noexcept}}% \indextext{expression!\idxcode{noexcept}}% The \keyword{noexcept} operator determines whether the evaluation of its operand, -which is an unevaluated operand\iref{expr.prop}, can throw an +which is an unevaluated operand\iref{term.unevaluated.operand}, can throw an exception\iref{except.throw}. \begin{bnf} @@ -7010,7 +7011,7 @@ A simple assignment whose left operand is of a volatile-qualified type is deprecated\iref{depr.volatile.type} unless the (possibly parenthesized) assignment is a discarded-value expression or -an unevaluated operand. +an unevaluated operand\iref{term.unevaluated.operand}. \pnum The behavior of an expression of the form \tcode{E1 \placeholder{op}= E2} @@ -7638,7 +7639,7 @@ \end{itemize} \begin{note} A manifestly constant-evaluated expression -is evaluated even in an unevaluated operand. +is evaluated even in an unevaluated operand\iref{term.unevaluated.operand}. \end{note} \pnum @@ -7668,7 +7669,7 @@ \item a subexpression of one of the above -that is not a subexpression of a nested unevaluated operand. +that is not a subexpression of a nested unevaluated operand\iref{term.unevaluated.operand}. \end{itemize} \indextext{function!needed for constant evaluation}% diff --git a/source/future.tex b/source/future.tex index 7b63d953d9..a8513821cb 100644 --- a/source/future.tex +++ b/source/future.tex @@ -1426,7 +1426,7 @@ \pnum Let \tcode{TS} denote \tcode{tuple_size} of the cv-unqualified type \tcode{T}. If the expression \tcode{TS::value} is well-formed -when treated as an unevaluated operand, +when treated as an unevaluated operand\iref{term.unevaluated.operand}, then specializations of each of the two templates meet the \oldconcept{TransformationTrait} requirements with a base characteristic of \tcode{integral_constant}. diff --git a/source/iostreams.tex b/source/iostreams.tex index ac5f3ccecd..ce15d4c1cb 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -5673,7 +5673,7 @@ \pnum \constraints The expression \tcode{is >> std::forward(x)} is well-formed -when treated as an unevaluated operand and +when treated as an unevaluated operand\iref{term.unevaluated.operand} and \tcode{Istream} is publicly and unambiguously derived from \tcode{ios_base}. \pnum diff --git a/source/threads.tex b/source/threads.tex index cffc049b71..4476674e95 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -7482,7 +7482,7 @@ \pnum \constraints \tcode{\&F::operator()} is well-formed when -treated as an unevaluated operand and +treated as an unevaluated operand\iref{term.unevaluated.operand} and \tcode{decltype(\brk{}\&F::operator())} is of the form \tcode{R(G::*)(A...)}~\cv{}~\tcode{\opt{\&}~\opt{noexcept}} for a class type \tcode{G}. diff --git a/source/time.tex b/source/time.tex index 40ece8c7d1..d582c5bdb6 100644 --- a/source/time.tex +++ b/source/time.tex @@ -1196,7 +1196,7 @@ are valid and each denotes a type\iref{temp.deduct}, \item the expression \tcode{T::is_steady} -is well-formed when treated as an unevaluated operand, +is well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand}, \item the expression \tcode{T::now()} is well-formed when treated as an unevaluated operand. @@ -11023,7 +11023,7 @@ \begin{codeblock} from_stream(declval&>(), @$F$@, tp) \end{codeblock} -is well-formed when treated as an unevaluated operand. +is well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand}. \pnum \returns @@ -11056,7 +11056,7 @@ \begin{codeblock} from_stream(declval&>(), @$F$@, tp, addressof(abbrev)) \end{codeblock} -is well-formed when treated as an unevaluated operand. +is well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand}. \pnum \returns @@ -11093,7 +11093,7 @@ declval*>(), &offset) \end{codeblock} -is well-formed when treated as an unevaluated operand. +is well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand}. \pnum \returns @@ -11133,7 +11133,7 @@ from_stream(declval&>(), @$F$@, tp, addressof(abbrev), &offset) \end{codeblock} -is well-formed when treated as an unevaluated operand. +is well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand}. \pnum \returns diff --git a/source/utilities.tex b/source/utilities.tex index d89f902dba..489ae74aab 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -432,7 +432,7 @@ \pnum The library provides the function template \tcode{declval} to simplify the definition of -expressions which occur as unevaluated operands\iref{expr.prop}. +expressions which occur as unevaluated operands\iref{term.unevaluated.operand}. \indexlibraryglobal{declval}% \begin{itemdecl} @@ -2443,7 +2443,7 @@ \pnum Let \tcode{TS} denote \tcode{tuple_size} of the cv-unqualified type \tcode{T}. If the expression \tcode{TS::value} is well-formed -when treated as an unevaluated operand, then +when treated as an unevaluated operand\iref{term.unevaluated.operand}, then each specialization of the template meets the \oldconcept{Unary\-Type\-Trait} requirements\iref{meta.rqmts} with a base characteristic of \begin{codeblock} @@ -16133,7 +16133,7 @@ and return type \tcode{R} if the expression \tcode{\placeholdernc{INVOKE}(declval(), declval()...)}, -considered as an unevaluated operand\iref{expr.prop}, is +considered as an unevaluated operand\iref{term.unevaluated.operand}, is well-formed\iref{func.require}. \pnum @@ -18117,7 +18117,7 @@ \tcode{struct is_assignable;} & The expression \tcode{declval() =} \tcode{declval()} is well-formed when treated as an unevaluated - operand\iref{expr.prop}. Access checking is performed as if in a context + operand\iref{term.unevaluated.operand}. Access checking is performed as if in a context unrelated to \tcode{T} and \tcode{U}. Only the validity of the immediate context of the assignment expression is considered. \begin{tailnote} @@ -18152,7 +18152,7 @@ \tcode{struct is_swappable_with;} & The expressions \tcode{swap(declval(), declval())} and \tcode{swap(declval(), declval())} are each well-formed - when treated as an unevaluated operand\iref{expr.prop} + when treated as an unevaluated operand\iref{term.unevaluated.operand} in an overload-resolution context for swappable values\iref{swappable.requirements}. Access checking is performed as if in a context @@ -18190,7 +18190,7 @@ for which the expression \tcode{declval().\~U()} is well-formed - when treated as an unevaluated operand\iref{expr.prop}, + when treated as an unevaluated operand\iref{term.unevaluated.operand}, where \tcode{U} is \tcode{remove_all_extents_t}. & \tcode{T} shall be a complete type, \cv{}~\keyword{void}, @@ -18616,7 +18616,7 @@ \tcode{template}\br \tcode{struct is_invocable;} & The expression \tcode{\placeholdernc{INVOKE}(declval(), declval()...)} - is well-formed when treated as an unevaluated operand & + is well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand} & \tcode{Fn} and all types in the template parameter pack \tcode{ArgTypes} shall be complete types, \cv{}~\keyword{void}, or arrays of unknown bound. \\ \rowsep @@ -19080,7 +19080,7 @@ \tcode{struct invoke_result;} & If the expression \tcode{\placeholdernc{INVOKE}(declval(), declval()...)} - is well-formed when treated as an unevaluated operand\iref{expr.prop}, + is well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand}, the member typedef \tcode{type} names the type \tcode{decltype(\placeholdernc{INVOKE}(declval(), declval()...))}; otherwise, there shall be no member \tcode{type}. Access checking is @@ -22310,7 +22310,7 @@ typename Context::template formatter_type>() .format(declval(), declval()) \end{codeblock} -shall be well-formed when treated as an unevaluated operand. +shall be well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand}. \pnum \effects