Skip to content

Commit 2878217

Browse files
committed
[std] Extend \iref to accept a list of cross-references
1 parent 97430e8 commit 2878217

27 files changed

+257
-262
lines changed

source/algorithms.tex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3333,7 +3333,7 @@
33333333
\pnum
33343334
\mandates
33353335
The type \tcode{Size} is convertible
3336-
to an integral type~(\ref{conv.integral}, \ref{class.conv}).
3336+
to an integral type\iref{conv.integral,class.conv}.
33373337

33383338
\pnum
33393339
\expects
@@ -3373,7 +3373,7 @@
33733373
\pnum
33743374
\mandates
33753375
The type \tcode{Size} is convertible
3376-
to an integral type~(\ref{conv.integral}, \ref{class.conv}).
3376+
to an integral type\iref{conv.integral,class.conv}.
33773377

33783378
\pnum
33793379
\expects
@@ -4245,7 +4245,7 @@
42454245
\pnum
42464246
\mandates
42474247
The type \tcode{Size}
4248-
is convertible to an integral type~(\ref{conv.integral}, \ref{class.conv}).
4248+
is convertible to an integral type\iref{conv.integral,class.conv}.
42494249

42504250
\pnum
42514251
\returns
@@ -4485,7 +4485,7 @@
44854485
\pnum
44864486
\mandates
44874487
The type \tcode{Size} is convertible
4488-
to an integral type~(\ref{conv.integral}, \ref{class.conv}).
4488+
to an integral type\iref{conv.integral,class.conv}.
44894489

44904490
\pnum
44914491
\effects
@@ -5226,7 +5226,7 @@
52265226
The expression \tcode{value}
52275227
is writable\iref{iterator.requirements.general} to the output iterator.
52285228
The type \tcode{Size} is convertible
5229-
to an integral type~(\ref{conv.integral}, \ref{class.conv}).
5229+
to an integral type\iref{conv.integral,class.conv}.
52305230

52315231
\pnum
52325232
\effects
@@ -5280,7 +5280,7 @@
52805280
\pnum
52815281
\mandates
52825282
\tcode{Size} is convertible
5283-
to an integral type~(\ref{conv.integral}, \ref{class.conv}).
5283+
to an integral type\iref{conv.integral,class.conv}.
52845284

52855285
\pnum
52865286
\effects

source/basic.tex

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
\item
5151
\grammarterm{declaration},
5252
\grammarterm{block-declaration}, or
53-
\grammarterm{member-declaration} (\ref{dcl.pre}, \ref{class.mem}),
53+
\grammarterm{member-declaration}\iref{dcl.pre,class.mem},
5454
\item
5555
\grammarterm{init-declarator}\iref{dcl.decl},
5656
\item
@@ -178,7 +178,7 @@
178178
\item
179179
\indextext{declaration!static member@\tcode{static} member}%
180180
it declares a non-inline static data member in a class
181-
definition~(\ref{class.mem}, \ref{class.static}),
181+
definition\iref{class.mem,class.static},
182182
\item
183183
it declares a static data member outside a class definition
184184
and the variable was defined within the class with the \keyword{constexpr}
@@ -404,7 +404,7 @@
404404
\item
405405
A function is named by an expression or conversion
406406
if it is the selected member
407-
of an overload set~(\ref{basic.lookup}, \ref{over.match}, \ref{over.over})
407+
of an overload set\iref{basic.lookup,over.match,over.over}
408408
in an overload resolution performed
409409
as part of forming that expression or conversion,
410410
unless it is a pure virtual function and either
@@ -413,7 +413,7 @@
413413
the expression forms a pointer to member\iref{expr.unary.op}.
414414
\begin{note}
415415
This covers
416-
taking the address of functions~(\ref{conv.func}, \ref{expr.unary.op}),
416+
taking the address of functions\iref{conv.func,expr.unary.op},
417417
calls to named functions\iref{expr.call},
418418
operator overloading\iref{over},
419419
user-defined conversions\iref{class.conv.fct},
@@ -597,8 +597,8 @@
597597
a glvalue referring
598598
to an object of type \tcode{T}\iref{conv.lval}, or
599599
\item an expression is converted (either implicitly or explicitly) to
600-
type \tcode{T} (\ref{conv}, \ref{expr.type.conv},
601-
\ref{expr.dynamic.cast}, \ref{expr.static.cast}, \ref{expr.cast}), or
600+
type \tcode{T}\iref{conv,expr.type.conv,
601+
expr.dynamic.cast,expr.static.cast,expr.cast}, or
602602
\item an expression that is not a null pointer constant, and has type
603603
other than \cv{}~\tcode{\keyword{void}*}, is converted to the type pointer to \tcode{T}
604604
or reference to \tcode{T} using a standard conversion\iref{conv},
@@ -690,7 +690,7 @@
690690
is subject to the requirements described in this paragraph (recursively).
691691

