|
162 | 162 | \indextext{linkage}% |
163 | 163 | A name used in more than one translation unit can potentially |
164 | 164 | refer to the same entity in these translation units depending on the |
165 | | -linkage\iref{basic.link} of the name specified in each |
| 165 | +\link{linkage}{basic.link} of the name specified in each |
166 | 166 | translation unit. |
167 | 167 |
|
168 | 168 | \rSec1[basic.def]{Declarations and definitions} |
|
187 | 187 | \item a static assertion\iref{dcl.pre}, |
188 | 188 | \item controlling template instantiation\iref{temp.explicit}, |
189 | 189 | \item guiding template argument deduction for constructors\iref{temp.deduct.guide}, |
190 | | -\item use of attributes\iref{dcl.attr}, and |
| 190 | +\item use of \link{attributes}{dcl.attr}, and |
191 | 191 | \item nothing (in the case of an \grammarterm{empty-declaration}). |
192 | 192 | \end{itemize} |
193 | 193 | \end{note} |
|
274 | 274 | \item it is |
275 | 275 | an explicit instantiation declaration\iref{temp.explicit}, or |
276 | 276 | \item it is |
277 | | -an explicit specialization\iref{temp.expl.spec} whose |
| 277 | +an \link{explicit specialization}{temp.expl.spec} whose |
278 | 278 | \grammarterm{declaration} is not a definition. |
279 | 279 | \end{itemize} |
280 | 280 | A declaration is said to be a \defn{definition} of each entity that it defines. |
|
316 | 316 | default constructor\iref{class.default.ctor}, |
317 | 317 | copy constructor, move constructor\iref{class.copy.ctor}, |
318 | 318 | copy assignment operator, move assignment operator\iref{class.copy.assign}, |
319 | | -or destructor\iref{class.dtor} member functions. |
| 319 | +or \link{destructor}{class.dtor} member functions. |
320 | 320 | \end{note} |
321 | 321 | \begin{example} |
322 | 322 | Given |
|
401 | 401 | an \grammarterm{id-expression}\iref{expr.prim.id} or |
402 | 402 | a \grammarterm{splice-expression}\iref{expr.prim.splice}, the set |
403 | 403 | contains only $E$. |
404 | | -\item If $E$ is a subscripting operation\iref{expr.sub} with |
| 404 | +\item If $E$ is a \link{subscripting}{expr.sub} operation with |
405 | 405 | an array operand, the set contains the potential results of that operand. |
406 | 406 | \item If $E$ is a class member access |
407 | 407 | expression\iref{expr.ref} of the form |
|
412 | 412 | \item If $E$ is a class member access expression |
413 | 413 | naming a static data member, |
414 | 414 | the set contains the \grammarterm{id-expression} designating the data member. |
415 | | -\item If $E$ is a pointer-to-member |
416 | | -expression\iref{expr.mptr.oper} of the form |
| 415 | +\item If $E$ is a \link{pointer-to-member expression}{expr.mptr.oper} of the form |
417 | 416 | $E_1$ \tcode{.*} $E_2$, |
418 | 417 | the set contains the potential results of $E_1$. |
419 | 418 | \item If $E$ has the form \tcode{($E_1$)}, the set contains the |
420 | 419 | potential results of $E_1$. |
421 | | -\item If $E$ is a glvalue conditional |
422 | | -expression\iref{expr.cond}, the set is the union of the sets of |
| 420 | +\item If $E$ is a glvalue \link{conditional expression}{expr.cond}, |
| 421 | +the set is the union of the sets of |
423 | 422 | potential results of the second and third operands. |
424 | | -\item If $E$ is a comma expression\iref{expr.comma}, the set |
| 423 | +\item If $E$ is a \link{comma expression}{expr.comma}, the set |
425 | 424 | contains the potential results of the right operand. |
426 | 425 | \item Otherwise, the set is empty. |
427 | 426 | \end{itemize} |
|
583 | 582 | copy assignment or move assignment function for another class as specified |
584 | 583 | in~\ref{class.copy.assign}. |
585 | 584 | A constructor for a class is odr-used as specified |
586 | | -in~\ref{dcl.init}. A destructor for a class is odr-used if it is potentially |
587 | | -invoked\iref{class.dtor}. |
| 585 | +in~\ref{dcl.init}. A destructor for a class is odr-used if it is |
| 586 | +\deflink{potentially invoked}{class.dtor}. |
588 | 587 |
|
589 | 588 | \pnum |
590 | 589 | A local entity\iref{basic.pre} |
|
656 | 655 | \pnum |
657 | 656 | Every program shall contain at least one definition of every |
658 | 657 | function or variable that is odr-used in that program |
659 | | -outside of a discarded statement\iref{stmt.if}; no diagnostic required. |
| 658 | +outside of a \deflink{discarded statement}{stmt.if}; no diagnostic required. |
660 | 659 | The definition can appear explicitly in the program, it can be found in |
661 | 660 | the standard or a user-defined library, or (when appropriate) it is |
662 | 661 | implicitly defined (see~\ref{class.default.ctor}, \ref{class.copy.ctor}, |
|
704 | 703 | describe in which contexts complete class types are required. A class |
705 | 704 | type \tcode{T} must be complete if |
706 | 705 | \begin{itemize} |
707 | | -\item an object of type \tcode{T} is defined\iref{basic.def}, or |
708 | | -\item a non-static class data member of type \tcode{T} is |
709 | | -declared\iref{class.mem}, or |
| 706 | +\item an object of type \tcode{T} is \link{defined}{basic.def}, or |
| 707 | +\item a non-static class \deflink{data member}{class.mem} of |
| 708 | +type \tcode{T} is declared, or |
710 | 709 | \item \tcode{T} is used as the allocated type or array element type in a |
711 | 710 | \grammarterm{new-expression}\iref{expr.new}, or |
712 | 711 | \item an lvalue-to-rvalue conversion is applied to |
|
726 | 725 | \keyword{sizeof} operator\iref{expr.sizeof} is applied to an operand of |
727 | 726 | type \tcode{T}, or |
728 | 727 | \item a function with a return type or argument type of type \tcode{T} |
729 | | -is defined\iref{basic.def} or called\iref{expr.call}, or |
| 728 | +is defined\iref{basic.def} or \link{called}{expr.call}, or |
730 | 729 | \item a class with a base class of type \tcode{T} is |
731 | 730 | defined\iref{class.derived}, or |
732 | 731 | \item an lvalue of type \tcode{T} is assigned to\iref{expr.assign}, or |
|
781 | 780 | a non-volatile const object with internal or no linkage if the object |
782 | 781 | \begin{itemize} |
783 | 782 | \item has the same literal type in all definitions of \tcode{D}, |
784 | | -\item is initialized with a constant expression\iref{expr.const}, |
| 783 | +\item is initialized with a \link{constant expression}{expr.const}, |
785 | 784 | \item is not odr-used in any definition of \tcode{D}, and |
786 | 785 | \item has the same value in all definitions of \tcode{D}, |
787 | 786 | \end{itemize} |
|
2921 | 2920 | \indextext{linkage!\idxcode{inline} and}% |
2922 | 2921 | \indextext{\idxcode{inline}!linkage of}% |
2923 | 2922 | The name of an entity |
2924 | | -that belongs to a namespace scope\iref{basic.scope.namespace} |
| 2923 | +that belongs to a \link{namespace scope}{basic.scope.namespace} |
2925 | 2924 | has internal linkage if it is the name of |
2926 | 2925 | \begin{itemize} |
2927 | 2926 | \item |
|
2962 | 2961 | purposes\iref{dcl.typedef}; or |
2963 | 2962 | \item |
2964 | 2963 | \indextext{enumeration!linkage of}% |
2965 | | -a named enumeration\iref{dcl.enum}, or an unnamed enumeration defined |
| 2964 | +a named \link{enumeration}{dcl.enum}, or an unnamed enumeration defined |
2966 | 2965 | in a typedef declaration in which the enumeration has the typedef name |
2967 | 2966 | for linkage purposes\iref{dcl.typedef}; or |
2968 | 2967 | \item an unnamed enumeration |
|
3038 | 3037 | \pnum |
3039 | 3038 | \indextext{linkage!no}% |
3040 | 3039 | Names not covered by these rules have no linkage. Moreover, except as |
3041 | | -noted, a name declared at block scope\iref{basic.scope.block} has no |
| 3040 | +noted, a name declared at \deflinkx{block scope}{scope!block}{basic.scope.block} has no |
3042 | 3041 | linkage. |
3043 | 3042 |
|
3044 | 3043 | \pnum |
|
3397 | 3396 | involve additional memory locations that are not accessible to programs but are |
3398 | 3397 | managed by the implementation. |
3399 | 3398 | \end{note} |
3400 | | -Two or more threads of |
3401 | | -execution\iref{intro.multithread} can access separate memory |
| 3399 | +Two or more \deflinkx{threads of |
| 3400 | +execution}{thread of execution}{intro.multithread} can access separate memory |
3402 | 3401 | locations without interfering with each other. |
3403 | 3402 |
|
3404 | 3403 | \pnum |
|
3442 | 3441 | The constructs in a \Cpp{} program create, destroy, refer to, access, and |
3443 | 3442 | manipulate objects. |
3444 | 3443 | An \defn{object} is created |
3445 | | -by a definition\iref{basic.def}, |
| 3444 | +by a \link{definition}{basic.def}, |
3446 | 3445 | by a \grammarterm{new-expression}\iref{expr.new}, |
3447 | 3446 | by an operation that implicitly creates objects (see below), |
3448 | | -when implicitly changing the active member of a union\iref{class.union}, |
| 3447 | +when implicitly changing the active member of a \link{union}{class.union}, |
3449 | 3448 | or |
3450 | 3449 | when a temporary object is created\iref{conv.rval,class.temporary}. |
3451 | 3450 | An object occupies a region of storage |
3452 | 3451 | in its period of construction\iref{class.cdtor}, |
3453 | | -throughout its lifetime\iref{basic.life}, |
| 3452 | +throughout its \link{lifetime}{basic.life}, |
3454 | 3453 | and |
3455 | 3454 | in its period of destruction\iref{class.cdtor}. |
3456 | 3455 | \begin{note} |
|
3584 | 3583 | \begin{itemize} |
3585 | 3584 | \item a base class subobject, or |
3586 | 3585 | \item a non-static data member |
3587 | | -declared with the \tcode{no_unique_address} attribute\iref{dcl.attr.nouniqueaddr}. |
| 3586 | +declared with the \link{\tcode{no_unique_address}}{dcl.attr.nouniqueaddr} attribute. |
3588 | 3587 | \end{itemize} |
3589 | 3588 |
|
3590 | 3589 | \pnum |
|
3605 | 3604 | are \impldef{which non-standard-layout objects |
3606 | 3605 | containing no data are considered empty}. |
3607 | 3606 | \indextext{most derived object!bit-field}% |
3608 | | -Unless it is a bit-field\iref{class.bit}, |
| 3607 | +Unless it is a \link{bit-field}{class.bit}, |
3609 | 3608 | an object with nonzero size |
3610 | 3609 | shall occupy one or more bytes of storage, |
3611 | 3610 | including every byte that is occupied in full or in part |
|
4198 | 4197 | is produced by the evaluation of: |
4199 | 4198 | \begin{itemize} |
4200 | 4199 | \item |
4201 | | - the second or third operand of a conditional expression\iref{expr.cond}, |
| 4200 | + the second or third operand of a \link{conditional expression}{expr.cond}, |
4202 | 4201 | \item |
4203 | | - the right operand of a comma expression\iref{expr.comma}, |
| 4202 | + the right operand of a \link{comma expression}{expr.comma}, |
4204 | 4203 | \item |
4205 | 4204 | the operand of a cast or conversion\iref{conv.integral, |
4206 | 4205 | expr.type.conv,expr.static.cast,expr.cast} |
4207 | 4206 | to an unsigned ordinary character type |
4208 | 4207 | or \tcode{std::byte} type\iref{cstddef.syn}, or |
4209 | 4208 | \item |
4210 | | - a discarded-value expression\iref{expr.context}, |
| 4209 | + a \deflink{discarded-value expression}{expr.context}, |
4211 | 4210 | \end{itemize} |
4212 | 4211 | then the result of the operation is an indeterminate value or |
4213 | 4212 | that erroneous value, respectively. |
|
4398 | 4397 | \indextext{storage duration!dynamic|(} |
4399 | 4398 |
|
4400 | 4399 | \pnum |
4401 | | -Objects can be created dynamically during program |
4402 | | -execution\iref{intro.execution}, using |
| 4400 | +Objects can be created dynamically during \link{program |
| 4401 | +execution}{intro.execution}, using |
4403 | 4402 | \indextext{\idxcode{new}}% |
4404 | 4403 | \grammarterm{new-expression}{s}\iref{expr.new}, and destroyed using |
4405 | 4404 | \indextext{\idxcode{delete}}% |
|
4563 | 4562 | \tcode{std::bad_alloc}\iref{bad.alloc}. |
4564 | 4563 |
|
4565 | 4564 | \pnum |
4566 | | -A global allocation function is only called as the result of a new |
4567 | | -expression\iref{expr.new}, or called directly using the function call |
4568 | | -syntax\iref{expr.call}, or called indirectly to allocate storage for |
| 4565 | +A global allocation function is only called as the result of a \link{new |
| 4566 | +expression}{expr.new}, or called directly using the \link{function call}{expr.call} |
| 4567 | +syntax, or called indirectly to allocate storage for |
4569 | 4568 | a coroutine state\iref{dcl.fct.def.coroutine}, |
4570 | 4569 | or called indirectly through calls to the |
4571 | 4570 | functions in the \Cpp{} standard library. |
|
5090 | 5089 | impose requirements on implementations regarding the representation |
5091 | 5090 | of types. |
5092 | 5091 | There are two kinds of types: fundamental types and compound types. |
5093 | | -Types describe objects\iref{intro.object}, |
5094 | | -references\iref{dcl.ref}, |
5095 | | -or functions\iref{dcl.fct}. |
| 5092 | +Types describe \link{objects}{intro.object}, |
| 5093 | +\link{references}{dcl.ref}, |
| 5094 | +or \link{functions}{dcl.fct}. |
5096 | 5095 | \end{note} |
5097 | 5096 |
|
5098 | 5097 | \pnum |
|
5266 | 5265 | pointer types, pointer-to-member types\iref{basic.compound}, |
5267 | 5266 | \tcode{std::meta::\brk{}info}, \tcode{std::nullptr_t}, |
5268 | 5267 | and |
5269 | | -cv-qualified\iref{basic.type.qualifier} versions of these |
| 5268 | +\link{cv-qualified}{basic.type.qualifier} versions of these |
5270 | 5269 | types are collectively called |
5271 | 5270 | \defnadjx{scalar}{types}{type}. |
5272 | 5271 | \label{term.trivially.copyable.type}% |
|
5291 | 5290 | \item a scalar type; or |
5292 | 5291 | \item a reference type; or |
5293 | 5292 | \item an array of literal type; or |
5294 | | -\item a possibly cv-qualified class type\iref{class} that |
| 5293 | +\item a possibly cv-qualified \link{class type}{class} that |
5295 | 5294 | has all of the following properties: |
5296 | 5295 | \begin{itemize} |
5297 | 5296 | \item it has a constexpr destructor\iref{dcl.constexpr}, |
|
5325 | 5324 | Two types \cvqual{cv1} \tcode{T1} and \cvqual{cv2} \tcode{T2} are |
5326 | 5325 | \defnadjx{layout-compatible}{types}{type} |
5327 | 5326 | if \tcode{T1} and \tcode{T2} are the same type, |
5328 | | -layout-compatible enumerations\iref{dcl.enum}, or |
5329 | | -layout-compatible standard-layout class types\iref{class.mem}. |
| 5327 | +\deflinkx{layout-compatible enumerations}{layout-compatible!enumeration}{dcl.enum}, or |
| 5328 | +\deflinkx{layout-compatible standard-layout class types}{layout-compatible!class}{class.mem}. |
5330 | 5329 |
|
5331 | 5330 | \pnum |
5332 | 5331 | A type is \defn{consteval-only} if it is |
|
5896 | 5895 | which identify members of a given |
5897 | 5896 | type within objects of a given class, \ref{dcl.mptr}. |
5898 | 5897 | Pointers to data members and pointers to member functions are collectively |
5899 | | -called \term{pointer-to-member} types. |
| 5898 | +called \defn{pointer-to-member} types. |
5900 | 5899 | \end{itemize} |
5901 | 5900 |
|
5902 | 5901 | \pnum |
|
5974 | 5973 | have the same value representation and alignment |
5975 | 5974 | requirements\iref{basic.align}. |
5976 | 5975 | \begin{note} |
5977 | | -Pointers to over-aligned types\iref{basic.align} have no special |
| 5976 | +Pointers to \deflinkx{over-aligned types}{type!over-aligned}{basic.align} have no special |
5978 | 5977 | representation, but their range of valid values is restricted by the extended |
5979 | 5978 | alignment requirement. |
5980 | 5979 | \end{note} |
|
6289 | 6288 | \indextext{program execution|(} |
6290 | 6289 |
|
6291 | 6290 | \pnum |
6292 | | -An instance of each object with automatic storage |
6293 | | -duration\iref{basic.stc.auto} is associated with each entry into its |
| 6291 | +An instance of each object with \link{automatic storage |
| 6292 | +duration}{basic.stc.auto} is associated with each entry into its |
6294 | 6293 | block. Such an object exists and retains its last-stored value during |
6295 | 6294 | the execution of the block and while the block is suspended (by a call |
6296 | 6295 | of a function, suspension of a coroutine\iref{expr.await}, or receipt of a signal). |
|
6335 | 6334 | the initialization of the entities captured by copy and |
6336 | 6335 | the constituent expressions of the \grammarterm{initializer} of the \grammarterm{init-capture}{s}, |
6337 | 6336 | \item |
6338 | | -if $E$ is a function call\iref{expr.call} or implicitly invokes a function, |
| 6337 | +if $E$ is a \link{function call}{expr.call} or implicitly invokes a function, |
6339 | 6338 | the constituent expressions of each default argument\iref{dcl.fct.default} |
6340 | 6339 | used in the call, or |
6341 | 6340 | \item |
|
6366 | 6365 | A \defn{full-expression} is |
6367 | 6366 | \begin{itemize} |
6368 | 6367 | \item |
6369 | | -an unevaluated operand\iref{expr.context}, |
| 6368 | +an \deflink{unevaluated operand}{expr.context}, |
6370 | 6369 | \item |
6371 | 6370 | a \grammarterm{constant-expression}\iref{expr.const}, |
6372 | 6371 | \item |
|
0 commit comments