Skip to content

Commit 4bffacc

Browse files
authored
[std] Fix cross-references to 'unevaluated operand' (#4941)
This change adds a new label to the desired paragraph, updates existing references to refer to the new label, and adds new references to occurrences of "unevaluated operand" that previously did not have one.
1 parent cb39ab5 commit 4bffacc

File tree

8 files changed

+31
-30
lines changed

8 files changed

+31
-30
lines changed

source/algorithms.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10827,7 +10827,7 @@
1082710827
\pnum
1082810828
\constraints
1082910829
The expression \tcode{::new (declval<void*>()) T(declval<Args>()...)}
10830-
is well-formed when treated as an unevaluated operand.
10830+
is well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand}.
1083110831

1083210832
\pnum
1083310833
\effects

source/declarations.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1581,7 +1581,7 @@
15811581
\end{itemize}
15821582

15831583
The operand of the \keyword{decltype} specifier is an unevaluated
1584-
operand\iref{expr.prop}.
1584+
operand\iref{term.unevaluated.operand}.
15851585

15861586
\begin{example}
15871587
\begin{codeblock}
@@ -4171,7 +4171,7 @@
41714171
int f(int a, int b = a); // error: parameter \tcode{a} used as default argument
41724172
typedef int I;
41734173
int g(float I, int b = I(2)); // error: parameter \tcode{I} found
4174-
int h(int a, int b = sizeof(a)); // OK, unevaluated operand
4174+
int h(int a, int b = sizeof(a)); // OK, unevaluated operand\iref{term.unevaluated.operand}
41754175
\end{codeblock}
41764176
\end{example}
41774177
A non-static member shall not appear in a default argument unless it appears as

source/expressions.tex

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@
424424
\rSec2[expr.context]{Context dependence}
425425

