|
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} |
|
185 | 185 | \item a static assertion\iref{dcl.pre}, |
186 | 186 | \item controlling template instantiation\iref{temp.explicit}, |
187 | 187 | \item guiding template argument deduction for constructors\iref{temp.deduct.guide}, |
188 | | -\item use of attributes\iref{dcl.attr}, and |
| 188 | +\item use of \link{attributes}{dcl.attr}, and |
189 | 189 | \item nothing (in the case of an \grammarterm{empty-declaration}). |
190 | 190 | \end{itemize} |
191 | 191 |
|
|
271 | 271 | \item it is |
272 | 272 | an explicit instantiation declaration\iref{temp.explicit}, or |
273 | 273 | \item it is |
274 | | -an explicit specialization\iref{temp.expl.spec} whose |
| 274 | +an \link{explicit specialization}{temp.expl.spec} whose |
275 | 275 | \grammarterm{declaration} is not a definition. |
276 | 276 | \end{itemize} |
277 | 277 | A declaration is said to be a \defn{definition} of each entity that it defines. |
|
313 | 313 | default constructor\iref{class.default.ctor}, |
314 | 314 | copy constructor, move constructor\iref{class.copy.ctor}, |
315 | 315 | copy assignment operator, move assignment operator\iref{class.copy.assign}, |
316 | | -or destructor\iref{class.dtor} member functions. |
| 316 | +or \link{destructor}{class.dtor} member functions. |
317 | 317 | \end{note} |
318 | 318 | \begin{example} |
319 | 319 | Given |
|
398 | 398 | an \grammarterm{id-expression}\iref{expr.prim.id} or |
399 | 399 | a \grammarterm{splice-expression}\iref{expr.prim.splice}, the set |
400 | 400 | contains only $E$. |
401 | | -\item If $E$ is a subscripting operation\iref{expr.sub} with |
| 401 | +\item If $E$ is a \link{subscripting}{expr.sub} operation with |
402 | 402 | an array operand, the set contains the potential results of that operand. |
403 | 403 | \item If $E$ is a class member access |
404 | 404 | expression\iref{expr.ref} of the form |
|
408 | 408 | \item If $E$ is a class member access expression |
409 | 409 | naming a static data member, |
410 | 410 | the set contains the \grammarterm{id-expression} designating the data member. |
411 | | -\item If $E$ is a pointer-to-member |
412 | | -expression\iref{expr.mptr.oper} of the form |
| 411 | +\item If $E$ is a \link{pointer-to-member expression}{expr.mptr.oper} of the form |
413 | 412 | $E_1$ \tcode{.*} $E_2$, |
414 | 413 | the set contains the potential results of $E_1$. |
415 | 414 | \item If $E$ has the form \tcode{($E_1$)}, the set contains the |
416 | 415 | potential results of $E_1$. |
417 | | -\item If $E$ is a glvalue conditional |
418 | | -expression\iref{expr.cond}, the set is the union of the sets of |
| 416 | +\item If $E$ is a glvalue \link{conditional expression}{expr.cond}, |
| 417 | +the set is the union of the sets of |
419 | 418 | potential results of the second and third operands. |
420 | | -\item If $E$ is a comma expression\iref{expr.comma}, the set |
| 419 | +\item If $E$ is a \link{comma expression}{expr.comma}, the set |
421 | 420 | contains the potential results of the right operand. |
422 | 421 | \item Otherwise, the set is empty. |
423 | 422 | \end{itemize} |
|
579 | 578 | copy assignment or move assignment function for another class as specified |
580 | 579 | in~\ref{class.copy.assign}. |
581 | 580 | A constructor for a class is odr-used as specified |
582 | | -in~\ref{dcl.init}. A destructor for a class is odr-used if it is potentially |
583 | | -invoked\iref{class.dtor}. |
| 581 | +in~\ref{dcl.init}. A destructor for a class is odr-used if it is |
| 582 | +\deflink{potentially invoked}{class.dtor}. |
584 | 583 |
|
585 | 584 | \pnum |
586 | 585 | A local entity\iref{basic.pre} |
|
652 | 651 | \pnum |
653 | 652 | Every program shall contain at least one definition of every |
654 | 653 | function or variable that is odr-used in that program |
655 | | -outside of a discarded statement\iref{stmt.if}; no diagnostic required. |
| 654 | +outside of a \deflink{discarded statement}{stmt.if}; no diagnostic required. |
656 | 655 | The definition can appear explicitly in the program, it can be found in |
657 | 656 | the standard or a user-defined library, or (when appropriate) it is |
658 | 657 | implicitly defined (see~\ref{class.default.ctor}, \ref{class.copy.ctor}, |
|
700 | 699 | describe in which contexts complete class types are required. A class |
701 | 700 | type \tcode{T} must be complete if |
702 | 701 | \begin{itemize} |
703 | | -\item an object of type \tcode{T} is defined\iref{basic.def}, or |
704 | | -\item a non-static class data member of type \tcode{T} is |
705 | | -declared\iref{class.mem}, or |
| 702 | +\item an object of type \tcode{T} is \link{defined}{basic.def}, or |
| 703 | +\item a non-static class \deflink{data member}{class.mem} of |
| 704 | +type \tcode{T} is declared, or |
706 | 705 | \item \tcode{T} is used as the allocated type or array element type in a |
707 | 706 | \grammarterm{new-expression}\iref{expr.new}, or |
708 | 707 | \item an lvalue-to-rvalue conversion is applied to |
|
722 | 721 | \keyword{sizeof} operator\iref{expr.sizeof} is applied to an operand of |
723 | 722 | type \tcode{T}, or |
724 | 723 | \item a function with a return type or argument type of type \tcode{T} |
725 | | -is defined\iref{basic.def} or called\iref{expr.call}, or |
| 724 | +is defined\iref{basic.def} or \link{called}{expr.call}, or |
726 | 725 | \item a class with a base class of type \tcode{T} is |
727 | 726 | defined\iref{class.derived}, or |
728 | 727 | \item an lvalue of type \tcode{T} is assigned to\iref{expr.assign}, or |
|
777 | 776 | a non-volatile const object with internal or no linkage if the object |
778 | 777 | \begin{itemize} |
779 | 778 | \item has the same literal type in all definitions of \tcode{D}, |
780 | | -\item is initialized with a constant expression\iref{expr.const}, |
| 779 | +\item is initialized with a \link{constant expression}{expr.const}, |
781 | 780 | \item is not odr-used in any definition of \tcode{D}, and |
782 | 781 | \item has the same value in all definitions of \tcode{D}, |
783 | 782 | \end{itemize} |
|
2883 | 2882 | \pnum |
2884 | 2883 | \indextext{program}% |
2885 | 2884 | \indextext{linking}% |
2886 | | -A \defn{program} consists of one or more translation units\iref{lex.separate} |
| 2885 | +A \defn{program} consists of one or more \deflinkx{translation units}{translation unit}{lex.separate} |
2887 | 2886 | linked together. A translation unit consists |
2888 | 2887 | of a sequence of declarations. |
2889 | 2888 |
|
|
2916 | 2915 | \indextext{linkage!\idxcode{inline} and}% |
2917 | 2916 | \indextext{\idxcode{inline}!linkage of}% |
2918 | 2917 | The name of an entity |
2919 | | -that belongs to a namespace scope\iref{basic.scope.namespace} |
| 2918 | +that belongs to a \link{namespace scope}{basic.scope.namespace} |
2920 | 2919 | has internal linkage if it is the name of |
2921 | 2920 | \begin{itemize} |
2922 | 2921 | \item |
|
2957 | 2956 | purposes\iref{dcl.typedef}; or |
2958 | 2957 | \item |
2959 | 2958 | \indextext{enumeration!linkage of}% |
2960 | | -a named enumeration\iref{dcl.enum}, or an unnamed enumeration defined |
| 2959 | +a named \link{enumeration}{dcl.enum}, or an unnamed enumeration defined |
2961 | 2960 | in a typedef declaration in which the enumeration has the typedef name |
2962 | 2961 | for linkage purposes\iref{dcl.typedef}; or |
2963 | 2962 | \item an unnamed enumeration |
|
3033 | 3032 | \pnum |
3034 | 3033 | \indextext{linkage!no}% |
3035 | 3034 | Names not covered by these rules have no linkage. Moreover, except as |
3036 | | -noted, a name declared at block scope\iref{basic.scope.block} has no |
| 3035 | +noted, a name declared at \deflinkx{block scope}{scope!block}{basic.scope.block} has no |
3037 | 3036 | linkage. |
3038 | 3037 |
|
3039 | 3038 | \pnum |
|
3391 | 3390 | involve additional memory locations that are not accessible to programs but are |
3392 | 3391 | managed by the implementation. |
3393 | 3392 | \end{note} |
3394 | | -Two or more threads of |
3395 | | -execution\iref{intro.multithread} can access separate memory |
| 3393 | +Two or more \deflinkx{threads of |
| 3394 | +execution}{thread of execution}{intro.multithread} can access separate memory |
3396 | 3395 | locations without interfering with each other. |
3397 | 3396 |
|
3398 | 3397 | \pnum |
|
3436 | 3435 | The constructs in a \Cpp{} program create, destroy, refer to, access, and |
3437 | 3436 | manipulate objects. |
3438 | 3437 | An \defn{object} is created |
3439 | | -by a definition\iref{basic.def}, |
| 3438 | +by a \link{definition}{basic.def}, |
3440 | 3439 | by a \grammarterm{new-expression}\iref{expr.new}, |
3441 | 3440 | by an operation that implicitly creates objects (see below), |
3442 | | -when implicitly changing the active member of a union\iref{class.union}, |
| 3441 | +when implicitly changing the active member of a \link{union}{class.union}, |
3443 | 3442 | or |
3444 | 3443 | when a temporary object is created\iref{conv.rval,class.temporary}. |
3445 | 3444 | An object occupies a region of storage |
3446 | 3445 | in its period of construction\iref{class.cdtor}, |
3447 | | -throughout its lifetime\iref{basic.life}, |
| 3446 | +throughout its \link{lifetime}{basic.life}, |
3448 | 3447 | and |
3449 | 3448 | in its period of destruction\iref{class.cdtor}. |
3450 | 3449 | \begin{note} |
|
3574 | 3573 | \begin{itemize} |
3575 | 3574 | \item a base class subobject, or |
3576 | 3575 | \item a non-static data member |
3577 | | -declared with the \tcode{no_unique_address} attribute\iref{dcl.attr.nouniqueaddr}. |
| 3576 | +declared with the \link{\tcode{no_unique_address}}{dcl.attr.nouniqueaddr} attribute. |
3578 | 3577 | \end{itemize} |
3579 | 3578 |
|
3580 | 3579 | \pnum |
|
3595 | 3594 | are \impldef{which non-standard-layout objects |
3596 | 3595 | containing no data are considered empty}. |
3597 | 3596 | \indextext{most derived object!bit-field}% |
3598 | | -Unless it is a bit-field\iref{class.bit}, |
| 3597 | +Unless it is a \link{bit-field}{class.bit}, |
3599 | 3598 | an object with nonzero size |
3600 | 3599 | shall occupy one or more bytes of storage, |
3601 | 3600 | including every byte that is occupied in full or in part |
|
4167 | 4166 | is produced by the evaluation of: |
4168 | 4167 | \begin{itemize} |
4169 | 4168 | \item |
4170 | | - the second or third operand of a conditional expression\iref{expr.cond}, |
| 4169 | + the second or third operand of a \link{conditional expression}{expr.cond}, |
4171 | 4170 | \item |
4172 | | - the right operand of a comma expression\iref{expr.comma}, |
| 4171 | + the right operand of a \link{comma expression}{expr.comma}, |
4173 | 4172 | \item |
4174 | 4173 | the operand of a cast or conversion\iref{conv.integral, |
4175 | 4174 | expr.type.conv,expr.static.cast,expr.cast} |
4176 | 4175 | to an unsigned ordinary character type |
4177 | 4176 | or \tcode{std::byte} type\iref{cstddef.syn}, or |
4178 | 4177 | \item |
4179 | | - a discarded-value expression\iref{expr.context}, |
| 4178 | + a \deflink{discarded-value expression}{expr.context}, |
4180 | 4179 | \end{itemize} |
4181 | 4180 | then the result of the operation is an indeterminate value or |
4182 | 4181 | that erroneous value, respectively. |
|
4367 | 4366 | \indextext{storage duration!dynamic|(} |
4368 | 4367 |
|
4369 | 4368 | \pnum |
4370 | | -Objects can be created dynamically during program |
4371 | | -execution\iref{intro.execution}, using |
| 4369 | +Objects can be created dynamically during \link{program |
| 4370 | +execution}{intro.execution}, using |
4372 | 4371 | \indextext{\idxcode{new}}% |
4373 | 4372 | \grammarterm{new-expression}{s}\iref{expr.new}, and destroyed using |
4374 | 4373 | \indextext{\idxcode{delete}}% |
|
4532 | 4531 | \tcode{std::bad_alloc}\iref{bad.alloc}. |
4533 | 4532 |
|
4534 | 4533 | \pnum |
4535 | | -A global allocation function is only called as the result of a new |
4536 | | -expression\iref{expr.new}, or called directly using the function call |
4537 | | -syntax\iref{expr.call}, or called indirectly to allocate storage for |
| 4534 | +A global allocation function is only called as the result of a \link{new |
| 4535 | +expression}{expr.new}, or called directly using the \link{function call}{expr.call} |
| 4536 | +syntax, or called indirectly to allocate storage for |
4538 | 4537 | a coroutine state\iref{dcl.fct.def.coroutine}, |
4539 | 4538 | or called indirectly through calls to the |
4540 | 4539 | functions in the \Cpp{} standard library. |
|
5040 | 5039 | impose requirements on implementations regarding the representation |
5041 | 5040 | of types. |
5042 | 5041 | There are two kinds of types: fundamental types and compound types. |
5043 | | -Types describe objects\iref{intro.object}, |
5044 | | -references\iref{dcl.ref}, |
5045 | | -or functions\iref{dcl.fct}. |
| 5042 | +Types describe \link{objects}{intro.object}, |
| 5043 | +\link{references}{dcl.ref}, |
| 5044 | +or \link{functions}{dcl.fct}. |
5046 | 5045 | \end{note} |
5047 | 5046 |
|
5048 | 5047 | \pnum |
|
5216 | 5215 | pointer types, pointer-to-member types\iref{basic.compound}, |
5217 | 5216 | \tcode{std::meta::\brk{}info}, \tcode{std::nullptr_t}, |
5218 | 5217 | and |
5219 | | -cv-qualified\iref{basic.type.qualifier} versions of these |
| 5218 | +\link{cv-qualified}{basic.type.qualifier} versions of these |
5220 | 5219 | types are collectively called |
5221 | 5220 | \defnadjx{scalar}{types}{type}. |
5222 | 5221 | \label{term.trivially.copyable.type}% |
|
5250 | 5249 | \item a scalar type; or |
5251 | 5250 | \item a reference type; or |
5252 | 5251 | \item an array of literal type; or |
5253 | | -\item a possibly cv-qualified class type\iref{class} that |
| 5252 | +\item a possibly cv-qualified \link{class type}{class} that |
5254 | 5253 | has all of the following properties: |
5255 | 5254 | \begin{itemize} |
5256 | 5255 | \item it has a constexpr destructor\iref{dcl.constexpr}, |
|
5284 | 5283 | Two types \cvqual{cv1} \tcode{T1} and \cvqual{cv2} \tcode{T2} are |
5285 | 5284 | \defnadjx{layout-compatible}{types}{type} |
5286 | 5285 | if \tcode{T1} and \tcode{T2} are the same type, |
5287 | | -layout-compatible enumerations\iref{dcl.enum}, or |
5288 | | -layout-compatible standard-layout class types\iref{class.mem}. |
| 5286 | +\deflinkx{layout-compatible enumerations}{layout-compatible!enumeration}{dcl.enum}, or |
| 5287 | +\deflinkx{layout-compatible standard-layout class types}{layout-compatible!class}{class.mem}. |
5289 | 5288 |
|
5290 | 5289 | \pnum |
5291 | 5290 | A type is \defn{consteval-only} if it is either |
|
5842 | 5841 | which identify members of a given |
5843 | 5842 | type within objects of a given class, \ref{dcl.mptr}. |
5844 | 5843 | Pointers to data members and pointers to member functions are collectively |
5845 | | -called \term{pointer-to-member} types. |
| 5844 | +called \defn{pointer-to-member} types. |
5846 | 5845 | \end{itemize} |
5847 | 5846 |
|
5848 | 5847 | \pnum |
|
5920 | 5919 | have the same value representation and alignment |
5921 | 5920 | requirements\iref{basic.align}. |
5922 | 5921 | \begin{note} |
5923 | | -Pointers to over-aligned types\iref{basic.align} have no special |
| 5922 | +Pointers to \deflinkx{over-aligned types}{type!over-aligned}{basic.align} have no special |
5924 | 5923 | representation, but their range of valid values is restricted by the extended |
5925 | 5924 | alignment requirement. |
5926 | 5925 | \end{note} |
|
6235 | 6234 | \indextext{program execution|(} |
6236 | 6235 |
|
6237 | 6236 | \pnum |
6238 | | -An instance of each object with automatic storage |
6239 | | -duration\iref{basic.stc.auto} is associated with each entry into its |
| 6237 | +An instance of each object with \link{automatic storage |
| 6238 | +duration}{basic.stc.auto} is associated with each entry into its |
6240 | 6239 | block. Such an object exists and retains its last-stored value during |
6241 | 6240 | the execution of the block and while the block is suspended (by a call |
6242 | 6241 | of a function, suspension of a coroutine\iref{expr.await}, or receipt of a signal). |
|
6281 | 6280 | the initialization of the entities captured by copy and |
6282 | 6281 | the constituent expressions of the \grammarterm{initializer} of the \grammarterm{init-capture}{s}, |
6283 | 6282 | \item |
6284 | | -if $E$ is a function call\iref{expr.call} or implicitly invokes a function, |
| 6283 | +if $E$ is a \link{function call}{expr.call} or implicitly invokes a function, |
6285 | 6284 | the constituent expressions of each default argument\iref{dcl.fct.default} |
6286 | 6285 | used in the call, or |
6287 | 6286 | \item |
|
6312 | 6311 | A \defn{full-expression} is |
6313 | 6312 | \begin{itemize} |
6314 | 6313 | \item |
6315 | | -an unevaluated operand\iref{expr.context}, |
| 6314 | +an \deflink{unevaluated operand}{expr.context}, |
6316 | 6315 | \item |
6317 | 6316 | a \grammarterm{constant-expression}\iref{expr.const}, |
6318 | 6317 | \item |
|
0 commit comments