Skip to content

Commit 75851ab

Browse files
authored
[std] Use \keyword for coroutine keywords (#4943)
1 parent 668c82a commit 75851ab

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

source/classes.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6186,7 +6186,7 @@
61866186
a move operation is first considered before attempting a copy operation:
61876187
\begin{itemize}
61886188
\item If the \grammarterm{expression} in a \tcode{return}\iref{stmt.return} or
6189-
\tcode{co_return}\iref{stmt.return.coroutine} statement
6189+
\keyword{co_return}\iref{stmt.return.coroutine} statement
61906190
is a (possibly parenthesized) \grammarterm{id-expression}
61916191
that names an implicitly movable entity declared in the body
61926192
or \grammarterm{parameter-declaration-clause} of the innermost enclosing

source/compatibility.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
The \keyword{constinit} keyword is added to
132132
prevent unintended dynamic initialization\iref{dcl.constinit}.
133133
\item
134-
The \tcode{co_await}, \tcode{co_yield}, and \tcode{co_return} keywords are added
134+
The \keyword{co_await}, \keyword{co_yield}, and \keyword{co_return} keywords are added
135135
to enable the definition of coroutines \iref{dcl.fct.def.coroutine}.
136136
\item
137137
The \tcode{requires} keyword is added
@@ -144,7 +144,7 @@
144144
\tcode{concept},
145145
\keyword{consteval},
146146
\keyword{constinit},
147-
\tcode{co_await}, \tcode{co_yield}, \tcode{co_return},
147+
\keyword{co_await}, \keyword{co_yield}, \keyword{co_return},
148148
or \tcode{requires}
149149
as an identifier is not valid in this revision of \Cpp{}.
150150

source/declarations.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6461,7 +6461,7 @@
64616461
the program is ill-formed.
64626462
\begin{note}
64636463
If \tcode{return_void} is found, flowing off
6464-
the end of a coroutine is equivalent to a \tcode{co_return} with no operand.
6464+
the end of a coroutine is equivalent to a \keyword{co_return} with no operand.
64656465
Otherwise, flowing off the end of a coroutine
64666466
results in undefined behavior\iref{stmt.return.coroutine}.
64676467
\end{note}
@@ -6619,7 +6619,7 @@
66196619
the coroutine is considered suspended at the final suspend point.
66206620

66216621
\pnum
6622-
The expression \tcode{co_await} \tcode{\exposid{promise}.final_suspend()}
6622+
The expression \keyword{co_await} \tcode{\exposid{promise}.final_suspend()}
66236623
shall not be potentially-throwing\iref{except.spec}.
66246624

66256625
\rSec1[dcl.struct.bind]{Structured binding declarations}%

source/expressions.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4473,7 +4473,7 @@
44734473
\indextext{\idxcode{co_await}}%
44744474

44754475
\pnum
4476-
The \tcode{co_await} expression is used to suspend evaluation of a
4476+
The \keyword{co_await} expression is used to suspend evaluation of a
44774477
coroutine\iref{dcl.fct.def.coroutine} while awaiting completion of
44784478
the computation represented by the operand expression.
44794479

source/overloading.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3037,7 +3037,7 @@
30373037
stated in~\ref{basic.stc.dynamic}.
30383038

30393039
\pnum
3040-
The \tcode{co_await} operator is described completely in~\ref{expr.await}.
3040+
The \keyword{co_await} operator is described completely in~\ref{expr.await}.
30413041
The attributes and restrictions
30423042
found in the rest of \ref{over.oper} do not apply to it unless explicitly
30433043
stated in~\ref{expr.await}.

source/statements.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@
866866

867867
\pnum
868868
A coroutine returns to its caller or resumer\iref{dcl.fct.def.coroutine}
869-
by the \tcode{co_return} statement or when suspended\iref{expr.await}.
869+
by the \keyword{co_return} statement or when suspended\iref{expr.await}.
870870
A coroutine shall not enclose
871871
a \tcode{return} statement\iref{stmt.return}.
872872
\begin{note}
@@ -875,11 +875,11 @@
875875
\end{note}
876876

877877
\pnum
878-
The \grammarterm{expr-or-braced-init-list} of a \tcode{co_return} statement is
878+
The \grammarterm{expr-or-braced-init-list} of a \keyword{co_return} statement is
879879
called its operand.
880880
Let \placeholder{p} be an lvalue naming the coroutine
881881
promise object\iref{dcl.fct.def.coroutine}.
882-
A \tcode{co_return} statement is equivalent to:
882+
A \keyword{co_return} statement is equivalent to:
883883
\begin{ncsimplebnf}
884884
\terminal{\{} S\terminal{;} \terminal{goto} \exposid{final-suspend}\terminal{;} \terminal{\}}
885885
\end{ncsimplebnf}
@@ -902,7 +902,7 @@
902902
\pnum
903903
If \placeholder{p}\tcode{.return_void()} is a valid expression,
904904
flowing off the end of a coroutine's \grammarterm{function-body}
905-
is equivalent to a \tcode{co_return} with no operand;
905+
is equivalent to a \keyword{co_return} with no operand;
906906
otherwise flowing off the end of a coroutine's \grammarterm{function-body}
907907
results in undefined behavior.
908908

0 commit comments

Comments
 (0)