|
180 | 180 | \indextext{linkage}% |
181 | 181 | A name used in more than one translation unit can potentially |
182 | 182 | refer to the same entity in these translation units depending on the |
183 | | -linkage\iref{basic.link} of the name specified in each |
| 183 | +\link{linkage}{basic.link} of the name specified in each |
184 | 184 | translation unit. |
185 | 185 |
|
186 | 186 | \rSec1[basic.def]{Declarations and definitions} |
|
205 | 205 | \item a static assertion\iref{dcl.pre}, |
206 | 206 | \item controlling template instantiation\iref{temp.explicit}, |
207 | 207 | \item guiding template argument deduction for constructors\iref{temp.deduct.guide}, |
208 | | -\item use of attributes\iref{dcl.attr}, and |
| 208 | +\item use of \link{attributes}{dcl.attr}, and |
209 | 209 | \item nothing (in the case of an \grammarterm{empty-declaration}). |
210 | 210 | \end{itemize} |
211 | 211 | \end{note} |
|
334 | 334 | default constructor\iref{class.default.ctor}, |
335 | 335 | copy constructor, move constructor\iref{class.copy.ctor}, |
336 | 336 | copy assignment operator, move assignment operator\iref{class.copy.assign}, |
337 | | -or destructor\iref{class.dtor} member functions. |
| 337 | +or \link{destructor}{class.dtor} member functions. |
338 | 338 | \end{note} |
339 | 339 | \begin{example} |
340 | 340 | Given |
|
419 | 419 | an \grammarterm{id-expression}\iref{expr.prim.id} or |
420 | 420 | a \grammarterm{splice-expression}\iref{expr.prim.splice}, the set |
421 | 421 | contains only $E$. |
422 | | -\item If $E$ is a subscripting operation\iref{expr.sub} with |
| 422 | +\item If $E$ is a \link{subscripting}{expr.sub} operation with |
423 | 423 | an array operand, the set contains the potential results of that operand. |
424 | 424 | \item If $E$ is a class member access |
425 | 425 | expression\iref{expr.ref} of the form |
|
430 | 430 | \item If $E$ is a class member access expression |
431 | 431 | naming a static data member, |
432 | 432 | the set contains the \grammarterm{id-expression} designating the data member. |
433 | | -\item If $E$ is a pointer-to-member |
434 | | -expression\iref{expr.mptr.oper} of the form |
| 433 | +\item If $E$ is a \link{pointer-to-member expression}{expr.mptr.oper} of the form |
435 | 434 | $E_1$ \tcode{.*} $E_2$, |
436 | 435 | the set contains the potential results of $E_1$. |
437 | 436 | \item If $E$ has the form \tcode{($E_1$)}, the set contains the |
438 | 437 | potential results of $E_1$. |
439 | | -\item If $E$ is a glvalue conditional |
440 | | -expression\iref{expr.cond}, the set is the union of the sets of |
| 438 | +\item If $E$ is a glvalue \link{conditional expression}{expr.cond}, |
| 439 | +the set is the union of the sets of |
441 | 440 | potential results of the second and third operands. |
442 | | -\item If $E$ is a comma expression\iref{expr.comma}, the set |
| 441 | +\item If $E$ is a \link{comma expression}{expr.comma}, the set |
443 | 442 | contains the potential results of the right operand. |
444 | 443 | \item Otherwise, the set is empty. |
445 | 444 | \end{itemize} |
|
601 | 600 | copy assignment or move assignment function for another class as specified |
602 | 601 | in~\ref{class.copy.assign}. |
603 | 602 | A constructor for a class is odr-used as specified |
604 | | -in~\ref{dcl.init}. A destructor for a class is odr-used if it is potentially |
605 | | -invoked\iref{class.dtor}. |
| 603 | +in~\ref{dcl.init}. A destructor for a class is odr-used if it is |
| 604 | +\deflink{potentially invoked}{class.dtor}. |
606 | 605 |
|
607 | 606 | \pnum |
608 | 607 | A local entity\iref{basic.pre} |
|
674 | 673 | \pnum |
675 | 674 | Every program shall contain at least one definition of every |
676 | 675 | function or variable that is odr-used in that program |
677 | | -outside of a discarded statement\iref{stmt.if}; no diagnostic required. |
| 676 | +outside of a \deflink{discarded statement}{stmt.if}; no diagnostic required. |
678 | 677 | The definition can appear explicitly in the program, it can be found in |
679 | 678 | the standard or a user-defined library, or (when appropriate) it is |
680 | 679 | implicitly defined (see~\ref{class.default.ctor}, \ref{class.copy.ctor}, |
|
722 | 721 | describe in which contexts complete class types are required. A class |
723 | 722 | type \tcode{T} must be complete if |
724 | 723 | \begin{itemize} |
725 | | -\item an object of type \tcode{T} is defined\iref{basic.def}, or |
726 | | -\item a non-static class data member of type \tcode{T} is |
727 | | -declared\iref{class.mem}, or |
| 724 | +\item an object of type \tcode{T} is \link{defined}{basic.def}, or |
| 725 | +\item a non-static class \deflink{data member}{class.mem} of |
| 726 | +type \tcode{T} is declared, or |
728 | 727 | \item \tcode{T} is used as the allocated type or array element type in a |
729 | 728 | \grammarterm{new-expression}\iref{expr.new}, or |
730 | 729 | \item an lvalue-to-rvalue conversion is applied to |
|
744 | 743 | \keyword{sizeof} operator\iref{expr.sizeof} is applied to an operand of |
745 | 744 | type \tcode{T}, or |
746 | 745 | \item a function with a return type or argument type of type \tcode{T} |
747 | | -is defined\iref{basic.def} or called\iref{expr.call}, or |
| 746 | +is defined\iref{basic.def} or \link{called}{expr.call}, or |
748 | 747 | \item a class with a base class of type \tcode{T} is |
749 | 748 | defined\iref{class.derived}, or |
750 | 749 | \item an lvalue of type \tcode{T} is assigned to\iref{expr.assign}, or |
|
2945 | 2944 | \indextext{linkage!\idxcode{inline} and}% |
2946 | 2945 | \indextext{\idxcode{inline}!linkage of}% |
2947 | 2946 | The name of an entity |
2948 | | -that belongs to a namespace scope\iref{basic.scope.namespace} |
| 2947 | +that belongs to a \link{namespace scope}{basic.scope.namespace} |
2949 | 2948 | has internal linkage if it is the name of |
2950 | 2949 | \begin{itemize} |
2951 | 2950 | \item |
|
2986 | 2985 | purposes\iref{dcl.typedef}; or |
2987 | 2986 | \item |
2988 | 2987 | \indextext{enumeration!linkage of}% |
2989 | | -a named enumeration\iref{dcl.enum}, or an unnamed enumeration defined |
| 2988 | +a named \link{enumeration}{dcl.enum}, or an unnamed enumeration defined |
2990 | 2989 | in a typedef declaration in which the enumeration has the typedef name |
2991 | 2990 | for linkage purposes\iref{dcl.typedef}; or |
2992 | 2991 | \item an unnamed enumeration |
|
3062 | 3061 | \pnum |
3063 | 3062 | \indextext{linkage!no}% |
3064 | 3063 | Names not covered by these rules have no linkage. Moreover, except as |
3065 | | -noted, a name declared at block scope\iref{basic.scope.block} has no |
| 3064 | +noted, a name declared at \deflinkx{block scope}{scope!block}{basic.scope.block} has no |
3066 | 3065 | linkage. |
3067 | 3066 |
|
3068 | 3067 | \pnum |
|
3421 | 3420 | involve additional memory locations that are not accessible to programs but are |
3422 | 3421 | managed by the implementation. |
3423 | 3422 | \end{note} |
3424 | | -Two or more threads of |
3425 | | -execution\iref{intro.multithread} can access separate memory |
| 3423 | +Two or more \deflinkx{threads of |
| 3424 | +execution}{thread of execution}{intro.multithread} can access separate memory |
3426 | 3425 | locations without interfering with each other. |
3427 | 3426 |
|
3428 | 3427 | \pnum |
|
3466 | 3465 | The constructs in a \Cpp{} program create, destroy, refer to, access, and |
3467 | 3466 | manipulate objects. |
3468 | 3467 | An \defn{object} is created |
3469 | | -by a definition\iref{basic.def}, |
| 3468 | +by a \link{definition}{basic.def}, |
3470 | 3469 | by a \grammarterm{new-expression}\iref{expr.new}, |
3471 | 3470 | by an operation that implicitly creates objects (see below), |
3472 | | -when implicitly changing the active member of a union\iref{class.union}, |
| 3471 | +when implicitly changing the active member of a \link{union}{class.union}, |
3473 | 3472 | or |
3474 | 3473 | when a temporary object is created\iref{conv.rval,class.temporary}. |
3475 | 3474 | An object occupies a region of storage |
3476 | 3475 | in its period of construction\iref{class.cdtor}, |
3477 | | -throughout its lifetime\iref{basic.life}, |
| 3476 | +throughout its \link{lifetime}{basic.life}, |
3478 | 3477 | and |
3479 | 3478 | in its period of destruction\iref{class.cdtor}. |
3480 | 3479 | \begin{note} |
|
3608 | 3607 | \begin{itemize} |
3609 | 3608 | \item a base class subobject, or |
3610 | 3609 | \item a non-static data member |
3611 | | -declared with the \tcode{no_unique_address} attribute\iref{dcl.attr.nouniqueaddr}. |
| 3610 | +declared with the \link{\tcode{no_unique_address}}{dcl.attr.nouniqueaddr} attribute. |
3612 | 3611 | \end{itemize} |
3613 | 3612 |
|
3614 | 3613 | \pnum |
|
3629 | 3628 | are \impldef{which non-standard-layout objects |
3630 | 3629 | containing no data are considered empty}. |
3631 | 3630 | \indextext{most derived object!bit-field}% |
3632 | | -Unless it is a bit-field\iref{class.bit}, |
| 3631 | +Unless it is a \link{bit-field}{class.bit}, |
3633 | 3632 | an object with nonzero size |
3634 | 3633 | shall occupy one or more bytes of storage, |
3635 | 3634 | including every byte that is occupied in full or in part |
|
4269 | 4268 | is produced by the evaluation of: |
4270 | 4269 | \begin{itemize} |
4271 | 4270 | \item |
4272 | | - the second or third operand of a conditional expression\iref{expr.cond}, |
| 4271 | + the second or third operand of a \link{conditional expression}{expr.cond}, |
4273 | 4272 | \item |
4274 | | - the right operand of a comma expression\iref{expr.comma}, |
| 4273 | + the right operand of a \link{comma expression}{expr.comma}, |
4275 | 4274 | \item |
4276 | 4275 | the operand of a cast or conversion\iref{conv.integral, |
4277 | 4276 | expr.type.conv,expr.static.cast,expr.cast} |
4278 | 4277 | to an unsigned ordinary character type |
4279 | 4278 | or \tcode{std::byte} type\iref{cstddef.syn}, or |
4280 | 4279 | \item |
4281 | | - a discarded-value expression\iref{expr.context}, |
| 4280 | + a \deflink{discarded-value expression}{expr.context}, |
4282 | 4281 | \end{itemize} |
4283 | 4282 | then the result of the operation is an indeterminate value or |
4284 | 4283 | that erroneous value, respectively. |
|
4469 | 4468 | \indextext{storage duration!dynamic|(} |
4470 | 4469 |
|
4471 | 4470 | \pnum |
4472 | | -Objects can be created dynamically during program |
4473 | | -execution\iref{intro.execution}, using |
| 4471 | +Objects can be created dynamically during \link{program |
| 4472 | +execution}{intro.execution}, using |
4474 | 4473 | \indextext{\idxcode{new}}% |
4475 | 4474 | \grammarterm{new-expression}{s}\iref{expr.new}, and destroyed using |
4476 | 4475 | \indextext{\idxcode{delete}}% |
|
4634 | 4633 | \tcode{std::bad_alloc}\iref{bad.alloc}. |
4635 | 4634 |
|
4636 | 4635 | \pnum |
4637 | | -A global allocation function is only called as the result of a new |
4638 | | -expression\iref{expr.new}, or called directly using the function call |
4639 | | -syntax\iref{expr.call}, or called indirectly to allocate storage for |
| 4636 | +A global allocation function is only called as the result of a \link{new |
| 4637 | +expression}{expr.new}, or called directly using the \link{function call}{expr.call} |
| 4638 | +syntax, or called indirectly to allocate storage for |
4640 | 4639 | a coroutine state\iref{dcl.fct.def.coroutine}, |
4641 | 4640 | or called indirectly through calls to the |
4642 | 4641 | functions in the \Cpp{} standard library. |
|
5161 | 5160 | impose requirements on implementations regarding the representation |
5162 | 5161 | of types. |
5163 | 5162 | There are two kinds of types: fundamental types and compound types. |
5164 | | -Types describe objects\iref{intro.object}, |
5165 | | -references\iref{dcl.ref}, |
5166 | | -or functions\iref{dcl.fct}. |
| 5163 | +Types describe \link{objects}{intro.object}, |
| 5164 | +\link{references}{dcl.ref}, |
| 5165 | +or \link{functions}{dcl.fct}. |
5167 | 5166 | \end{note} |
5168 | 5167 |
|
5169 | 5168 | \pnum |
|
5337 | 5336 | pointer types, pointer-to-member types\iref{basic.compound}, |
5338 | 5337 | \tcode{std::meta::\brk{}info}, \tcode{std::nullptr_t}, |
5339 | 5338 | and |
5340 | | -cv-qualified\iref{basic.type.qualifier} versions of these |
| 5339 | +\link{cv-qualified}{basic.type.qualifier} versions of these |
5341 | 5340 | types are collectively called |
5342 | 5341 | \defnadjx{scalar}{types}{type}. |
5343 | 5342 | \label{term.trivially.copyable.type}% |
|
5362 | 5361 | \item a scalar type; or |
5363 | 5362 | \item a reference type; or |
5364 | 5363 | \item an array of literal type; or |
5365 | | -\item a possibly cv-qualified class type\iref{class} that |
| 5364 | +\item a possibly cv-qualified \link{class type}{class} that |
5366 | 5365 | has all of the following properties: |
5367 | 5366 | \begin{itemize} |
5368 | 5367 | \item it has a constexpr destructor\iref{dcl.constexpr}, |
|
5396 | 5395 | Two types \cvqual{cv1} \tcode{T1} and \cvqual{cv2} \tcode{T2} are |
5397 | 5396 | \defnadjx{layout-compatible}{types}{type} |
5398 | 5397 | if \tcode{T1} and \tcode{T2} are the same type, |
5399 | | -layout-compatible enumerations\iref{dcl.enum}, or |
5400 | | -layout-compatible standard-layout class types\iref{class.mem}. |
| 5398 | +\deflinkx{layout-compatible enumerations}{layout-compatible!enumeration}{dcl.enum}, or |
| 5399 | +\deflinkx{layout-compatible standard-layout class types}{layout-compatible!class}{class.mem}. |
5401 | 5400 |
|
5402 | 5401 | \pnum |
5403 | 5402 | A type is \defn{consteval-only} if it is |
|
5971 | 5970 | which identify members of a given |
5972 | 5971 | type within objects of a given class, \ref{dcl.mptr}. |
5973 | 5972 | Pointers to data members and pointers to member functions are collectively |
5974 | | -called \term{pointer-to-member} types. |
| 5973 | +called \defn{pointer-to-member} types. |
5975 | 5974 | \end{itemize} |
5976 | 5975 |
|
5977 | 5976 | \pnum |
|
6049 | 6048 | have the same value representation and alignment |
6050 | 6049 | requirements\iref{basic.align}. |
6051 | 6050 | \begin{note} |
6052 | | -Pointers to over-aligned types\iref{basic.align} have no special |
| 6051 | +Pointers to \deflinkx{over-aligned types}{type!over-aligned}{basic.align} have no special |
6053 | 6052 | representation, but their range of valid values is restricted by the extended |
6054 | 6053 | alignment requirement. |
6055 | 6054 | \end{note} |
|
6386 | 6385 | \indextext{program execution|(} |
6387 | 6386 |
|
6388 | 6387 | \pnum |
6389 | | -An instance of each object with automatic storage |
6390 | | -duration\iref{basic.stc.auto} is associated with each entry into its |
| 6388 | +An instance of each object with \link{automatic storage |
| 6389 | +duration}{basic.stc.auto} is associated with each entry into its |
6391 | 6390 | block. Such an object exists and retains its last-stored value during |
6392 | 6391 | the execution of the block and while the block is suspended (by a call |
6393 | 6392 | of a function, suspension of a coroutine\iref{expr.await}, or receipt of a signal). |
|
6432 | 6431 | the initialization of the entities captured by copy and |
6433 | 6432 | the constituent expressions of the \grammarterm{initializer} of the \grammarterm{init-capture}{s}, |
6434 | 6433 | \item |
6435 | | -if $E$ is a function call\iref{expr.call} or implicitly invokes a function, |
| 6434 | +if $E$ is a \link{function call}{expr.call} or implicitly invokes a function, |
6436 | 6435 | the constituent expressions of each default argument\iref{dcl.fct.default} |
6437 | 6436 | used in the call, and |
6438 | 6437 | \item |
|
6463 | 6462 | A \defn{full-expression} is |
6464 | 6463 | \begin{itemize} |
6465 | 6464 | \item |
6466 | | -an unevaluated operand\iref{expr.context}, |
| 6465 | +an \deflink{unevaluated operand}{expr.context}, |
6467 | 6466 | \item |
6468 | 6467 | a \grammarterm{constant-expression}\iref{expr.const.core}, |
6469 | 6468 | \item |
|
0 commit comments