|
139 | 139 | \indextext{linkage}%
|
140 | 140 | A name used in more than one translation unit can potentially
|
141 | 141 | refer to the same entity in these translation units depending on the
|
142 |
| -linkage\iref{basic.link} of the name specified in each |
| 142 | +\link{linkage}{basic.link} of the name specified in each |
143 | 143 | translation unit.
|
144 | 144 |
|
145 | 145 | \rSec1[basic.def]{Declarations and definitions}
|
|
162 | 162 | \item a static assertion\iref{dcl.pre},
|
163 | 163 | \item controlling template instantiation\iref{temp.explicit},
|
164 | 164 | \item guiding template argument deduction for constructors\iref{temp.deduct.guide},
|
165 |
| -\item use of attributes\iref{dcl.attr}, and |
| 165 | +\item use of \link{attributes}{dcl.attr}, and |
166 | 166 | \item nothing (in the case of an \grammarterm{empty-declaration}).
|
167 | 167 | \end{itemize}
|
168 | 168 |
|
|
246 | 246 | \item it is
|
247 | 247 | an explicit instantiation declaration\iref{temp.explicit}, or
|
248 | 248 | \item it is
|
249 |
| -an explicit specialization\iref{temp.expl.spec} whose |
| 249 | +an \link{explicit specialization}{temp.expl.spec} whose |
250 | 250 | \grammarterm{declaration} is not a definition.
|
251 | 251 | \end{itemize}
|
252 | 252 | A declaration is said to be a \defn{definition} of each entity that it defines.
|
|
288 | 288 | default constructor\iref{class.default.ctor},
|
289 | 289 | copy constructor, move constructor\iref{class.copy.ctor},
|
290 | 290 | copy assignment operator, move assignment operator\iref{class.copy.assign},
|
291 |
| -or destructor\iref{class.dtor} member functions. |
| 291 | +or \link{destructor}{class.dtor} member functions. |
292 | 292 | \end{note}
|
293 | 293 | \begin{example}
|
294 | 294 | Given
|
|
372 | 372 | \item If $E$ is an
|
373 | 373 | \grammarterm{id-expression}\iref{expr.prim.id}, the set
|
374 | 374 | contains only $E$.
|
375 |
| -\item If $E$ is a subscripting operation\iref{expr.sub} with |
| 375 | +\item If $E$ is a \link{subscripting}{expr.sub} operation with |
376 | 376 | an array operand, the set contains the potential results of that operand.
|
377 | 377 | \item If $E$ is a class member access
|
378 | 378 | expression\iref{expr.ref} of the form
|
|
382 | 382 | \item If $E$ is a class member access expression
|
383 | 383 | naming a static data member,
|
384 | 384 | the set contains the \grammarterm{id-expression} designating the data member.
|
385 |
| -\item If $E$ is a pointer-to-member |
386 |
| -expression\iref{expr.mptr.oper} of the form |
| 385 | +\item If $E$ is a \link{pointer-to-member expression}{expr.mptr.oper} of the form |
387 | 386 | $E_1$ \tcode{.*} $E_2$,
|
388 | 387 | the set contains the potential results of $E_1$.
|
389 | 388 | \item If $E$ has the form \tcode{($E_1$)}, the set contains the
|
390 | 389 | potential results of $E_1$.
|
391 |
| -\item If $E$ is a glvalue conditional |
392 |
| -expression\iref{expr.cond}, the set is the union of the sets of |
| 390 | +\item If $E$ is a glvalue \link{conditional expression}{expr.cond}, |
| 391 | +the set is the union of the sets of |
393 | 392 | potential results of the second and third operands.
|
394 |
| -\item If $E$ is a comma expression\iref{expr.comma}, the set |
| 393 | +\item If $E$ is a \link{comma expression}{expr.comma}, the set |
395 | 394 | contains the potential results of the right operand.
|
396 | 395 | \item Otherwise, the set is empty.
|
397 | 396 | \end{itemize}
|
|
541 | 540 | copy assignment or move assignment function for another class as specified
|
542 | 541 | in~\ref{class.copy.assign}.
|
543 | 542 | A constructor for a class is odr-used as specified
|
544 |
| -in~\ref{dcl.init}. A destructor for a class is odr-used if it is potentially |
545 |
| -invoked\iref{class.dtor}. |
| 543 | +in~\ref{dcl.init}. A destructor for a class is odr-used if it is |
| 544 | +\deflink{potentially invoked}{class.dtor}. |
546 | 545 |
|
547 | 546 | \pnum
|
548 | 547 | A local entity\iref{basic.pre}
|
|
614 | 613 | \pnum
|
615 | 614 | Every program shall contain at least one definition of every
|
616 | 615 | function or variable that is odr-used in that program
|
617 |
| -outside of a discarded statement\iref{stmt.if}; no diagnostic required. |
| 616 | +outside of a \deflink{discarded statement}{stmt.if}; no diagnostic required. |
618 | 617 | The definition can appear explicitly in the program, it can be found in
|
619 | 618 | the standard or a user-defined library, or (when appropriate) it is
|
620 | 619 | implicitly defined (see~\ref{class.default.ctor}, \ref{class.copy.ctor},
|
|
662 | 661 | describe in which contexts complete class types are required. A class
|
663 | 662 | type \tcode{T} must be complete if
|
664 | 663 | \begin{itemize}
|
665 |
| -\item an object of type \tcode{T} is defined\iref{basic.def}, or |
666 |
| -\item a non-static class data member of type \tcode{T} is |
667 |
| -declared\iref{class.mem}, or |
| 664 | +\item an object of type \tcode{T} is \link{defined}{basic.def}, or |
| 665 | +\item a non-static class \deflink{data member}{class.mem} of |
| 666 | +type \tcode{T} is declared, or |
668 | 667 | \item \tcode{T} is used as the allocated type or array element type in a
|
669 | 668 | \grammarterm{new-expression}\iref{expr.new}, or
|
670 | 669 | \item an lvalue-to-rvalue conversion is applied to
|
|
684 | 683 | \keyword{sizeof} operator\iref{expr.sizeof} is applied to an operand of
|
685 | 684 | type \tcode{T}, or
|
686 | 685 | \item a function with a return type or argument type of type \tcode{T}
|
687 |
| -is defined\iref{basic.def} or called\iref{expr.call}, or |
| 686 | +is defined\iref{basic.def} or \link{called}{expr.call}, or |
688 | 687 | \item a class with a base class of type \tcode{T} is
|
689 | 688 | defined\iref{class.derived}, or
|
690 | 689 | \item an lvalue of type \tcode{T} is assigned to\iref{expr.assign}, or
|
|
730 | 729 | a non-volatile const object with internal or no linkage if the object
|
731 | 730 | \begin{itemize}
|
732 | 731 | \item has the same literal type in all definitions of \tcode{D},
|
733 |
| -\item is initialized with a constant expression\iref{expr.const}, |
| 732 | +\item is initialized with a \link{constant expression}{expr.const}, |
734 | 733 | \item is not odr-used in any definition of \tcode{D}, and
|
735 | 734 | \item has the same value in all definitions of \tcode{D},
|
736 | 735 | \end{itemize}
|
|
2744 | 2743 | \pnum
|
2745 | 2744 | \indextext{program}%
|
2746 | 2745 | \indextext{linking}%
|
2747 |
| -A \defn{program} consists of one or more translation units\iref{lex.separate} |
| 2746 | +A \defn{program} consists of one or more \deflinkx{translation units}{translation unit}{lex.separate} |
2748 | 2747 | linked together. A translation unit consists
|
2749 | 2748 | of a sequence of declarations.
|
2750 | 2749 |
|
|
2777 | 2776 | \indextext{linkage!\idxcode{inline} and}%
|
2778 | 2777 | \indextext{\idxcode{inline}!linkage of}%
|
2779 | 2778 | The name of an entity
|
2780 |
| -that belongs to a namespace scope\iref{basic.scope.namespace} |
| 2779 | +that belongs to a \link{namespace scope}{basic.scope.namespace} |
2781 | 2780 | has internal linkage if it is the name of
|
2782 | 2781 | \begin{itemize}
|
2783 | 2782 | \item
|
|
2818 | 2817 | purposes\iref{dcl.typedef}; or
|
2819 | 2818 | \item
|
2820 | 2819 | \indextext{enumeration!linkage of}%
|
2821 |
| -a named enumeration\iref{dcl.enum}, or an unnamed enumeration defined |
| 2820 | +a named \link{enumeration}{dcl.enum}, or an unnamed enumeration defined |
2822 | 2821 | in a typedef declaration in which the enumeration has the typedef name
|
2823 | 2822 | for linkage purposes\iref{dcl.typedef}; or
|
2824 | 2823 | \item an unnamed enumeration
|
|
2894 | 2893 | \pnum
|
2895 | 2894 | \indextext{linkage!no}%
|
2896 | 2895 | Names not covered by these rules have no linkage. Moreover, except as
|
2897 |
| -noted, a name declared at block scope\iref{basic.scope.block} has no |
| 2896 | +noted, a name declared at \deflinkx{block scope}{scope!block}{basic.scope.block} has no |
2898 | 2897 | linkage.
|
2899 | 2898 |
|
2900 | 2899 | \pnum
|
|
3216 | 3215 | involve additional memory locations that are not accessible to programs but are
|
3217 | 3216 | managed by the implementation.
|
3218 | 3217 | \end{note}
|
3219 |
| -Two or more threads of |
3220 |
| -execution\iref{intro.multithread} can access separate memory |
| 3218 | +Two or more \deflinkx{threads of |
| 3219 | +execution}{thread of execution}{intro.multithread} can access separate memory |
3221 | 3220 | locations without interfering with each other.
|
3222 | 3221 |
|
3223 | 3222 | \pnum
|
|
3261 | 3260 | The constructs in a \Cpp{} program create, destroy, refer to, access, and
|
3262 | 3261 | manipulate objects.
|
3263 | 3262 | An \defn{object} is created
|
3264 |
| -by a definition\iref{basic.def}, |
| 3263 | +by a \link{definition}{basic.def}, |
3265 | 3264 | by a \grammarterm{new-expression}\iref{expr.new},
|
3266 | 3265 | by an operation that implicitly creates objects (see below),
|
3267 |
| -when implicitly changing the active member of a union\iref{class.union}, |
| 3266 | +when implicitly changing the active member of a \link{union}{class.union}, |
3268 | 3267 | or
|
3269 | 3268 | when a temporary object is created\iref{conv.rval,class.temporary}.
|
3270 | 3269 | An object occupies a region of storage
|
3271 | 3270 | in its period of construction\iref{class.cdtor},
|
3272 |
| -throughout its lifetime\iref{basic.life}, |
| 3271 | +throughout its \link{lifetime}{basic.life}, |
3273 | 3272 | and
|
3274 | 3273 | in its period of destruction\iref{class.cdtor}.
|
3275 | 3274 | \begin{note}
|
|
3399 | 3398 | \begin{itemize}
|
3400 | 3399 | \item a base class subobject, or
|
3401 | 3400 | \item a non-static data member
|
3402 |
| -declared with the \tcode{no_unique_address} attribute\iref{dcl.attr.nouniqueaddr}. |
| 3401 | +declared with the \link{\tcode{no_unique_address}}{dcl.attr.nouniqueaddr} attribute. |
3403 | 3402 | \end{itemize}
|
3404 | 3403 |
|
3405 | 3404 | \pnum
|
|
3420 | 3419 | are \impldef{which non-standard-layout objects
|
3421 | 3420 | containing no data are considered empty}.
|
3422 | 3421 | \indextext{most derived object!bit-field}%
|
3423 |
| -Unless it is a bit-field\iref{class.bit}, |
| 3422 | +Unless it is a \link{bit-field}{class.bit}, |
3424 | 3423 | an object with nonzero size
|
3425 | 3424 | shall occupy one or more bytes of storage,
|
3426 | 3425 | including every byte that is occupied in full or in part
|
|
3985 | 3984 | is produced by the evaluation of:
|
3986 | 3985 | \begin{itemize}
|
3987 | 3986 | \item
|
3988 |
| - the second or third operand of a conditional expression\iref{expr.cond}, |
| 3987 | + the second or third operand of a \link{conditional expression}{expr.cond}, |
3989 | 3988 | \item
|
3990 |
| - the right operand of a comma expression\iref{expr.comma}, |
| 3989 | + the right operand of a \link{comma expression}{expr.comma}, |
3991 | 3990 | \item
|
3992 | 3991 | the operand of a cast or conversion\iref{conv.integral,
|
3993 | 3992 | expr.type.conv,expr.static.cast,expr.cast}
|
3994 | 3993 | to an unsigned ordinary character type
|
3995 | 3994 | or \tcode{std::byte} type\iref{cstddef.syn}, or
|
3996 | 3995 | \item
|
3997 |
| - a discarded-value expression\iref{expr.context}, |
| 3996 | + a \deflink{discarded-value expression}{expr.context}, |
3998 | 3997 | \end{itemize}
|
3999 | 3998 | then the result of the operation is an indeterminate value or
|
4000 | 3999 | that erroneous value, respectively.
|
|
4185 | 4184 | \indextext{storage duration!dynamic|(}
|
4186 | 4185 |
|
4187 | 4186 | \pnum
|
4188 |
| -Objects can be created dynamically during program |
4189 |
| -execution\iref{intro.execution}, using |
| 4187 | +Objects can be created dynamically during \link{program |
| 4188 | +execution}{intro.execution}, using |
4190 | 4189 | \indextext{\idxcode{new}}%
|
4191 | 4190 | \grammarterm{new-expression}{s}\iref{expr.new}, and destroyed using
|
4192 | 4191 | \indextext{\idxcode{delete}}%
|
|
4350 | 4349 | \tcode{std::bad_alloc}\iref{bad.alloc}.
|
4351 | 4350 |
|
4352 | 4351 | \pnum
|
4353 |
| -A global allocation function is only called as the result of a new |
4354 |
| -expression\iref{expr.new}, or called directly using the function call |
4355 |
| -syntax\iref{expr.call}, or called indirectly to allocate storage for |
| 4352 | +A global allocation function is only called as the result of a \link{new |
| 4353 | +expression}{expr.new}, or called directly using the \link{function call}{expr.call} |
| 4354 | +syntax, or called indirectly to allocate storage for |
4356 | 4355 | a coroutine state\iref{dcl.fct.def.coroutine},
|
4357 | 4356 | or called indirectly through calls to the
|
4358 | 4357 | functions in the \Cpp{} standard library.
|
|
4848 | 4847 | impose requirements on implementations regarding the representation
|
4849 | 4848 | of types.
|
4850 | 4849 | There are two kinds of types: fundamental types and compound types.
|
4851 |
| -Types describe objects\iref{intro.object}, |
4852 |
| -references\iref{dcl.ref}, |
4853 |
| -or functions\iref{dcl.fct}. |
| 4850 | +Types describe \link{objects}{intro.object}, |
| 4851 | +\link{references}{dcl.ref}, |
| 4852 | +or \link{functions}{dcl.fct}. |
4854 | 4853 | \end{note}
|
4855 | 4854 |
|
4856 | 4855 | \pnum
|
|
5024 | 5023 | pointer types, pointer-to-member types\iref{basic.compound},
|
5025 | 5024 | \tcode{std::nullptr_t},
|
5026 | 5025 | and
|
5027 |
| -cv-qualified\iref{basic.type.qualifier} versions of these |
| 5026 | +\link{cv-qualified}{basic.type.qualifier} versions of these |
5028 | 5027 | types are collectively called
|
5029 | 5028 | \defnadjx{scalar}{types}{type}.
|
5030 | 5029 | \label{term.trivially.copyable.type}%
|
|
5057 | 5056 | \item a scalar type; or
|
5058 | 5057 | \item a reference type; or
|
5059 | 5058 | \item an array of literal type; or
|
5060 |
| -\item a possibly cv-qualified class type\iref{class} that |
| 5059 | +\item a possibly cv-qualified \link{class type}{class} that |
5061 | 5060 | has all of the following properties:
|
5062 | 5061 | \begin{itemize}
|
5063 | 5062 | \item it has a constexpr destructor\iref{dcl.constexpr},
|
|
5091 | 5090 | Two types \cvqual{cv1} \tcode{T1} and \cvqual{cv2} \tcode{T2} are
|
5092 | 5091 | \defnadjx{layout-compatible}{types}{type}
|
5093 | 5092 | if \tcode{T1} and \tcode{T2} are the same type,
|
5094 |
| -layout-compatible enumerations\iref{dcl.enum}, or |
5095 |
| -layout-compatible standard-layout class types\iref{class.mem}. |
| 5093 | +\deflinkx{layout-compatible enumerations}{layout-compatible!enumeration}{dcl.enum}, or |
| 5094 | +\deflinkx{layout-compatible standard-layout class types}{layout-compatible!class}{class.mem}. |
5096 | 5095 |
|
5097 | 5096 | \rSec2[basic.fundamental]{Fundamental types}
|
5098 | 5097 |
|
|
5540 | 5539 | which identify members of a given
|
5541 | 5540 | type within objects of a given class, \ref{dcl.mptr}.
|
5542 | 5541 | Pointers to data members and pointers to member functions are collectively
|
5543 |
| -called \term{pointer-to-member} types. |
| 5542 | +called \defn{pointer-to-member} types. |
5544 | 5543 | \end{itemize}
|
5545 | 5544 |
|
5546 | 5545 | \pnum
|
|
5618 | 5617 | have the same value representation and alignment
|
5619 | 5618 | requirements\iref{basic.align}.
|
5620 | 5619 | \begin{note}
|
5621 |
| -Pointers to over-aligned types\iref{basic.align} have no special |
| 5620 | +Pointers to \deflinkx{over-aligned types}{type!over-aligned}{basic.align} have no special |
5622 | 5621 | representation, but their range of valid values is restricted by the extended
|
5623 | 5622 | alignment requirement.
|
5624 | 5623 | \end{note}
|
|
5933 | 5932 | \indextext{program execution|(}
|
5934 | 5933 |
|
5935 | 5934 | \pnum
|
5936 |
| -An instance of each object with automatic storage |
5937 |
| -duration\iref{basic.stc.auto} is associated with each entry into its |
| 5935 | +An instance of each object with \link{automatic storage |
| 5936 | +duration}{basic.stc.auto} is associated with each entry into its |
5938 | 5937 | block. Such an object exists and retains its last-stored value during
|
5939 | 5938 | the execution of the block and while the block is suspended (by a call
|
5940 | 5939 | of a function, suspension of a coroutine\iref{expr.await}, or receipt of a signal).
|
|
5979 | 5978 | the initialization of the entities captured by copy and
|
5980 | 5979 | the constituent expressions of the \grammarterm{initializer} of the \grammarterm{init-capture}{s},
|
5981 | 5980 | \item
|
5982 |
| -if $E$ is a function call\iref{expr.call} or implicitly invokes a function, |
| 5981 | +if $E$ is a \link{function call}{expr.call} or implicitly invokes a function, |
5983 | 5982 | the constituent expressions of each default argument\iref{dcl.fct.default}
|
5984 | 5983 | used in the call, or
|
5985 | 5984 | \item
|
|
6010 | 6009 | A \defn{full-expression} is
|
6011 | 6010 | \begin{itemize}
|
6012 | 6011 | \item
|
6013 |
| -an unevaluated operand\iref{expr.context}, |
| 6012 | +an \deflink{unevaluated operand}{expr.context}, |
6014 | 6013 | \item
|
6015 | 6014 | a \grammarterm{constant-expression}\iref{expr.const},
|
6016 | 6015 | \item
|
|
0 commit comments