426426
\pnum
427+
\label{term.unevaluated.operand}%
427428
In some contexts, \defnx{unevaluated operands}{unevaluated operand}
428429
appear~(\ref{expr.prim.req},
429430
\ref{expr.typeid},
@@ -1384,7 +1385,7 @@
13841385
In the declaration of \tcode{p2},
13851386
those constraints are required to be satisfied
13861387
even though
1387-
\tcode{f} is an unevaluated operand\iref{expr.prop}.
1388+
\tcode{f} is an unevaluated operand\iref{term.unevaluated.operand}.
13881389
\end{example}
13891390
\end{note}
13901391

@@ -2694,7 +2695,7 @@
26942695
A \grammarterm{requires-expression} is a prvalue of type \tcode{bool}
26952696
whose value is described below.
26962697
Expressions appearing within a \grammarterm{requirement-body}
2697-
are unevaluated operands\iref{expr.prop}.
2698+
are unevaluated operands\iref{term.unevaluated.operand}.
26982699

26992700
\pnum
27002701
\begin{example}
@@ -2781,7 +2782,7 @@
27812782
\begin{note}
27822783
The enclosing \grammarterm{requires-expression} will evaluate to \keyword{false}
27832784
if substitution of template arguments into the \grammarterm{expression} fails.
2784-
The \grammarterm{expression} is an unevaluated operand\iref{expr.prop}.
2785+
The \grammarterm{expression} is an unevaluated operand\iref{term.unevaluated.operand}.
27852786
\end{note}
27862787
\begin{example}
27872788
\begin{codeblock}
@@ -2956,7 +2957,7 @@
29562957
\end{example}
29572958

29582959
\pnum
2959-
A local parameter shall only appear as an unevaluated operand\iref{expr.prop}
2960+
A local parameter shall only appear as an unevaluated operand\iref{term.unevaluated.operand}
29602961
within the \grammarterm{constraint-expression}.
29612962
\begin{example}
29622963
\begin{codeblock}
@@ -3774,7 +3775,7 @@
37743775
If the expression is a prvalue,
37753776
the temporary materialization conversion\iref{conv.rval}
37763777
is applied.
3777-
The expression is an unevaluated operand\iref{expr.prop}.
3778+
The expression is an unevaluated operand\iref{term.unevaluated.operand}.
37783779

37793780
\pnum
37803781
When \keyword{typeid} is applied to a \grammarterm{type-id}, the result
@@ -4766,7 +4767,7 @@
47664767
The \keyword{sizeof} operator yields the number of bytes
47674768
occupied by a non-potentially-overlapping object of the type
47684769
of its operand. The operand is either an expression,
4769-
which is an unevaluated operand\iref{expr.prop}, or a parenthesized
4770+
which is an unevaluated operand\iref{term.unevaluated.operand}, or a parenthesized
47704771
\grammarterm{type-id}.
47714772
\indextext{type!incomplete}%
47724773
The \keyword{sizeof} operator shall not be applied to an expression that
@@ -4881,7 +4882,7 @@
48814882
\indextext{\idxcode{noexcept}}%
48824883
\indextext{expression!\idxcode{noexcept}}%
48834884
The \keyword{noexcept} operator determines whether the evaluation of its operand,
4884-
which is an unevaluated operand\iref{expr.prop}, can throw an
4885+
which is an unevaluated operand\iref{term.unevaluated.operand}, can throw an
48854886
exception\iref{except.throw}.
48864887

48874888
\begin{bnf}
@@ -7005,7 +7006,7 @@
70057006
A simple assignment whose left operand is of
70067007
a volatile-qualified type is deprecated\iref{depr.volatile.type}
70077008
unless the (possibly parenthesized) assignment is a discarded-value expression or
7008-
an unevaluated operand.
7009+
an unevaluated operand\iref{term.unevaluated.operand}.
70097010

70107011
\pnum
70117012
The behavior of an expression of the form \tcode{E1 \placeholder{op}= E2}
@@ -7633,7 +7634,7 @@
76337634
\end{itemize}
76347635
\begin{note}
76357636
A manifestly constant-evaluated expression
7636-
is evaluated even in an unevaluated operand.
7637+
is evaluated even in an unevaluated operand\iref{term.unevaluated.operand}.
76377638
\end{note}
76387639

76397640
\pnum
@@ -7663,7 +7664,7 @@
76637664

76647665
\item
76657666
a subexpression of one of the above
7666-
that is not a subexpression of a nested unevaluated operand.
7667+
that is not a subexpression of a nested unevaluated operand\iref{term.unevaluated.operand}.
76677668
\end{itemize}
76687669

76697670
\indextext{function!needed for constant evaluation}%

source/future.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1426,7 +1426,7 @@
14261426
\pnum
14271427
Let \tcode{TS} denote \tcode{tuple_size<T>} of the cv-unqualified type \tcode{T}.
14281428
If the expression \tcode{TS::value} is well-formed
1429-
when treated as an unevaluated operand,
1429+
when treated as an unevaluated operand\iref{term.unevaluated.operand},
14301430
then specializations of each of the two templates meet
14311431
the \oldconcept{TransformationTrait} requirements with a base characteristic of
14321432
\tcode{integral_constant<size_t, TS::value>}.

source/iostreams.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5673,7 +5673,7 @@
56735673
\pnum
56745674
\constraints
56755675
The expression \tcode{is >> std::forward<T>(x)} is well-formed
5676-
when treated as an unevaluated operand and
5676+
when treated as an unevaluated operand\iref{term.unevaluated.operand} and
56775677
\tcode{Istream} is publicly and unambiguously derived from \tcode{ios_base}.
56785678

56795679
\pnum

source/threads.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7482,7 +7482,7 @@
74827482
\pnum
74837483
\constraints
74847484
\tcode{\&F::operator()} is well-formed when
7485-
treated as an unevaluated operand and
7485+
treated as an unevaluated operand\iref{term.unevaluated.operand} and
74867486
\tcode{decltype(\brk{}\&F::operator())} is of the form
74877487
\tcode{R(G::*)(A...)}~\cv{}~\tcode{\opt{\&}~\opt{noexcept}}
74887488
for a class type \tcode{G}.

source/time.tex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,7 +1196,7 @@
11961196
are valid and each denotes a type\iref{temp.deduct},
11971197
\item the expression
11981198
\tcode{T::is_steady}
1199-
is well-formed when treated as an unevaluated operand,
1199+
is well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand},
12001200
\item the expression
12011201
\tcode{T::now()}
12021202
is well-formed when treated as an unevaluated operand.
@@ -11023,7 +11023,7 @@
1102311023
\begin{codeblock}
1102411024
from_stream(declval<basic_istream<charT, traits>&>(), @$F$@, tp)
1102511025
\end{codeblock}
11026-
is well-formed when treated as an unevaluated operand.
11026+
is well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand}.
1102711027

1102811028
\pnum
1102911029
\returns
@@ -11056,7 +11056,7 @@
1105611056
\begin{codeblock}
1105711057
from_stream(declval<basic_istream<charT, traits>&>(), @$F$@, tp, addressof(abbrev))
1105811058
\end{codeblock}
11059-
is well-formed when treated as an unevaluated operand.
11059+
is well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand}.
1106011060

1106111061
\pnum
1106211062
\returns
@@ -11093,7 +11093,7 @@
1109311093
declval<basic_string<charT, traits, Alloc>*>(),
1109411094
&offset)
1109511095
\end{codeblock}
11096-
is well-formed when treated as an unevaluated operand.
11096+
is well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand}.
1109711097

1109811098
\pnum
1109911099
\returns
@@ -11133,7 +11133,7 @@
1113311133
from_stream(declval<basic_istream<charT, traits>&>(),
1113411134
@$F$@, tp, addressof(abbrev), &offset)
1113511135
\end{codeblock}
11136-
is well-formed when treated as an unevaluated operand.
11136+
is well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand}.
1113711137

