|
155 | 155 | \indextext{linkage}% |
156 | 156 | A name used in more than one translation unit can potentially |
157 | 157 | refer to the same entity in these translation units depending on the |
158 | | -linkage\iref{basic.link} of the name specified in each |
| 158 | +\link{linkage}{basic.link} of the name specified in each |
159 | 159 | translation unit. |
160 | 160 |
|
161 | 161 | \rSec1[basic.def]{Declarations and definitions} |
|
178 | 178 | \item a static assertion\iref{dcl.pre}, |
179 | 179 | \item controlling template instantiation\iref{temp.explicit}, |
180 | 180 | \item guiding template argument deduction for constructors\iref{temp.deduct.guide}, |
181 | | -\item use of attributes\iref{dcl.attr}, and |
| 181 | +\item use of \link{attributes}{dcl.attr}, and |
182 | 182 | \item nothing (in the case of an \grammarterm{empty-declaration}). |
183 | 183 | \end{itemize} |
184 | 184 |
|
|
264 | 264 | \item it is |
265 | 265 | an explicit instantiation declaration\iref{temp.explicit}, or |
266 | 266 | \item it is |
267 | | -an explicit specialization\iref{temp.expl.spec} whose |
| 267 | +an \link{explicit specialization}{temp.expl.spec} whose |
268 | 268 | \grammarterm{declaration} is not a definition. |
269 | 269 | \end{itemize} |
270 | 270 | A declaration is said to be a \defn{definition} of each entity that it defines. |
|
306 | 306 | default constructor\iref{class.default.ctor}, |
307 | 307 | copy constructor, move constructor\iref{class.copy.ctor}, |
308 | 308 | copy assignment operator, move assignment operator\iref{class.copy.assign}, |
309 | | -or destructor\iref{class.dtor} member functions. |
| 309 | +or \link{destructor}{class.dtor} member functions. |
310 | 310 | \end{note} |
311 | 311 | \begin{example} |
312 | 312 | Given |
|
391 | 391 | an \grammarterm{id-expression}\iref{expr.prim.id} or |
392 | 392 | a \grammarterm{splice-expression}\iref{expr.prim.splice}, the set |
393 | 393 | contains only $E$. |
394 | | -\item If $E$ is a subscripting operation\iref{expr.sub} with |
| 394 | +\item If $E$ is a \link{subscripting}{expr.sub} operation with |
395 | 395 | an array operand, the set contains the potential results of that operand. |
396 | 396 | \item If $E$ is a class member access |
397 | 397 | expression\iref{expr.ref} of the form |
|
401 | 401 | \item If $E$ is a class member access expression |
402 | 402 | naming a static data member, |
403 | 403 | the set contains the \grammarterm{id-expression} designating the data member. |
404 | | -\item If $E$ is a pointer-to-member |
405 | | -expression\iref{expr.mptr.oper} of the form |
| 404 | +\item If $E$ is a \link{pointer-to-member expression}{expr.mptr.oper} of the form |
406 | 405 | $E_1$ \tcode{.*} $E_2$, |
407 | 406 | the set contains the potential results of $E_1$. |
408 | 407 | \item If $E$ has the form \tcode{($E_1$)}, the set contains the |
409 | 408 | potential results of $E_1$. |
410 | | -\item If $E$ is a glvalue conditional |
411 | | -expression\iref{expr.cond}, the set is the union of the sets of |
| 409 | +\item If $E$ is a glvalue \link{conditional expression}{expr.cond}, |
| 410 | +the set is the union of the sets of |
412 | 411 | potential results of the second and third operands. |
413 | | -\item If $E$ is a comma expression\iref{expr.comma}, the set |
| 412 | +\item If $E$ is a \link{comma expression}{expr.comma}, the set |
414 | 413 | contains the potential results of the right operand. |
415 | 414 | \item Otherwise, the set is empty. |
416 | 415 | \end{itemize} |
|
572 | 571 | copy assignment or move assignment function for another class as specified |
573 | 572 | in~\ref{class.copy.assign}. |
574 | 573 | A constructor for a class is odr-used as specified |
575 | | -in~\ref{dcl.init}. A destructor for a class is odr-used if it is potentially |
576 | | -invoked\iref{class.dtor}. |
| 574 | +in~\ref{dcl.init}. A destructor for a class is odr-used if it is |
| 575 | +\deflink{potentially invoked}{class.dtor}. |
577 | 576 |
|
578 | 577 | \pnum |
579 | 578 | A local entity\iref{basic.pre} |
|
645 | 644 | \pnum |
646 | 645 | Every program shall contain at least one definition of every |
647 | 646 | function or variable that is odr-used in that program |
648 | | -outside of a discarded statement\iref{stmt.if}; no diagnostic required. |
| 647 | +outside of a \deflink{discarded statement}{stmt.if}; no diagnostic required. |
649 | 648 | The definition can appear explicitly in the program, it can be found in |
650 | 649 | the standard or a user-defined library, or (when appropriate) it is |
651 | 650 | implicitly defined (see~\ref{class.default.ctor}, \ref{class.copy.ctor}, |
|
693 | 692 | describe in which contexts complete class types are required. A class |
694 | 693 | type \tcode{T} must be complete if |
695 | 694 | \begin{itemize} |
696 | | -\item an object of type \tcode{T} is defined\iref{basic.def}, or |
697 | | -\item a non-static class data member of type \tcode{T} is |
698 | | -declared\iref{class.mem}, or |
| 695 | +\item an object of type \tcode{T} is \link{defined}{basic.def}, or |
| 696 | +\item a non-static class \deflink{data member}{class.mem} of |
| 697 | +type \tcode{T} is declared, or |
699 | 698 | \item \tcode{T} is used as the allocated type or array element type in a |
700 | 699 | \grammarterm{new-expression}\iref{expr.new}, or |
701 | 700 | \item an lvalue-to-rvalue conversion is applied to |
|
715 | 714 | \keyword{sizeof} operator\iref{expr.sizeof} is applied to an operand of |
716 | 715 | type \tcode{T}, or |
717 | 716 | \item a function with a return type or argument type of type \tcode{T} |
718 | | -is defined\iref{basic.def} or called\iref{expr.call}, or |
| 717 | +is defined\iref{basic.def} or \link{called}{expr.call}, or |
719 | 718 | \item a class with a base class of type \tcode{T} is |
720 | 719 | defined\iref{class.derived}, or |
721 | 720 | \item an lvalue of type \tcode{T} is assigned to\iref{expr.assign}, or |
|
770 | 769 | a non-volatile const object with internal or no linkage if the object |
771 | 770 | \begin{itemize} |
772 | 771 | \item has the same literal type in all definitions of \tcode{D}, |
773 | | -\item is initialized with a constant expression\iref{expr.const}, |
| 772 | +\item is initialized with a \link{constant expression}{expr.const}, |
774 | 773 | \item is not odr-used in any definition of \tcode{D}, and |
775 | 774 | \item has the same value in all definitions of \tcode{D}, |
776 | 775 | \end{itemize} |
|
2876 | 2875 | \pnum |
2877 | 2876 | \indextext{program}% |
2878 | 2877 | \indextext{linking}% |
2879 | | -A \defn{program} consists of one or more translation units\iref{lex.separate} |
| 2878 | +A \defn{program} consists of one or more \deflinkx{translation units}{translation unit}{lex.separate} |
2880 | 2879 | linked together. A translation unit consists |
2881 | 2880 | of a sequence of declarations. |
2882 | 2881 |
|
|
2909 | 2908 | \indextext{linkage!\idxcode{inline} and}% |
2910 | 2909 | \indextext{\idxcode{inline}!linkage of}% |
2911 | 2910 | The name of an entity |
2912 | | -that belongs to a namespace scope\iref{basic.scope.namespace} |
| 2911 | +that belongs to a \link{namespace scope}{basic.scope.namespace} |
2913 | 2912 | has internal linkage if it is the name of |
2914 | 2913 | \begin{itemize} |
2915 | 2914 | \item |
|
2950 | 2949 | purposes\iref{dcl.typedef}; or |
2951 | 2950 | \item |
2952 | 2951 | \indextext{enumeration!linkage of}% |
2953 | | -a named enumeration\iref{dcl.enum}, or an unnamed enumeration defined |
| 2952 | +a named \link{enumeration}{dcl.enum}, or an unnamed enumeration defined |
2954 | 2953 | in a typedef declaration in which the enumeration has the typedef name |
2955 | 2954 | for linkage purposes\iref{dcl.typedef}; or |
2956 | 2955 | \item an unnamed enumeration |
|
3026 | 3025 | \pnum |
3027 | 3026 | \indextext{linkage!no}% |
3028 | 3027 | Names not covered by these rules have no linkage. Moreover, except as |
3029 | | -noted, a name declared at block scope\iref{basic.scope.block} has no |
| 3028 | +noted, a name declared at \deflinkx{block scope}{scope!block}{basic.scope.block} has no |
3030 | 3029 | linkage. |
3031 | 3030 |
|
3032 | 3031 | \pnum |
|
3384 | 3383 | involve additional memory locations that are not accessible to programs but are |
3385 | 3384 | managed by the implementation. |
3386 | 3385 | \end{note} |
3387 | | -Two or more threads of |
3388 | | -execution\iref{intro.multithread} can access separate memory |
| 3386 | +Two or more \deflinkx{threads of |
| 3387 | +execution}{thread of execution}{intro.multithread} can access separate memory |
3389 | 3388 | locations without interfering with each other. |
3390 | 3389 |
|
3391 | 3390 | \pnum |
|
3429 | 3428 | The constructs in a \Cpp{} program create, destroy, refer to, access, and |
3430 | 3429 | manipulate objects. |
3431 | 3430 | An \defn{object} is created |
3432 | | -by a definition\iref{basic.def}, |
| 3431 | +by a \link{definition}{basic.def}, |
3433 | 3432 | by a \grammarterm{new-expression}\iref{expr.new}, |
3434 | 3433 | by an operation that implicitly creates objects (see below), |
3435 | | -when implicitly changing the active member of a union\iref{class.union}, |
| 3434 | +when implicitly changing the active member of a \link{union}{class.union}, |
3436 | 3435 | or |
3437 | 3436 | when a temporary object is created\iref{conv.rval,class.temporary}. |
3438 | 3437 | An object occupies a region of storage |
3439 | 3438 | in its period of construction\iref{class.cdtor}, |
3440 | | -throughout its lifetime\iref{basic.life}, |
| 3439 | +throughout its \link{lifetime}{basic.life}, |
3441 | 3440 | and |
3442 | 3441 | in its period of destruction\iref{class.cdtor}. |
3443 | 3442 | \begin{note} |
|
3567 | 3566 | \begin{itemize} |
3568 | 3567 | \item a base class subobject, or |
3569 | 3568 | \item a non-static data member |
3570 | | -declared with the \tcode{no_unique_address} attribute\iref{dcl.attr.nouniqueaddr}. |
| 3569 | +declared with the \link{\tcode{no_unique_address}}{dcl.attr.nouniqueaddr} attribute. |
3571 | 3570 | \end{itemize} |
3572 | 3571 |
|
3573 | 3572 | \pnum |
|
3588 | 3587 | are \impldef{which non-standard-layout objects |
3589 | 3588 | containing no data are considered empty}. |
3590 | 3589 | \indextext{most derived object!bit-field}% |
3591 | | -Unless it is a bit-field\iref{class.bit}, |
| 3590 | +Unless it is a \link{bit-field}{class.bit}, |
3592 | 3591 | an object with nonzero size |
3593 | 3592 | shall occupy one or more bytes of storage, |
3594 | 3593 | including every byte that is occupied in full or in part |
|
4161 | 4160 | is produced by the evaluation of: |
4162 | 4161 | \begin{itemize} |
4163 | 4162 | \item |
4164 | | - the second or third operand of a conditional expression\iref{expr.cond}, |
| 4163 | + the second or third operand of a \link{conditional expression}{expr.cond}, |
4165 | 4164 | \item |
4166 | | - the right operand of a comma expression\iref{expr.comma}, |
| 4165 | + the right operand of a \link{comma expression}{expr.comma}, |
4167 | 4166 | \item |
4168 | 4167 | the operand of a cast or conversion\iref{conv.integral, |
4169 | 4168 | expr.type.conv,expr.static.cast,expr.cast} |
4170 | 4169 | to an unsigned ordinary character type |
4171 | 4170 | or \tcode{std::byte} type\iref{cstddef.syn}, or |
4172 | 4171 | \item |
4173 | | - a discarded-value expression\iref{expr.context}, |
| 4172 | + a \deflink{discarded-value expression}{expr.context}, |
4174 | 4173 | \end{itemize} |
4175 | 4174 | then the result of the operation is an indeterminate value or |
4176 | 4175 | that erroneous value, respectively. |
|
4361 | 4360 | \indextext{storage duration!dynamic|(} |
4362 | 4361 |
|
4363 | 4362 | \pnum |
4364 | | -Objects can be created dynamically during program |
4365 | | -execution\iref{intro.execution}, using |
| 4363 | +Objects can be created dynamically during \link{program |
| 4364 | +execution}{intro.execution}, using |
4366 | 4365 | \indextext{\idxcode{new}}% |
4367 | 4366 | \grammarterm{new-expression}{s}\iref{expr.new}, and destroyed using |
4368 | 4367 | \indextext{\idxcode{delete}}% |
|
4526 | 4525 | \tcode{std::bad_alloc}\iref{bad.alloc}. |
4527 | 4526 |
|
4528 | 4527 | \pnum |
4529 | | -A global allocation function is only called as the result of a new |
4530 | | -expression\iref{expr.new}, or called directly using the function call |
4531 | | -syntax\iref{expr.call}, or called indirectly to allocate storage for |
| 4528 | +A global allocation function is only called as the result of a \link{new |
| 4529 | +expression}{expr.new}, or called directly using the \link{function call}{expr.call} |
| 4530 | +syntax, or called indirectly to allocate storage for |
4532 | 4531 | a coroutine state\iref{dcl.fct.def.coroutine}, |
4533 | 4532 | or called indirectly through calls to the |
4534 | 4533 | functions in the \Cpp{} standard library. |
|
5034 | 5033 | impose requirements on implementations regarding the representation |
5035 | 5034 | of types. |
5036 | 5035 | There are two kinds of types: fundamental types and compound types. |
5037 | | -Types describe objects\iref{intro.object}, |
5038 | | -references\iref{dcl.ref}, |
5039 | | -or functions\iref{dcl.fct}. |
| 5036 | +Types describe \link{objects}{intro.object}, |
| 5037 | +\link{references}{dcl.ref}, |
| 5038 | +or \link{functions}{dcl.fct}. |
5040 | 5039 | \end{note} |
5041 | 5040 |
|
5042 | 5041 | \pnum |
|
5210 | 5209 | pointer types, pointer-to-member types\iref{basic.compound}, |
5211 | 5210 | \tcode{std::meta::\brk{}info}, \tcode{std::nullptr_t}, |
5212 | 5211 | and |
5213 | | -cv-qualified\iref{basic.type.qualifier} versions of these |
| 5212 | +\link{cv-qualified}{basic.type.qualifier} versions of these |
5214 | 5213 | types are collectively called |
5215 | 5214 | \defnadjx{scalar}{types}{type}. |
5216 | 5215 | \label{term.trivially.copyable.type}% |
|
5243 | 5242 | \item a scalar type; or |
5244 | 5243 | \item a reference type; or |
5245 | 5244 | \item an array of literal type; or |
5246 | | -\item a possibly cv-qualified class type\iref{class} that |
| 5245 | +\item a possibly cv-qualified \link{class type}{class} that |
5247 | 5246 | has all of the following properties: |
5248 | 5247 | \begin{itemize} |
5249 | 5248 | \item it has a constexpr destructor\iref{dcl.constexpr}, |
|
5277 | 5276 | Two types \cvqual{cv1} \tcode{T1} and \cvqual{cv2} \tcode{T2} are |
5278 | 5277 | \defnadjx{layout-compatible}{types}{type} |
5279 | 5278 | if \tcode{T1} and \tcode{T2} are the same type, |
5280 | | -layout-compatible enumerations\iref{dcl.enum}, or |
5281 | | -layout-compatible standard-layout class types\iref{class.mem}. |
| 5279 | +\deflinkx{layout-compatible enumerations}{layout-compatible!enumeration}{dcl.enum}, or |
| 5280 | +\deflinkx{layout-compatible standard-layout class types}{layout-compatible!class}{class.mem}. |
5282 | 5281 |
|
5283 | 5282 | \pnum |
5284 | 5283 | A type is \defn{consteval-only} if it is either |
|
5831 | 5830 | which identify members of a given |
5832 | 5831 | type within objects of a given class, \ref{dcl.mptr}. |
5833 | 5832 | Pointers to data members and pointers to member functions are collectively |
5834 | | -called \term{pointer-to-member} types. |
| 5833 | +called \defn{pointer-to-member} types. |
5835 | 5834 | \end{itemize} |
5836 | 5835 |
|
5837 | 5836 | \pnum |
|
5909 | 5908 | have the same value representation and alignment |
5910 | 5909 | requirements\iref{basic.align}. |
5911 | 5910 | \begin{note} |
5912 | | -Pointers to over-aligned types\iref{basic.align} have no special |
| 5911 | +Pointers to \deflinkx{over-aligned types}{type!over-aligned}{basic.align} have no special |
5913 | 5912 | representation, but their range of valid values is restricted by the extended |
5914 | 5913 | alignment requirement. |
5915 | 5914 | \end{note} |
|
6224 | 6223 | \indextext{program execution|(} |
6225 | 6224 |
|
6226 | 6225 | \pnum |
6227 | | -An instance of each object with automatic storage |
6228 | | -duration\iref{basic.stc.auto} is associated with each entry into its |
| 6226 | +An instance of each object with \link{automatic storage |
| 6227 | +duration}{basic.stc.auto} is associated with each entry into its |
6229 | 6228 | block. Such an object exists and retains its last-stored value during |
6230 | 6229 | the execution of the block and while the block is suspended (by a call |
6231 | 6230 | of a function, suspension of a coroutine\iref{expr.await}, or receipt of a signal). |
|
6270 | 6269 | the initialization of the entities captured by copy and |
6271 | 6270 | the constituent expressions of the \grammarterm{initializer} of the \grammarterm{init-capture}{s}, |
6272 | 6271 | \item |
6273 | | -if $E$ is a function call\iref{expr.call} or implicitly invokes a function, |
| 6272 | +if $E$ is a \link{function call}{expr.call} or implicitly invokes a function, |
6274 | 6273 | the constituent expressions of each default argument\iref{dcl.fct.default} |
6275 | 6274 | used in the call, or |
6276 | 6275 | \item |
|
6301 | 6300 | A \defn{full-expression} is |
6302 | 6301 | \begin{itemize} |
6303 | 6302 | \item |
6304 | | -an unevaluated operand\iref{expr.context}, |
| 6303 | +an \deflink{unevaluated operand}{expr.context}, |
6305 | 6304 | \item |
6306 | 6305 | a \grammarterm{constant-expression}\iref{expr.const}, |
6307 | 6306 | \item |
|
0 commit comments