692692
\item If \tcode{D} is a class with an implicitly-declared
693-
constructor (\ref{class.default.ctor}, \ref{class.copy.ctor}),
693+
constructor\iref{class.default.ctor,class.copy.ctor},
694694
it is as if the constructor was
695695
implicitly defined in every translation unit where it is odr-used, and the
696696
implicit definition in every translation unit shall call the same
@@ -1190,7 +1190,7 @@
11901190
Each
11911191
\begin{itemize}
11921192
\item
1193-
selection or iteration statement (\ref{stmt.select}, \ref{stmt.iter}),
1193+
selection or iteration statement\iref{stmt.select,stmt.iter},
11941194
\item
11951195
substatement of such a statement,
11961196
\item
@@ -1400,7 +1400,7 @@
14001400
if the declarations found by name lookup do not all denote the same entity,
14011401
\indextext{lookup!ambiguous}%
14021402
they are \defn{ambiguous} and the program is ill-formed.
1403-
Overload resolution~(\ref{over.match}, \ref{over.over})
1403+
Overload resolution\iref{over.match,over.over}
14041404
takes place after name lookup has succeeded. The access rules\iref{class.access}
14051405
are considered only once name lookup and
14061406
function overload resolution (if applicable) have succeeded. Only after
@@ -1698,7 +1698,7 @@
16981698
\begin{note}
16991699
Even if the result of name lookup is unambiguous, use of a name found in
17001700
multiple subobjects might still be
1701-
ambiguous~(\ref{conv.mem}, \ref{expr.ref}, \ref{class.access.base}).
1701+
ambiguous\iref{conv.mem,expr.ref,class.access.base}.
17021702
\end{note}
17031703
\begin{example}
17041704
\begin{codeblock}
@@ -2025,7 +2025,7 @@
20252025
have the same innermost enclosing non-inline namespace scope as
20262026
a declaration of an associated entity attached to \tcode{M}\iref{basic.link}.
20272027
\end{itemize}
2028-
If the lookup is for a dependent name (\ref{temp.dep}, \ref{temp.dep.candidate}),
2028+
If the lookup is for a dependent name\iref{temp.dep,temp.dep.candidate},
20292029
the above lookup is also performed
20302030
from each point in the instantiation context\iref{module.context} of the lookup,
20312031
additionally ignoring any declaration that
@@ -2703,7 +2703,7 @@
27032703
\pnum
27042704
Two declarations of entities declare the same entity
27052705
if, considering declarations of unnamed types to introduce their names
2706-
for linkage purposes, if any (\ref{dcl.typedef}, \ref{dcl.enum}),
2706+
for linkage purposes, if any\iref{dcl.typedef,dcl.enum},
27072707
they correspond\iref{basic.scope.scope},
27082708
have the same target scope that is not a function or template parameter scope,
27092709
and either
@@ -2716,8 +2716,8 @@
27162716
they both declare names with external linkage.
27172717
\end{itemize}
27182718
\begin{note}
2719-
There are other circumstances in which declarations declare the same entity
2720-
(\ref{dcl.link}, \ref{temp.type}, \ref{temp.spec.partial}).
2719+
There are other circumstances in which declarations declare the same entity%
2720+
\iref{dcl.link,temp.type,temp.spec.partial}.
27212721
\end{note}
27222722

27232723
\pnum
@@ -3072,7 +3072,7 @@
30723072
by an operation that implicitly creates objects (see below),
30733073
when implicitly changing the active member of a union\iref{class.union},
30743074
or
3075-
when a temporary object is created~(\ref{conv.rval}, \ref{class.temporary}).
3075+
when a temporary object is created\iref{conv.rval,class.temporary}.
30763076
An object occupies a region of storage
30773077
in its period of construction\iref{class.cdtor},
30783078
throughout its lifetime\iref{basic.life},
@@ -3327,8 +3327,8 @@
33273327
implicitly creates objects in the returned region of storage and
33283328
returns a pointer to a suitable created object.
33293329
\begin{note}
3330-
Some functions in the \Cpp{} standard library implicitly create objects
3331-
(\ref{allocator.traits.members}, \ref{c.malloc}, \ref{cstring.syn}, \ref{bit.cast}).
3330+
Some functions in the \Cpp{} standard library implicitly create objects%
3331+
\iref{allocator.traits.members,c.malloc,cstring.syn,bit.cast}.
33323332
\end{note}
33333333
\indextext{object model|)}
33343334

