Skip to content

Commit eb7f0bc

Browse files
committed
[intro.defs, macros] Add cross-references among definitions
Fixes ISO/CS 017 (C++23 DIS).
1 parent ecbeb5a commit eb7f0bc

File tree

2 files changed

+31
-29
lines changed

2 files changed

+31
-29
lines changed

source/intro.tex

+30-29
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@
180180
\defncontext{library}
181181
\indexdefn{type!character container}%
182182
class or a type used to
183-
represent a character
183+
represent a \termref{defns.character}{character}{}
184184

185185
\begin{defnote}
186186
It is used for one of the template parameters of \tcode{char_traits}
@@ -190,13 +190,13 @@
190190

191191
\definition{collating element}{defns.regex.collating.element}
192192
\indexdefn{collating element}%
193-
sequence of one or more characters within the
193+
sequence of one or more \termref{defns.character}{character}{s} within the
194194
current locale that collate as if they were a single character
195195

196196
\definition{component}{defns.component}
197197
\defncontext{library}
198198
\indexdefn{component}%
199-
group of library entities directly related as members, parameters, or
199+
group of library entities directly related as members, \termref{defns.parameter}{parameter}{s}, or
200200
return types
201201

202202
\begin{defnote}
@@ -226,13 +226,13 @@
226226
\indexdefn{deadlock}%
227227
situation wherein
228228
one or more threads are unable to continue execution because each is
229-
blocked waiting for one or more of the others to satisfy some condition
229+
\termref{defns.block}{block}{ed} waiting for one or more of the others to satisfy some condition
230230

231231
\definition{default behavior}{defns.default.behavior.impl}
232232
\indexdefn{behavior!default}%
233233
\defncontext{library implementation}
234234
specific behavior provided by the implementation,
235-
within the scope of the required behavior
235+
within the scope of the \termref{defns.required.behavior}{required behavior}{}
236236

237237
\indexdefn{message!diagnostic}%
238238
\definition{diagnostic message}{defns.diagnostic}
@@ -254,7 +254,7 @@
254254

255255
\indexdefn{type!dynamic}%
256256
\definition{dynamic type}{defns.dynamic.type.prvalue}
257-
\defncontext{prvalue} static type of the prvalue expression
257+
\defncontext{prvalue} \termref{defns.static.type}{static type}{} of the prvalue expression
258258

259259
\definition{expression-equivalent}{defns.expression.equivalent}
260260
\defncontext{library}
@@ -265,7 +265,7 @@
265265
are all not potentially-throwing,
266266
and
267267
either
268-
are all constant subexpressions or
268+
are all \termref{defns.const.subexpr}{constant subexpression}{s} or
269269
are all not constant subexpressions
270270

271271
\begin{example}
@@ -283,14 +283,14 @@
283283
\defncontext{regular expression}
284284
\indexdefn{finite state machine}%
285285
unspecified data structure that is used to
286-
represent a regular expression, and which permits efficient matches
286+
represent a \termref{defns.regex.regular.expression}{regular expression}{}, and which permits efficient matches
287287
against the regular expression to be obtained
288288

289289
\definition{format specifier}{defns.regex.format.specifier}
290290
\defncontext{regular expression}
291291
\indexdefn{format specifier}%
292-
sequence of one or more characters that is to be
293-
replaced with some part of a regular expression match
292+
sequence of one or more \termref{defns.character}{character}{s} that is to be
293+
replaced with some part of a \termref{defns.regex.regular.expression}{regular expression}{} match
294294

295295
\definition{handler function}{defns.handler}
296296
\defncontext{library}
@@ -309,7 +309,7 @@
309309

310310
\indexdefn{behavior!implementation-defined}%
311311
\definition{implementation-defined behavior}{defns.impl.defined}
312-
behavior, for a well-formed program construct and correct data, that
312+
behavior, for a \termref{defns.well.formed}{well-formed program}{} construct and correct data, that
313313
depends on the implementation and that each implementation documents
314314

315315
\definition{implementation-defined strict total order over pointers}
@@ -335,7 +335,7 @@
335335
\defncontext{regular expression}
336336
\indexdefn{matched}%
337337
\indexdefn{regular expression!matched}%
338-
condition when a sequence of zero or more characters
338+
condition when a sequence of zero or more \termref{defns.character}{character}{s}
339339
correspond to a sequence of characters defined by the pattern
340340

341341
\definition{modifier function}{defns.modifier}
@@ -366,7 +366,7 @@
366366
\indexdefn{NTCTS}%
367367
\indexdefn{string!null-terminated character type}%
368368
sequence of values that have
369-
character type
369+
\termref{defns.character}{character}{} type
370370
that precede the terminating null character type
371371
value
372372
\tcode{charT()}
@@ -406,7 +406,7 @@
406406
\definition{primary equivalence class}{defns.regex.primary.equivalence.class}
407407
\defncontext{regular expression}
408408
\indexdefn{primary equivalence class}%
409-
set of one or more characters which
409+
set of one or more \termref{defns.character}{character}{s} which
410410
share the same primary sort key: that is the sort key weighting that
411411
depends only upon character shape, and not accents, case, or
412412
locale specific tailorings
@@ -425,7 +425,7 @@
425425
that is not part of the \Cpp{} standard library and
426426
not defined by the implementation,
427427
or a closure type of a non-implementation-provided lambda expression,
428-
or an instantiation of a program-defined specialization
428+
or an instantiation of a \termref{defns.prog.def.spec}{program-defined specialization}{}
429429