1113811138
\pnum
1113911139
\returns

source/utilities.tex

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@
432432

433433
\pnum
434434
The library provides the function template \tcode{declval} to simplify the definition of
435-
expressions which occur as unevaluated operands\iref{expr.prop}.
435+
expressions which occur as unevaluated operands\iref{term.unevaluated.operand}.
436436

437437
\indexlibraryglobal{declval}%
438438
\begin{itemdecl}
@@ -2443,7 +2443,7 @@
24432443
\pnum
24442444
Let \tcode{TS} denote \tcode{tuple_size<T>} of the cv-unqualified type \tcode{T}.
24452445
If the expression \tcode{TS::value} is well-formed
2446-
when treated as an unevaluated operand, then
2446+
when treated as an unevaluated operand\iref{term.unevaluated.operand}, then
24472447
each specialization of the template meets the \oldconcept{Unary\-Type\-Trait} requirements\iref{meta.rqmts}
24482448
with a base characteristic of
24492449
\begin{codeblock}
@@ -16120,7 +16120,7 @@
1612016120
and return type \tcode{R}
1612116121
if the expression
1612216122
\tcode{\placeholdernc{INVOKE}<R>(declval<F\&>(), declval<ArgTypes>()...)},
16123-
considered as an unevaluated operand\iref{expr.prop}, is
16123+
considered as an unevaluated operand\iref{term.unevaluated.operand}, is
1612416124
well-formed\iref{func.require}.
1612516125

1612616126
\pnum
@@ -18104,7 +18104,7 @@
1810418104
\tcode{struct is_assignable;} &
1810518105
The expression \tcode{declval<T>() =} \tcode{declval<U>()} is well-formed
1810618106
when treated as an unevaluated
18107-
operand\iref{expr.prop}. Access checking is performed as if in a context
18107+
operand\iref{term.unevaluated.operand}. Access checking is performed as if in a context
1810818108
unrelated to \tcode{T} and \tcode{U}. Only the validity of the immediate context
1810918109
of the assignment expression is considered.
1811018110
\begin{tailnote}
@@ -18139,7 +18139,7 @@
1813918139
\tcode{struct is_swappable_with;} &
1814018140
The expressions \tcode{swap(declval<T>(), declval<U>())} and
1814118141
\tcode{swap(declval<U>(), declval<T>())} are each well-formed
18142-
when treated as an unevaluated operand\iref{expr.prop}
18142+
when treated as an unevaluated operand\iref{term.unevaluated.operand}
1814318143
in an overload-resolution context
1814418144
for swappable values\iref{swappable.requirements}.
1814518145
Access checking is performed as if in a context
@@ -18177,7 +18177,7 @@
1817718177
for which the expression
1817818178
\tcode{declval<U\&>().\~U()}
1817918179
is well-formed
18180-
when treated as an unevaluated operand\iref{expr.prop},
18180+
when treated as an unevaluated operand\iref{term.unevaluated.operand},
1818118181
where \tcode{U} is
1818218182
\tcode{remove_all_extents_t<T>}. &
1818318183
\tcode{T} shall be a complete type, \cv{}~\keyword{void},
@@ -18603,7 +18603,7 @@
1860318603
\tcode{template<class Fn, class... ArgTypes>}\br
1860418604
\tcode{struct is_invocable;} &
1860518605
The expression \tcode{\placeholdernc{INVOKE}(declval<Fn>(), declval<ArgTypes>()...)}
18606-
is well-formed when treated as an unevaluated operand &
18606+
is well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand} &
1860718607
\tcode{Fn} and all types in the template parameter pack \tcode{ArgTypes}
1860818608
shall be complete types, \cv{}~\keyword{void}, or
1860918609
arrays of unknown bound. \\ \rowsep
@@ -19067,7 +19067,7 @@
1906719067
\tcode{struct invoke_result;}
1906819068
&
1906919069
If the expression \tcode{\placeholdernc{INVOKE}(declval<Fn>(), declval<ArgTypes>()...)}
19070-
is well-formed when treated as an unevaluated operand\iref{expr.prop},
19070+
is well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand},
1907119071
the member typedef \tcode{type} names the type
1907219072
\tcode{decltype(\placeholdernc{INVOKE}(declval<Fn>(), declval<ArgTypes>()...))};
1907319073
otherwise, there shall be no member \tcode{type}. Access checking is
@@ -22297,7 +22297,7 @@
2229722297
typename Context::template formatter_type<remove_cvref_t<T>>()
2229822298
.format(declval<T&>(), declval<Context&>())
2229922299
\end{codeblock}
22300-
shall be well-formed when treated as an unevaluated operand.
22300+
shall be well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand}.
2230122301

2230222302
\pnum
2230322303
\effects

0 commit comments

Comments
 (0)