|
50 | 50 | \item
|
51 | 51 | \grammarterm{declaration},
|
52 | 52 | \grammarterm{block-declaration}, or
|
53 |
| -\grammarterm{member-declaration} (\ref{dcl.pre}, \ref{class.mem}), |
| 53 | +\grammarterm{member-declaration}\iref{dcl.pre,class.mem}, |
54 | 54 | \item
|
55 | 55 | \grammarterm{init-declarator}\iref{dcl.decl},
|
56 | 56 | \item
|
|
178 | 178 | \item
|
179 | 179 | \indextext{declaration!static member@\tcode{static} member}%
|
180 | 180 | 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}, |
182 | 182 | \item
|
183 | 183 | it declares a static data member outside a class definition
|
184 | 184 | and the variable was defined within the class with the \keyword{constexpr}
|
|
404 | 404 | \item
|
405 | 405 | A function is named by an expression or conversion
|
406 | 406 | 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} |
408 | 408 | in an overload resolution performed
|
409 | 409 | as part of forming that expression or conversion,
|
410 | 410 | unless it is a pure virtual function and either
|
|
413 | 413 | the expression forms a pointer to member\iref{expr.unary.op}.
|
414 | 414 | \begin{note}
|
415 | 415 | 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}, |
417 | 417 | calls to named functions\iref{expr.call},
|
418 | 418 | operator overloading\iref{over},
|
419 | 419 | user-defined conversions\iref{class.conv.fct},
|
|
597 | 597 | a glvalue referring
|
598 | 598 | to an object of type \tcode{T}\iref{conv.lval}, or
|
599 | 599 | \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 |
602 | 602 | \item an expression that is not a null pointer constant, and has type
|
603 | 603 | other than \cv{}~\tcode{\keyword{void}*}, is converted to the type pointer to \tcode{T}
|
604 | 604 | or reference to \tcode{T} using a standard conversion\iref{conv},
|
|
690 | 690 | is subject to the requirements described in this paragraph (recursively).
|
691 | 691 |
|
692 | 692 | \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}, |
694 | 694 | it is as if the constructor was
|
695 | 695 | implicitly defined in every translation unit where it is odr-used, and the
|
696 | 696 | implicit definition in every translation unit shall call the same
|
|
1190 | 1190 | Each
|
1191 | 1191 | \begin{itemize}
|
1192 | 1192 | \item
|
1193 |
| -selection or iteration statement (\ref{stmt.select}, \ref{stmt.iter}), |
| 1193 | +selection or iteration statement\iref{stmt.select,stmt.iter}, |
1194 | 1194 | \item
|
1195 | 1195 | substatement of such a statement,
|
1196 | 1196 | \item
|
|
1400 | 1400 | if the declarations found by name lookup do not all denote the same entity,
|
1401 | 1401 | \indextext{lookup!ambiguous}%
|
1402 | 1402 | 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} |
1404 | 1404 | takes place after name lookup has succeeded. The access rules\iref{class.access}
|
1405 | 1405 | are considered only once name lookup and
|
1406 | 1406 | function overload resolution (if applicable) have succeeded. Only after
|
|
1698 | 1698 | \begin{note}
|
1699 | 1699 | Even if the result of name lookup is unambiguous, use of a name found in
|
1700 | 1700 | 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}. |
1702 | 1702 | \end{note}
|
1703 | 1703 | \begin{example}
|
1704 | 1704 | \begin{codeblock}
|
|
2025 | 2025 | have the same innermost enclosing non-inline namespace scope as
|
2026 | 2026 | a declaration of an associated entity attached to \tcode{M}\iref{basic.link}.
|
2027 | 2027 | \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}, |
2029 | 2029 | the above lookup is also performed
|
2030 | 2030 | from each point in the instantiation context\iref{module.context} of the lookup,
|
2031 | 2031 | additionally ignoring any declaration that
|
|
2703 | 2703 | \pnum
|
2704 | 2704 | Two declarations of entities declare the same entity
|
2705 | 2705 | 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}, |
2707 | 2707 | they correspond\iref{basic.scope.scope},
|
2708 | 2708 | have the same target scope that is not a function or template parameter scope,
|
2709 | 2709 | and either
|
|
2716 | 2716 | they both declare names with external linkage.
|
2717 | 2717 | \end{itemize}
|
2718 | 2718 | \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}. |
2721 | 2721 | \end{note}
|
2722 | 2722 |
|
2723 | 2723 | \pnum
|
|
3072 | 3072 | by an operation that implicitly creates objects (see below),
|
3073 | 3073 | when implicitly changing the active member of a union\iref{class.union},
|
3074 | 3074 | 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}. |
3076 | 3076 | An object occupies a region of storage
|
3077 | 3077 | in its period of construction\iref{class.cdtor},
|
3078 | 3078 | throughout its lifetime\iref{basic.life},
|
|
3327 | 3327 | implicitly creates objects in the returned region of storage and
|
3328 | 3328 | returns a pointer to a suitable created object.
|
3329 | 3329 | \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}. |
3332 | 3332 | \end{note}
|
3333 | 3333 | \indextext{object model|)}
|
3334 | 3334 |
|
|
3351 | 3351 | \end{itemize}
|
3352 | 3352 | except that if the object is a union member or subobject thereof,
|
3353 | 3353 | 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}, |
3355 | 3355 | or as described in \ref{class.union} and \ref{class.copy.ctor},
|
3356 | 3356 | and except as described in \ref{allocator.members}.
|
3357 | 3357 | The lifetime of an object \placeholder{o} of type \tcode{T} ends when:
|
|
3639 | 3639 | \item
|
3640 | 3640 | the right operand of a comma expression\iref{expr.comma},
|
3641 | 3641 | \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} |
3644 | 3644 | to an unsigned ordinary character type
|
3645 | 3645 | or \tcode{std::byte} type\iref{cstddef.syn}, or
|
3646 | 3646 | \item
|
|
3743 | 3743 | \end{itemize}
|
3744 | 3744 | have \defn{static storage duration}.
|
3745 | 3745 | 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}. |
3747 | 3747 |
|
3748 | 3748 | \pnum
|
3749 | 3749 | If a variable with static storage duration has initialization or a
|
|
4067 | 4067 | \rSec2[basic.align]{Alignment}
|
4068 | 4068 |
|
4069 | 4069 | \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} |
4071 | 4071 | which place restrictions on the addresses at which an object of that type
|
4072 | 4072 | may be allocated. An \defn{alignment} is an \impldef{alignment}
|
4073 | 4073 | integer value representing the number of bytes between successive addresses
|
|
4195 | 4195 | Temporary objects are materialized:
|
4196 | 4196 | \begin{itemize}
|
4197 | 4197 | \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}, |
4200 | 4200 | \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}, |
4202 | 4202 | \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}, |
4204 | 4204 | \item
|
4205 | 4205 | when initializing an object of type \tcode{std::initializer_list<T>} from a \grammarterm{braced-init-list}\iref{dcl.init.list},
|
4206 | 4206 | \item
|
4207 |
| -for certain unevaluated operands~(\ref{expr.typeid}, \ref{expr.sizeof}), and |
| 4207 | +for certain unevaluated operands\iref{expr.typeid,expr.sizeof}, and |
4208 | 4208 | \item
|
4209 | 4209 | when a prvalue that has type other than \cv{}~\keyword{void} appears as a discarded-value expression\iref{expr.context}.
|
4210 | 4210 | \end{itemize}
|
|
4279 | 4279 | \indextext{temporary!destructor for}%
|
4280 | 4280 | \indextext{temporary!destruction of}%
|
4281 | 4281 | 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}, |
4283 | 4283 | it shall ensure that a constructor is called for the temporary object.
|
4284 | 4284 | Similarly, the destructor shall be called for a temporary with a non-trivial
|
4285 | 4285 | destructor\iref{class.dtor}.
|
|
4305 | 4305 | The first context is when a default constructor is called to initialize
|
4306 | 4306 | an element of an array with no corresponding initializer\iref{dcl.init}.
|
4307 | 4307 | 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}. |
4309 | 4309 | In either case, if the constructor has one or more default arguments,
|
4310 | 4310 | the destruction of every temporary created in a default argument is
|
4311 | 4311 | sequenced before the construction of the next array element, if any.
|
|
4371 | 4371 | \end{codeblock}
|
4372 | 4372 | \end{example}
|
4373 | 4373 | \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} |
4375 | 4375 | is interpreted as
|
4376 | 4376 | a sequence of elementary casts,
|
4377 | 4377 | covered above.
|
|
4430 | 4430 | completion of their construction.
|
4431 | 4431 | In addition, the destruction of temporaries bound to references shall
|
4432 | 4432 | 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}; |
4434 | 4434 | that is, if
|
4435 | 4435 | \tcode{obj1}
|
4436 | 4436 | is an object with the same storage duration as the temporary and
|
|
5021 | 5021 | is an incomplete type that cannot be completed; such a type has
|
5022 | 5022 | an empty set of values. It is used as the return
|
5023 | 5023 | 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}. |
5026 | 5026 | An expression of type \cv{}~\keyword{void} shall
|
5027 | 5027 | be used only as an expression statement\iref{stmt.expr}, as an operand
|
5028 | 5028 | of a comma expression\iref{expr.comma}, as a second or third operand
|
|
5035 | 5035 | \pnum
|
5036 | 5036 | A value of type \tcode{std::nullptr_t} is a null pointer
|
5037 | 5037 | 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}. |
5039 | 5039 | \tcode{\keyword{sizeof}(std::nullptr_t)} shall be equal to \tcode{\keyword{sizeof}(\keyword{void}*)}.
|
5040 | 5040 |
|
5041 | 5041 | \pnum
|
|
5165 | 5165 | see \ref{basic.stc}.
|
5166 | 5166 | \end{note}
|
5167 | 5167 | 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}, |
5169 | 5169 | a pointer past the end of the last element of
|
5170 | 5170 | an array \tcode{x} of $n$ elements
|
5171 | 5171 | is considered to be equivalent to
|
|
6325 | 6325 | \indextext{program!startup|(}%
|
6326 | 6326 | A program shall contain exactly one function called \tcode{main}
|
6327 | 6327 | 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} |
6329 | 6329 | in which the \tcode{main} function is invoked.
|
6330 | 6330 | \indextext{implementation!freestanding}%
|
6331 | 6331 | It is \impldef{defining \tcode{main} in freestanding environment}
|
|
6576 | 6576 | A non-block variable with static storage duration
|
6577 | 6577 | having initialization
|
6578 | 6578 | 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}. |
6580 | 6580 | \end{footnote}
|
6581 | 6581 | It is \impldef{threads and program points at which deferred dynamic initialization is performed}
|
6582 | 6582 | in which threads and at which points in the program such deferred dynamic initialization occurs.
|
|
0 commit comments