430430
\begin{defnote}
431431
Types defined by the implementation include
@@ -462,7 +462,7 @@
462462

463463
\definition{regular expression}{defns.regex.regular.expression}
464464
pattern that selects specific strings
465-
from a set of character strings
465+
from a set of \termref{defns.character}{character}{} strings
466466

467467
\definition{replacement function}{defns.replacement}
468468
\defncontext{library}
@@ -479,7 +479,8 @@
479479
\definition{required behavior}{defns.required.behavior}
480480
\defncontext{library}
481481
\indexdefn{behavior!required}%
482-
description of replacement function and handler function semantics
482+
description of \termref{defns.replacement}{replacement function}{}
483+
and \termref{defns.handler}{handler function}{} semantics
483484
applicable to both the behavior provided by the implementation and
484485
the behavior of any such function definition in the program
485486

@@ -528,7 +529,7 @@
528529
parameter-type-list,
529530
enclosing namespace,
530531
return type,
531-
signature of the \grammarterm{template-head},
532+
\termref{defns.signature.template.head}{signature}{} of the \grammarterm{template-head},
532533
and
533534
trailing \grammarterm{requires-clause} (if any)
534535

@@ -539,14 +540,14 @@
539540
parameter-type-list,
540541
return type,
541542
enclosing class,
542-
signature of the \grammarterm{template-head},
543+
\termref{defns.signature.template.head}{signature}{} of the \grammarterm{template-head},
543544
and
544545
trailing \grammarterm{requires-clause} (if any)
545546

546547
\indexdefn{signature}%
547548
\definition{signature}{defns.signature.spec}
548-
\defncontext{function template specialization} signature of the template of which it is a specialization
549-
and its template arguments (whether explicitly specified or deduced)
549+
\defncontext{function template specialization} \termref{defns.signature.templ}{signature}{} of the template of which it is a specialization
550+
and its template \termref{defns.argument.templ}{argument}{s} (whether explicitly specified or deduced)
550551

551552
\indexdefn{signature}%
552553
\definition{signature}{defns.signature.member}
@@ -568,20 +569,20 @@
568569
\cv-qualifiers (if any),
569570
\grammarterm{ref-qualifier} (if any),
570571
return type (if any),
571-
signature of the \grammarterm{template-head},
572+
\termref{defns.signature.template.head}{signature}{} of the \grammarterm{template-head},
572573
and
573574
trailing \grammarterm{requires-clause} (if any)
574575

575576
\indexdefn{signature}%
576577
\definition{signature}{defns.signature.member.spec}
577-
\defncontext{class member function template specialization} signature of the member function template
578+
\defncontext{class member function template specialization} \termref{defns.signature.member.templ}{signature}{} of the member function template
578579
of which it is a specialization and its template arguments (whether explicitly specified or deduced)
579580

580581
\indexdefn{signature}%
581582
\definition{signature}{defns.signature.template.head}
582583
\defncontext{\grammarterm{template-head}}
583-
template parameter list,
584-
excluding template parameter names and default arguments,
584+
template \termref{defns.parameter.templ}{parameter}{} list,
585+
excluding template parameter names and default \termref{defns.argument.templ}{argument}{s},
585586
and
586587
\grammarterm{requires-clause} (if any)
587588

@@ -610,7 +611,7 @@
610611
\definition{sub-expression}{defns.regex.subexpression}
611612
\defncontext{regular expression}
612613
\indexdefn{sub-expression!regular expression}%
613-
subset of a regular expression that has
614+
subset of a \termref{defns.regex.regular.expression}{regular expression}{} that has
614615
been marked by parentheses
615616

616617
\definition{traits class}{defns.traits}
@@ -621,7 +622,7 @@
621622

622623
\indexdefn{unblock}%
623624
\definition{unblock}{defns.unblock}
624-
satisfy a condition that one or more blocked threads of execution are waiting for
625+
satisfy a condition that one or more \termref{defns.block}{block}{ed} threads of execution are waiting for
625626

626627
\indexdefn{behavior!undefined}%
627628
\definition{undefined behavior}{defns.undefined}
@@ -636,7 +637,7 @@
636637
from ignoring the situation completely with unpredictable results, to
637638
behaving during translation or program execution in a documented manner
638639
characteristic of the environment (with or without the issuance of a
639-
diagnostic message), to terminating a translation or execution (with the
640+
\termref{defns.diagnostic}{diagnostic message}{}), to terminating a translation or execution (with the
640641
issuance of a diagnostic message). Many erroneous program constructs do
641642
not engender undefined behavior; they are required to be diagnosed.
642643
Evaluation of a constant expression\iref{expr.const} never exhibits behavior explicitly
@@ -645,7 +646,7 @@
645646

646647
\indexdefn{behavior!unspecified}%
647648
\definition{unspecified behavior}{defns.unspecified}
648-
behavior, for a well-formed program construct and correct data, that
649+
behavior, for a \termref{defns.well.formed}{well-formed program}{} construct and correct data, that
649650
depends on the implementation
650651

651652
\begin{defnote}

source/macros.tex

+1
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@
368368
%% Cross-reference
369369
\newcommand{\xref}{\textsc{See also:}\space}
370370
\newcommand{\xrefc}[1]{\xref{} \IsoC{}, #1}
371+
\newcommand{\termref}[3]{\textit{#2}{#3}\iref{#1}} % in Clause 3
371372

372373
%% Inline comma-separated parenthesized references
373374
\ExplSyntaxOn

0 commit comments

Comments
 (0)