|
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 |
|
411 | 411 | \item If $E$ is a class member access expression |
412 | 412 | naming a static data member, |
413 | 413 | the set contains the \grammarterm{id-expression} designating the data member. |
414 | | -\item If $E$ is a pointer-to-member |
415 | | -expression\iref{expr.mptr.oper} of the form |
| 414 | +\item If $E$ is a \link{pointer-to-member expression}{expr.mptr.oper} of the form |
416 | 415 | $E_1$ \tcode{.*} $E_2$, |
417 | 416 | the set contains the potential results of $E_1$. |
418 | 417 | \item If $E$ has the form \tcode{($E_1$)}, the set contains the |
419 | 418 | potential results of $E_1$. |
420 | | -\item If $E$ is a glvalue conditional |
421 | | -expression\iref{expr.cond}, the set is the union of the sets of |
| 419 | +\item If $E$ is a glvalue \link{conditional expression}{expr.cond}, |
| 420 | +the set is the union of the sets of |
422 | 421 | potential results of the second and third operands. |
423 | | -\item If $E$ is a comma expression\iref{expr.comma}, the set |
| 422 | +\item If $E$ is a \link{comma expression}{expr.comma}, the set |
424 | 423 | contains the potential results of the right operand. |
425 | 424 | \item Otherwise, the set is empty. |
426 | 425 | \end{itemize} |
|
582 | 581 | copy assignment or move assignment function for another class as specified |
583 | 582 | in~\ref{class.copy.assign}. |
584 | 583 | A constructor for a class is odr-used as specified |
585 | | -in~\ref{dcl.init}. A destructor for a class is odr-used if it is potentially |
586 | | -invoked\iref{class.dtor}. |
| 584 | +in~\ref{dcl.init}. A destructor for a class is odr-used if it is |
| 585 | +\deflink{potentially invoked}{class.dtor}. |
587 | 586 |
|
588 | 587 | \pnum |
589 | 588 | A local entity\iref{basic.pre} |
|
655 | 654 | \pnum |
656 | 655 | Every program shall contain at least one definition of every |
657 | 656 | function or variable that is odr-used in that program |
658 | | -outside of a discarded statement\iref{stmt.if}; no diagnostic required. |
| 657 | +outside of a \deflink{discarded statement}{stmt.if}; no diagnostic required. |
659 | 658 | The definition can appear explicitly in the program, it can be found in |
660 | 659 | the standard or a user-defined library, or (when appropriate) it is |
661 | 660 | implicitly defined (see~\ref{class.default.ctor}, \ref{class.copy.ctor}, |
|
703 | 702 | describe in which contexts complete class types are required. A class |
704 | 703 | type \tcode{T} must be complete if |
705 | 704 | \begin{itemize} |
706 | | -\item an object of type \tcode{T} is defined\iref{basic.def}, or |
707 | | -\item a non-static class data member of type \tcode{T} is |
708 | | -declared\iref{class.mem}, or |
| 705 | +\item an object of type \tcode{T} is \link{defined}{basic.def}, or |
| 706 | +\item a non-static class \deflink{data member}{class.mem} of |
| 707 | +type \tcode{T} is declared, or |
709 | 708 | \item \tcode{T} is used as the allocated type or array element type in a |
710 | 709 | \grammarterm{new-expression}\iref{expr.new}, or |
711 | 710 | \item an lvalue-to-rvalue conversion is applied to |
|
725 | 724 | \keyword{sizeof} operator\iref{expr.sizeof} is applied to an operand of |
726 | 725 | type \tcode{T}, or |
727 | 726 | \item a function with a return type or argument type of type \tcode{T} |
728 | | -is defined\iref{basic.def} or called\iref{expr.call}, or |
| 727 | +is defined\iref{basic.def} or \link{called}{expr.call}, or |
729 | 728 | \item a class with a base class of type \tcode{T} is |
730 | 729 | defined\iref{class.derived}, or |
731 | 730 | \item an lvalue of type \tcode{T} is assigned to\iref{expr.assign}, or |
|
780 | 779 | a non-volatile const object with internal or no linkage if the object |
781 | 780 | \begin{itemize} |
782 | 781 | \item has the same literal type in all definitions of \tcode{D}, |
783 | | -\item is initialized with a constant expression\iref{expr.const}, |
| 782 | +\item is initialized with a \link{constant expression}{expr.const}, |
784 | 783 | \item is not odr-used in any definition of \tcode{D}, and |
785 | 784 | \item has the same value in all definitions of \tcode{D}, |
786 | 785 | \end{itemize} |
|
2919 | 2918 | \indextext{linkage!\idxcode{inline} and}% |
2920 | 2919 | \indextext{\idxcode{inline}!linkage of}% |
2921 | 2920 | The name of an entity |
2922 | | -that belongs to a namespace scope\iref{basic.scope.namespace} |
| 2921 | +that belongs to a \link{namespace scope}{basic.scope.namespace} |
2923 | 2922 | has internal linkage if it is the name of |
2924 | 2923 | \begin{itemize} |
2925 | 2924 | \item |
|
2960 | 2959 | purposes\iref{dcl.typedef}; or |
2961 | 2960 | \item |
2962 | 2961 | \indextext{enumeration!linkage of}% |
2963 | | -a named enumeration\iref{dcl.enum}, or an unnamed enumeration defined |
| 2962 | +a named \link{enumeration}{dcl.enum}, or an unnamed enumeration defined |
2964 | 2963 | in a typedef declaration in which the enumeration has the typedef name |
2965 | 2964 | for linkage purposes\iref{dcl.typedef}; or |
2966 | 2965 | \item an unnamed enumeration |
|
3036 | 3035 | \pnum |
3037 | 3036 | \indextext{linkage!no}% |
3038 | 3037 | Names not covered by these rules have no linkage. Moreover, except as |
3039 | | -noted, a name declared at block scope\iref{basic.scope.block} has no |
| 3038 | +noted, a name declared at \deflinkx{block scope}{scope!block}{basic.scope.block} has no |
3040 | 3039 | linkage. |
3041 | 3040 |
|
3042 | 3041 | \pnum |
|
3394 | 3393 | involve additional memory locations that are not accessible to programs but are |
3395 | 3394 | managed by the implementation. |
3396 | 3395 | \end{note} |
3397 | | -Two or more threads of |
3398 | | -execution\iref{intro.multithread} can access separate memory |
| 3396 | +Two or more \deflinkx{threads of |
| 3397 | +execution}{thread of execution}{intro.multithread} can access separate memory |
3399 | 3398 | locations without interfering with each other. |
3400 | 3399 |
|
3401 | 3400 | \pnum |
|
3439 | 3438 | The constructs in a \Cpp{} program create, destroy, refer to, access, and |
3440 | 3439 | manipulate objects. |
3441 | 3440 | An \defn{object} is created |
3442 | | -by a definition\iref{basic.def}, |
| 3441 | +by a \link{definition}{basic.def}, |
3443 | 3442 | by a \grammarterm{new-expression}\iref{expr.new}, |
3444 | 3443 | by an operation that implicitly creates objects (see below), |
3445 | | -when implicitly changing the active member of a union\iref{class.union}, |
| 3444 | +when implicitly changing the active member of a \link{union}{class.union}, |
3446 | 3445 | or |
3447 | 3446 | when a temporary object is created\iref{conv.rval,class.temporary}. |
3448 | 3447 | An object occupies a region of storage |
3449 | 3448 | in its period of construction\iref{class.cdtor}, |
3450 | | -throughout its lifetime\iref{basic.life}, |
| 3449 | +throughout its \link{lifetime}{basic.life}, |
3451 | 3450 | and |
3452 | 3451 | in its period of destruction\iref{class.cdtor}. |
3453 | 3452 | \begin{note} |
|
3577 | 3576 | \begin{itemize} |
3578 | 3577 | \item a base class subobject, or |
3579 | 3578 | \item a non-static data member |
3580 | | -declared with the \tcode{no_unique_address} attribute\iref{dcl.attr.nouniqueaddr}. |
| 3579 | +declared with the \link{\tcode{no_unique_address}}{dcl.attr.nouniqueaddr} attribute. |
3581 | 3580 | \end{itemize} |
3582 | 3581 |
|
3583 | 3582 | \pnum |
|
3598 | 3597 | are \impldef{which non-standard-layout objects |
3599 | 3598 | containing no data are considered empty}. |
3600 | 3599 | \indextext{most derived object!bit-field}% |
3601 | | -Unless it is a bit-field\iref{class.bit}, |
| 3600 | +Unless it is a \link{bit-field}{class.bit}, |
3602 | 3601 | an object with nonzero size |
3603 | 3602 | shall occupy one or more bytes of storage, |
3604 | 3603 | including every byte that is occupied in full or in part |
|
4174 | 4173 | is produced by the evaluation of: |
4175 | 4174 | \begin{itemize} |
4176 | 4175 | \item |
4177 | | - the second or third operand of a conditional expression\iref{expr.cond}, |
| 4176 | + the second or third operand of a \link{conditional expression}{expr.cond}, |
4178 | 4177 | \item |
4179 | | - the right operand of a comma expression\iref{expr.comma}, |
| 4178 | + the right operand of a \link{comma expression}{expr.comma}, |
4180 | 4179 | \item |
4181 | 4180 | the operand of a cast or conversion\iref{conv.integral, |
4182 | 4181 | expr.type.conv,expr.static.cast,expr.cast} |
4183 | 4182 | to an unsigned ordinary character type |
4184 | 4183 | or \tcode{std::byte} type\iref{cstddef.syn}, or |
4185 | 4184 | \item |
4186 | | - a discarded-value expression\iref{expr.context}, |
| 4185 | + a \deflink{discarded-value expression}{expr.context}, |
4187 | 4186 | \end{itemize} |
4188 | 4187 | then the result of the operation is an indeterminate value or |
4189 | 4188 | that erroneous value, respectively. |
|
4374 | 4373 | \indextext{storage duration!dynamic|(} |
4375 | 4374 |
|
4376 | 4375 | \pnum |
4377 | | -Objects can be created dynamically during program |
4378 | | -execution\iref{intro.execution}, using |
| 4376 | +Objects can be created dynamically during \link{program |
| 4377 | +execution}{intro.execution}, using |
4379 | 4378 | \indextext{\idxcode{new}}% |
4380 | 4379 | \grammarterm{new-expression}{s}\iref{expr.new}, and destroyed using |
4381 | 4380 | \indextext{\idxcode{delete}}% |
|
4539 | 4538 | \tcode{std::bad_alloc}\iref{bad.alloc}. |
4540 | 4539 |
|
4541 | 4540 | \pnum |
4542 | | -A global allocation function is only called as the result of a new |
4543 | | -expression\iref{expr.new}, or called directly using the function call |
4544 | | -syntax\iref{expr.call}, or called indirectly to allocate storage for |
| 4541 | +A global allocation function is only called as the result of a \link{new |
| 4542 | +expression}{expr.new}, or called directly using the \link{function call}{expr.call} |
| 4543 | +syntax, or called indirectly to allocate storage for |
4545 | 4544 | a coroutine state\iref{dcl.fct.def.coroutine}, |
4546 | 4545 | or called indirectly through calls to the |
4547 | 4546 | functions in the \Cpp{} standard library. |
|
5047 | 5046 | impose requirements on implementations regarding the representation |
5048 | 5047 | of types. |
5049 | 5048 | There are two kinds of types: fundamental types and compound types. |
5050 | | -Types describe objects\iref{intro.object}, |
5051 | | -references\iref{dcl.ref}, |
5052 | | -or functions\iref{dcl.fct}. |
| 5049 | +Types describe \link{objects}{intro.object}, |
| 5050 | +\link{references}{dcl.ref}, |
| 5051 | +or \link{functions}{dcl.fct}. |
5053 | 5052 | \end{note} |
5054 | 5053 |
|
5055 | 5054 | \pnum |
|
5223 | 5222 | pointer types, pointer-to-member types\iref{basic.compound}, |
5224 | 5223 | \tcode{std::meta::\brk{}info}, \tcode{std::nullptr_t}, |
5225 | 5224 | and |
5226 | | -cv-qualified\iref{basic.type.qualifier} versions of these |
| 5225 | +\link{cv-qualified}{basic.type.qualifier} versions of these |
5227 | 5226 | types are collectively called |
5228 | 5227 | \defnadjx{scalar}{types}{type}. |
5229 | 5228 | \label{term.trivially.copyable.type}% |
|
5257 | 5256 | \item a scalar type; or |
5258 | 5257 | \item a reference type; or |
5259 | 5258 | \item an array of literal type; or |
5260 | | -\item a possibly cv-qualified class type\iref{class} that |
| 5259 | +\item a possibly cv-qualified \link{class type}{class} that |
5261 | 5260 | has all of the following properties: |
5262 | 5261 | \begin{itemize} |
5263 | 5262 | \item it has a constexpr destructor\iref{dcl.constexpr}, |
|
5291 | 5290 | Two types \cvqual{cv1} \tcode{T1} and \cvqual{cv2} \tcode{T2} are |
5292 | 5291 | \defnadjx{layout-compatible}{types}{type} |
5293 | 5292 | if \tcode{T1} and \tcode{T2} are the same type, |
5294 | | -layout-compatible enumerations\iref{dcl.enum}, or |
5295 | | -layout-compatible standard-layout class types\iref{class.mem}. |
| 5293 | +\deflinkx{layout-compatible enumerations}{layout-compatible!enumeration}{dcl.enum}, or |
| 5294 | +\deflinkx{layout-compatible standard-layout class types}{layout-compatible!class}{class.mem}. |
5296 | 5295 |
|
5297 | 5296 | \pnum |
5298 | 5297 | A type is \defn{consteval-only} if it is either |
|
5849 | 5848 | which identify members of a given |
5850 | 5849 | type within objects of a given class, \ref{dcl.mptr}. |
5851 | 5850 | Pointers to data members and pointers to member functions are collectively |
5852 | | -called \term{pointer-to-member} types. |
| 5851 | +called \defn{pointer-to-member} types. |
5853 | 5852 | \end{itemize} |
5854 | 5853 |
|
5855 | 5854 | \pnum |
|
5927 | 5926 | have the same value representation and alignment |
5928 | 5927 | requirements\iref{basic.align}. |
5929 | 5928 | \begin{note} |
5930 | | -Pointers to over-aligned types\iref{basic.align} have no special |
| 5929 | +Pointers to \deflinkx{over-aligned types}{type!over-aligned}{basic.align} have no special |
5931 | 5930 | representation, but their range of valid values is restricted by the extended |
5932 | 5931 | alignment requirement. |
5933 | 5932 | \end{note} |
|
6242 | 6241 | \indextext{program execution|(} |
6243 | 6242 |
|
6244 | 6243 | \pnum |
6245 | | -An instance of each object with automatic storage |
6246 | | -duration\iref{basic.stc.auto} is associated with each entry into its |
| 6244 | +An instance of each object with \link{automatic storage |
| 6245 | +duration}{basic.stc.auto} is associated with each entry into its |
6247 | 6246 | block. Such an object exists and retains its last-stored value during |
6248 | 6247 | the execution of the block and while the block is suspended (by a call |
6249 | 6248 | of a function, suspension of a coroutine\iref{expr.await}, or receipt of a signal). |
|
6288 | 6287 | the initialization of the entities captured by copy and |
6289 | 6288 | the constituent expressions of the \grammarterm{initializer} of the \grammarterm{init-capture}{s}, |
6290 | 6289 | \item |
6291 | | -if $E$ is a function call\iref{expr.call} or implicitly invokes a function, |
| 6290 | +if $E$ is a \link{function call}{expr.call} or implicitly invokes a function, |
6292 | 6291 | the constituent expressions of each default argument\iref{dcl.fct.default} |
6293 | 6292 | used in the call, or |
6294 | 6293 | \item |
|
6319 | 6318 | A \defn{full-expression} is |
6320 | 6319 | \begin{itemize} |
6321 | 6320 | \item |
6322 | | -an unevaluated operand\iref{expr.context}, |
| 6321 | +an \deflink{unevaluated operand}{expr.context}, |
6323 | 6322 | \item |
6324 | 6323 | a \grammarterm{constant-expression}\iref{expr.const}, |
6325 | 6324 | \item |
|
0 commit comments