Skip to content

Commit 099d3d4

Browse files
jensmaurertkoeppe
authored andcommitted
[std] Use \keyword for 'thread_local', 'static_assert', 'decltype'.
1 parent b1cd588 commit 099d3d4

File tree

6 files changed

+23
-23
lines changed

6 files changed

+23
-23
lines changed

source/classes.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@
659659

660660
\pnum
661661
A member shall not be declared with the \keyword{extern}
662-
\grammarterm{storage-class-specifier}. Within a class definition, a member shall not be declared with the \tcode{thread_local} \grammarterm{storage-class-specifier} unless also declared \keyword{static}.
662+
\grammarterm{storage-class-specifier}. Within a class definition, a member shall not be declared with the \keyword{thread_local} \grammarterm{storage-class-specifier} unless also declared \keyword{static}.
663663

664664
\pnum
665665
The \grammarterm{decl-specifier-seq} may be omitted in constructor, destructor,
@@ -2682,9 +2682,9 @@
26822682

26832683
\pnum
26842684
A static data member is not part of the subobjects of a class. If a
2685-
static data member is declared \tcode{thread_local} there is one copy of
2685+
static data member is declared \keyword{thread_local} there is one copy of
26862686
the member per thread. If a static data member is not declared
2687-
\tcode{thread_local} there is one copy of the data member that is shared by all
2687+
\keyword{thread_local} there is one copy of the data member that is shared by all
26882688
the objects of the class.
26892689

26902690
\pnum

source/compatibility.tex

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@
641641
\rationale
642642
The deprecated support relied on a limited convention that could not be
643643
extended to support the general case or new language features. It has been
644-
superseded by direct language support with \tcode{decltype}, and by the
644+
superseded by direct language support with \keyword{decltype}, and by the
645645
\tcode{std::bind} and \tcode{std::not_fn} function templates.
646646
\effect
647647
A valid \CppXVII{} program that relies on the presence of \tcode{result_type},
@@ -789,11 +789,11 @@
789789
\diffref{dcl.stc}
790790
\indextext{\idxcode{register} storage class}%
791791
\change
792-
Removal of \tcode{register} \grammarterm{storage-class-specifier}.
792+
Removal of \keyword{register} \grammarterm{storage-class-specifier}.
793793
\rationale
794794
Enable repurposing of deprecated keyword in future revisions of \Cpp{}.
795795
\effect
796-
A valid \CppXIV{} declaration utilizing the \tcode{register}
796+
A valid \CppXIV{} declaration utilizing the \keyword{register}
797797
\grammarterm{storage-class-specifier} is ill-formed in this revision of \Cpp{}.
798798
The specifier can simply be removed to retain the original meaning.
799799

@@ -1286,12 +1286,12 @@
12861286
\keyword{char16_t},
12871287
\keyword{char32_t},
12881288
\keyword{constexpr},
1289-
\tcode{decltype},
1289+
\keyword{decltype},
12901290
\keyword{noexcept},
12911291
\keyword{nullptr},
1292-
\tcode{static_assert},
1292+
\keyword{static_assert},
12931293
and
1294-
\tcode{thread_local}.
1294+
\keyword{thread_local}.
12951295
Valid \CppIII{} code using these identifiers is invalid in this revision of \Cpp{}.
12961296

12971297
\diffref{lex.icon}
@@ -2174,7 +2174,7 @@
21742174

21752175
\diffref{dcl.stc}
21762176
\change
2177-
In \Cpp{}, \tcode{register} is not a storage class specifier.
2177+
In \Cpp{}, \keyword{register} is not a storage class specifier.
21782178
\rationale
21792179
The storage class specifier had no effect in \Cpp{}.
21802180
\effect
@@ -2712,7 +2712,7 @@
27122712
\indexhdr{assert.h}%
27132713

27142714
\pnum
2715-
The token \tcode{static_assert} is a keyword in \Cpp{}.
2715+
The token \keyword{static_assert} is a keyword in \Cpp{}.
27162716
It does not appear as a macro name defined
27172717
in \libheaderref{cassert}.
27182718

source/declarations.tex

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174
a \defn{structured binding declaration}\iref{dcl.struct.bind}.
175175
If the \grammarterm{decl-specifier-seq} contains
176176
any \grammarterm{decl-specifier} other than
177-
\keyword{static}, \tcode{thread_local}, \keyword{auto}\iref{dcl.spec.auto}, or
177+
\keyword{static}, \keyword{thread_local}, \keyword{auto}\iref{dcl.spec.auto}, or
178178
\grammarterm{cv-qualifier}{s},
179179
the program is ill-formed.
180180
The \grammarterm{initializer} shall be
@@ -352,8 +352,8 @@
352352
\end{bnf}
353353