@@ -3351,7 +3351,7 @@
33513351
\end{itemize}
33523352
except that if the object is a union member or subobject thereof,
33533353
its lifetime only begins if that union member is the
3354-
initialized member in the union~(\ref{dcl.init.aggr}, \ref{class.base.init}),
3354+
initialized member in the union\iref{dcl.init.aggr,class.base.init},
33553355
or as described in \ref{class.union} and \ref{class.copy.ctor},
33563356
and except as described in \ref{allocator.members}.
33573357
The lifetime of an object \placeholder{o} of type \tcode{T} ends when:
@@ -3639,8 +3639,8 @@
36393639
\item
36403640
the right operand of a comma expression\iref{expr.comma},
36413641
\item
3642-
the operand of a cast or conversion~(\ref{conv.integral},
3643-
\ref{expr.type.conv}, \ref{expr.static.cast}, \ref{expr.cast})
3642+
the operand of a cast or conversion\iref{conv.integral,
3643+
expr.type.conv,expr.static.cast,expr.cast}
36443644
to an unsigned ordinary character type
36453645
or \tcode{std::byte} type\iref{cstddef.syn}, or
36463646
\item
@@ -3743,7 +3743,7 @@
37433743
\end{itemize}
37443744
have \defn{static storage duration}.
37453745
The storage for these entities lasts for the duration of the
3746-
program~(\ref{basic.start.static}, \ref{basic.start.term}).
3746+
program\iref{basic.start.static,basic.start.term}.
37473747

37483748
\pnum
37493749
If a variable with static storage duration has initialization or a
@@ -4067,7 +4067,7 @@
40674067
\rSec2[basic.align]{Alignment}
40684068