354354
At most one \grammarterm{storage-class-specifier} shall appear in a given
355-
\grammarterm{decl-specifier-seq}, except that \tcode{thread_local} may appear with \keyword{static} or
356-
\keyword{extern}. If \tcode{thread_local} appears in any declaration of
355+
\grammarterm{decl-specifier-seq}, except that \keyword{thread_local} may appear with \keyword{static} or
356+
\keyword{extern}. If \keyword{thread_local} appears in any declaration of
357357
a variable it shall be present in all declarations of that entity. If a
358358
\grammarterm{storage-class-specifier}
359359
appears in a \grammarterm{decl-specifier-seq}, there can be no
@@ -377,13 +377,13 @@
377377
\end{note}
378378

379379
\pnum
380-
The \tcode{thread_local} specifier
380+
The \keyword{thread_local} specifier
381381
indicates that the named entity has thread storage duration\iref{basic.stc.thread}. It
382382
shall be applied only
383383
to the declaration of a variable of namespace or block scope,
384384
to a structured binding declaration\iref{dcl.struct.bind}, or
385385
to the declaration of a static data member.
386-
When \tcode{thread_local} is applied to a variable of block scope the
386+
When \keyword{thread_local} is applied to a variable of block scope the
387387
\grammarterm{storage-class-specifier} \keyword{static} is implied if no other
388388
\grammarterm{storage-class-specifier} appears in the
389389
\grammarterm{decl-specifier-seq}.
@@ -399,7 +399,7 @@
399399
\keyword{static} function parameters. A \tcode{static} specifier used in
400400
the declaration of a variable declares the variable to have static storage
401401
duration\iref{basic.stc.static}, unless accompanied by the
402-
\tcode{thread_local} specifier, which declares the variable to have thread
402+
\keyword{thread_local} specifier, which declares the variable to have thread
403403
storage duration\iref{basic.stc.thread}. A \keyword{static} specifier can be
404404
used in declarations of class members;~\ref{class.static} describes its
405405
effect.
@@ -1577,7 +1577,7 @@
15771577
\item otherwise, \tcode{decltype($E$)} is the type of $E$.
15781578
\end{itemize}
15791579

1580-
The operand of the \tcode{decltype} specifier is an unevaluated
1580+
The operand of the \keyword{decltype} specifier is an unevaluated
15811581
operand\iref{expr.prop}.
15821582

15831583
\begin{example}
@@ -1982,7 +1982,7 @@
19821982
placeholder alone. The type deduced for \tcode{T} is
19831983
determined as described in~\ref{dcl.type.decltype}, as though
19841984
$E$ had
1985-
been the operand of the \tcode{decltype}.
1985+
been the operand of the \keyword{decltype}.
19861986
\begin{example}
19871987
\begin{codeblock}
19881988
int i;
@@ -2609,7 +2609,7 @@
26092609
\pnum
26102610
A
26112611
\keyword{static},
2612-
\tcode{thread_local},
2612+
\keyword{thread_local},
26132613
\keyword{extern},
26142614
\keyword{mutable},
26152615
\keyword{friend},

source/diagnostics.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@
462462
\indextext{static_assert@\tcode{static_assert}!not macro}%
463463
The contents are the same as the C standard library header
464464
\libheader{assert.h},
465-
except that a macro named \tcode{static_assert}
465+
except that a macro named \keyword{static_assert}
466466
is not defined.
467467

468468
\xrefc{7.2}

source/support.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5754,7 +5754,7 @@
57545754
has more restricted behavior in this document.
57555755
A \tcode{setjmp}/\tcode{longjmp} call pair has undefined
57565756
behavior if replacing the \tcode{setjmp} and \tcode{longjmp}
5757-
by \tcode{catch} and \tcode{throw} would invoke any non-trivial destructors for any objects
5757+
by \keyword{catch} and \tcode{throw} would invoke any non-trivial destructors for any objects
57585758
with automatic storage duration.
57595759
A call to \tcode{setjmp} or \tcode{longjmp} has undefined
57605760
behavior if invoked in a suspension context of a coroutine\iref{expr.await}.

source/templates.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7100,7 +7100,7 @@
71007100
type and in template parameter declarations. The expressions include not only
71017101
constant expressions such as those that appear in array bounds or as nontype
71027102
template arguments but also general expressions (i.e., non-constant expressions)
7103-
inside \tcode{sizeof}, \tcode{decltype}, and other contexts that allow non-constant
7103+
inside \tcode{sizeof}, \keyword{decltype}, and other contexts that allow non-constant
71047104
expressions. The substitution proceeds in lexical order and stops when
71057105
a condition that causes deduction to fail is encountered.
71067106
If substitution into different declarations of the same function template would

0 commit comments

Comments
 (0)