40694069
\pnum
4070-
Object types have \defnx{alignment requirements}{alignment requirement!implementation-defined}~(\ref{basic.fundamental}, \ref{basic.compound})
4070+
Object types have \defnx{alignment requirements}{alignment requirement!implementation-defined}\iref{basic.fundamental,basic.compound}
40714071
which place restrictions on the addresses at which an object of that type
40724072
may be allocated. An \defn{alignment} is an \impldef{alignment}
40734073
integer value representing the number of bytes between successive addresses
@@ -4195,16 +4195,16 @@
41954195
Temporary objects are materialized:
41964196
\begin{itemize}
41974197
\item
4198-
when binding a reference to a prvalue~(\ref{dcl.init.ref}, \ref{expr.type.conv},
4199-
\ref{expr.dynamic.cast}, \ref{expr.static.cast}, \ref{expr.const.cast}, \ref{expr.cast}),
4198+
when binding a reference to a prvalue\iref{dcl.init.ref,expr.type.conv,
4199+
expr.dynamic.cast,expr.static.cast,expr.const.cast,expr.cast},
42004200
\item
4201-
when performing member access on a class prvalue~(\ref{expr.ref}, \ref{expr.mptr.oper}),
4201+
when performing member access on a class prvalue\iref{expr.ref,expr.mptr.oper},
42024202
\item
4203-
when performing an array-to-pointer conversion or subscripting on an array prvalue~(\ref{conv.array}, \ref{expr.sub}),
4203+
when performing an array-to-pointer conversion or subscripting on an array prvalue\iref{conv.array,expr.sub},
42044204
\item
42054205
when initializing an object of type \tcode{std::initializer_list<T>} from a \grammarterm{braced-init-list}\iref{dcl.init.list},
42064206
\item
4207-
for certain unevaluated operands~(\ref{expr.typeid}, \ref{expr.sizeof}), and
4207+
for certain unevaluated operands\iref{expr.typeid,expr.sizeof}, and
42084208
\item
42094209
when a prvalue that has type other than \cv{}~\keyword{void} appears as a discarded-value expression\iref{expr.context}.
42104210
\end{itemize}
@@ -4279,7 +4279,7 @@
42794279
\indextext{temporary!destructor for}%
42804280
\indextext{temporary!destruction of}%
42814281
When an implementation introduces a temporary object of a class that has a
4282-
non-trivial constructor~(\ref{class.default.ctor}, \ref{class.copy.ctor}),
4282+
non-trivial constructor\iref{class.default.ctor,class.copy.ctor},
42834283
it shall ensure that a constructor is called for the temporary object.
42844284
Similarly, the destructor shall be called for a temporary with a non-trivial
42854285
destructor\iref{class.dtor}.
@@ -4305,7 +4305,7 @@
43054305
The first context is when a default constructor is called to initialize
43064306
an element of an array with no corresponding initializer\iref{dcl.init}.
43074307
The second context is when a copy constructor is called to copy an element of
4308-
an array while the entire array is copied~(\ref{expr.prim.lambda.capture}, \ref{class.copy.ctor}).
4308+
an array while the entire array is copied\iref{expr.prim.lambda.capture,class.copy.ctor}.
43094309
In either case, if the constructor has one or more default arguments,
43104310
the destruction of every temporary created in a default argument is
43114311
sequenced before the construction of the next array element, if any.
@@ -4371,7 +4371,7 @@
43714371
\end{codeblock}
43724372
\end{example}
43734373
\begin{note}
4374-
An explicit type conversion~(\ref{expr.type.conv}, \ref{expr.cast})
4374+
An explicit type conversion\iref{expr.type.conv,expr.cast}
43754375
is interpreted as
43764376
a sequence of elementary casts,
43774377
covered above.
@@ -4430,7 +4430,7 @@
44304430
completion of their construction.
44314431
In addition, the destruction of temporaries bound to references shall
44324432
take into account the ordering of destruction of objects with static, thread, or
4433-
automatic storage duration~(\ref{basic.stc.static}, \ref{basic.stc.thread}, \ref{basic.stc.auto});
4433+
automatic storage duration\iref{basic.stc.static,basic.stc.thread,basic.stc.auto};
44344434
that is, if
44354435
\tcode{obj1}
44364436
is an object with the same storage duration as the temporary and
@@ -5021,8 +5021,8 @@
50215021
is an incomplete type that cannot be completed; such a type has
50225022
an empty set of values. It is used as the return
50235023
type for functions that do not return a value. Any expression can be
5024-
explicitly converted to type \cv{}~\keyword{void}~(\ref{expr.type.conv},
5025-
\ref{expr.static.cast}, \ref{expr.cast}).
5024+
explicitly converted to type
5025+
\cv{}~\keyword{void}\iref{expr.type.conv,expr.static.cast,expr.cast}.
50265026
An expression of type \cv{}~\keyword{void} shall
50275027
be used only as an expression statement\iref{stmt.expr}, as an operand
50285028
of a comma expression\iref{expr.comma}, as a second or third operand
@@ -5035,7 +5035,7 @@
50355035
\pnum
50365036
A value of type \tcode{std::nullptr_t} is a null pointer
50375037
constant\iref{conv.ptr}. Such values participate in the pointer and the
5038-
pointer-to-member conversions~(\ref{conv.ptr}, \ref{conv.mem}).
5038+
pointer-to-member conversions\iref{conv.ptr,conv.mem}.
50395039
\tcode{\keyword{sizeof}(std::nullptr_t)} shall be equal to \tcode{\keyword{sizeof}(\keyword{void}*)}.
50405040

50415041
\pnum
@@ -5165,7 +5165,7 @@
51655165
see \ref{basic.stc}.
51665166
\end{note}
51675167
For purposes of pointer arithmetic\iref{expr.add}
5168-
and comparison~(\ref{expr.rel}, \ref{expr.eq}),
5168+
and comparison\iref{expr.rel,expr.eq},
51695169
a pointer past the end of the last element of
51705170
an array \tcode{x} of $n$ elements
51715171
is considered to be equivalent to
@@ -6325,7 +6325,7 @@
63256325
\indextext{program!startup|(}%
63266326
A program shall contain exactly one function called \tcode{main}
63276327
that belongs to the global scope.
6328-
Executing a program starts a main thread of execution~(\ref{intro.multithread}, \ref{thread.threads})
6328+
Executing a program starts a main thread of execution\iref{intro.multithread,thread.threads}
63296329
in which the \tcode{main} function is invoked.
63306330
\indextext{implementation!freestanding}%
63316331
It is \impldef{defining \tcode{main} in freestanding environment}
@@ -6576,7 +6576,7 @@
65766576
A non-block variable with static storage duration
65776577
having initialization
65786578
with side effects is initialized in this case,
6579-
even if it is not itself odr-used~(\ref{term.odr.use}, \ref{basic.stc.static}).
6579+
even if it is not itself odr-used\iref{term.odr.use,basic.stc.static}.
65806580
\end{footnote}
65816581
It is \impldef{threads and program points at which deferred dynamic initialization is performed}
65826582
in which threads and at which points in the program such deferred dynamic initialization occurs.

0 commit comments

Comments
 (0)