|
158 | 158 | \indextext{linkage}%
|
159 | 159 | A name used in more than one translation unit can potentially
|
160 | 160 | refer to the same entity in these translation units depending on the
|
161 |
| -linkage\iref{basic.link} of the name specified in each |
| 161 | +\link{linkage}{basic.link} of the name specified in each |
162 | 162 | translation unit.
|
163 | 163 |
|
164 | 164 | \rSec1[basic.def]{Declarations and definitions}
|
|
181 | 181 | \item a static assertion\iref{dcl.pre},
|
182 | 182 | \item controlling template instantiation\iref{temp.explicit},
|
183 | 183 | \item guiding template argument deduction for constructors\iref{temp.deduct.guide},
|
184 |
| -\item use of attributes\iref{dcl.attr}, and |
| 184 | +\item use of \link{attributes}{dcl.attr}, and |
185 | 185 | \item nothing (in the case of an \grammarterm{empty-declaration}).
|
186 | 186 | \end{itemize}
|
187 | 187 |
|
|
267 | 267 | \item it is
|
268 | 268 | an explicit instantiation declaration\iref{temp.explicit}, or
|
269 | 269 | \item it is
|
270 |
| -an explicit specialization\iref{temp.expl.spec} whose |
| 270 | +an \link{explicit specialization}{temp.expl.spec} whose |
271 | 271 | \grammarterm{declaration} is not a definition.
|
272 | 272 | \end{itemize}
|
273 | 273 | A declaration is said to be a \defn{definition} of each entity that it defines.
|
|
309 | 309 | default constructor\iref{class.default.ctor},
|
310 | 310 | copy constructor, move constructor\iref{class.copy.ctor},
|
311 | 311 | copy assignment operator, move assignment operator\iref{class.copy.assign},
|
312 |
| -or destructor\iref{class.dtor} member functions. |
| 312 | +or \link{destructor}{class.dtor} member functions. |
313 | 313 | \end{note}
|
314 | 314 | \begin{example}
|
315 | 315 | Given
|
|
394 | 394 | an \grammarterm{id-expression}\iref{expr.prim.id} or
|
395 | 395 | a \grammarterm{splice-expression}\iref{expr.prim.splice}, the set
|
396 | 396 | contains only $E$.
|
397 |
| -\item If $E$ is a subscripting operation\iref{expr.sub} with |
| 397 | +\item If $E$ is a \link{subscripting}{expr.sub} operation with |
398 | 398 | an array operand, the set contains the potential results of that operand.
|
399 | 399 | \item If $E$ is a class member access
|
400 | 400 | expression\iref{expr.ref} of the form
|
|
404 | 404 | \item If $E$ is a class member access expression
|
405 | 405 | naming a static data member,
|
406 | 406 | the set contains the \grammarterm{id-expression} designating the data member.
|
407 |
| -\item If $E$ is a pointer-to-member |
408 |
| -expression\iref{expr.mptr.oper} of the form |
| 407 | +\item If $E$ is a \link{pointer-to-member expression}{expr.mptr.oper} of the form |
409 | 408 | $E_1$ \tcode{.*} $E_2$,
|
410 | 409 | the set contains the potential results of $E_1$.
|
411 | 410 | \item If $E$ has the form \tcode{($E_1$)}, the set contains the
|
412 | 411 | potential results of $E_1$.
|
413 |
| -\item If $E$ is a glvalue conditional |
414 |
| -expression\iref{expr.cond}, the set is the union of the sets of |
| 412 | +\item If $E$ is a glvalue \link{conditional expression}{expr.cond}, |
| 413 | +the set is the union of the sets of |
415 | 414 | potential results of the second and third operands.
|
416 |
| -\item If $E$ is a comma expression\iref{expr.comma}, the set |
| 415 | +\item If $E$ is a \link{comma expression}{expr.comma}, the set |
417 | 416 | contains the potential results of the right operand.
|
418 | 417 | \item Otherwise, the set is empty.
|
419 | 418 | \end{itemize}
|
|
575 | 574 | copy assignment or move assignment function for another class as specified
|
576 | 575 | in~\ref{class.copy.assign}.
|
577 | 576 | A constructor for a class is odr-used as specified
|
578 |
| -in~\ref{dcl.init}. A destructor for a class is odr-used if it is potentially |
579 |
| -invoked\iref{class.dtor}. |
| 577 | +in~\ref{dcl.init}. A destructor for a class is odr-used if it is |
| 578 | +\deflink{potentially invoked}{class.dtor}. |
580 | 579 |
|
581 | 580 | \pnum
|
582 | 581 | A local entity\iref{basic.pre}
|
|
648 | 647 | \pnum
|
649 | 648 | Every program shall contain at least one definition of every
|
650 | 649 | function or variable that is odr-used in that program
|
651 |
| -outside of a discarded statement\iref{stmt.if}; no diagnostic required. |
| 650 | +outside of a \deflink{discarded statement}{stmt.if}; no diagnostic required. |
652 | 651 | The definition can appear explicitly in the program, it can be found in
|
653 | 652 | the standard or a user-defined library, or (when appropriate) it is
|
654 | 653 | implicitly defined (see~\ref{class.default.ctor}, \ref{class.copy.ctor},
|
|
696 | 695 | describe in which contexts complete class types are required. A class
|
697 | 696 | type \tcode{T} must be complete if
|
698 | 697 | \begin{itemize}
|
699 |
| -\item an object of type \tcode{T} is defined\iref{basic.def}, or |
700 |
| -\item a non-static class data member of type \tcode{T} is |
701 |
| -declared\iref{class.mem}, or |
| 698 | +\item an object of type \tcode{T} is \link{defined}{basic.def}, or |
| 699 | +\item a non-static class \deflink{data member}{class.mem} of |
| 700 | +type \tcode{T} is declared, or |
702 | 701 | \item \tcode{T} is used as the allocated type or array element type in a
|
703 | 702 | \grammarterm{new-expression}\iref{expr.new}, or
|
704 | 703 | \item an lvalue-to-rvalue conversion is applied to
|
|
718 | 717 | \keyword{sizeof} operator\iref{expr.sizeof} is applied to an operand of
|
719 | 718 | type \tcode{T}, or
|
720 | 719 | \item a function with a return type or argument type of type \tcode{T}
|
721 |
| -is defined\iref{basic.def} or called\iref{expr.call}, or |
| 720 | +is defined\iref{basic.def} or \link{called}{expr.call}, or |
722 | 721 | \item a class with a base class of type \tcode{T} is
|
723 | 722 | defined\iref{class.derived}, or
|
724 | 723 | \item an lvalue of type \tcode{T} is assigned to\iref{expr.assign}, or
|
|
773 | 772 | a non-volatile const object with internal or no linkage if the object
|
774 | 773 | \begin{itemize}
|
775 | 774 | \item has the same literal type in all definitions of \tcode{D},
|
776 |
| -\item is initialized with a constant expression\iref{expr.const}, |
| 775 | +\item is initialized with a \link{constant expression}{expr.const}, |
777 | 776 | \item is not odr-used in any definition of \tcode{D}, and
|
778 | 777 | \item has the same value in all definitions of \tcode{D},
|
779 | 778 | \end{itemize}
|
|
2879 | 2878 | \pnum
|
2880 | 2879 | \indextext{program}%
|
2881 | 2880 | \indextext{linking}%
|
2882 |
| -A \defn{program} consists of one or more translation units\iref{lex.separate} |
| 2881 | +A \defn{program} consists of one or more \deflinkx{translation units}{translation unit}{lex.separate} |
2883 | 2882 | linked together. A translation unit consists
|
2884 | 2883 | of a sequence of declarations.
|
2885 | 2884 |
|
|
2912 | 2911 | \indextext{linkage!\idxcode{inline} and}%
|
2913 | 2912 | \indextext{\idxcode{inline}!linkage of}%
|
2914 | 2913 | The name of an entity
|
2915 |
| -that belongs to a namespace scope\iref{basic.scope.namespace} |
| 2914 | +that belongs to a \link{namespace scope}{basic.scope.namespace} |
2916 | 2915 | has internal linkage if it is the name of
|
2917 | 2916 | \begin{itemize}
|
2918 | 2917 | \item
|
|
2953 | 2952 | purposes\iref{dcl.typedef}; or
|
2954 | 2953 | \item
|
2955 | 2954 | \indextext{enumeration!linkage of}%
|
2956 |
| -a named enumeration\iref{dcl.enum}, or an unnamed enumeration defined |
| 2955 | +a named \link{enumeration}{dcl.enum}, or an unnamed enumeration defined |
2957 | 2956 | in a typedef declaration in which the enumeration has the typedef name
|
2958 | 2957 | for linkage purposes\iref{dcl.typedef}; or
|
2959 | 2958 | \item an unnamed enumeration
|
|
3029 | 3028 | \pnum
|
3030 | 3029 | \indextext{linkage!no}%
|
3031 | 3030 | Names not covered by these rules have no linkage. Moreover, except as
|
3032 |
| -noted, a name declared at block scope\iref{basic.scope.block} has no |
| 3031 | +noted, a name declared at \deflinkx{block scope}{scope!block}{basic.scope.block} has no |
3033 | 3032 | linkage.
|
3034 | 3033 |
|
3035 | 3034 | \pnum
|
|
3387 | 3386 | involve additional memory locations that are not accessible to programs but are
|
3388 | 3387 | managed by the implementation.
|
3389 | 3388 | \end{note}
|
3390 |
| -Two or more threads of |
3391 |
| -execution\iref{intro.multithread} can access separate memory |
| 3389 | +Two or more \deflinkx{threads of |
| 3390 | +execution}{thread of execution}{intro.multithread} can access separate memory |
3392 | 3391 | locations without interfering with each other.
|
3393 | 3392 |
|
3394 | 3393 | \pnum
|
|
3432 | 3431 | The constructs in a \Cpp{} program create, destroy, refer to, access, and
|
3433 | 3432 | manipulate objects.
|
3434 | 3433 | An \defn{object} is created
|
3435 |
| -by a definition\iref{basic.def}, |
| 3434 | +by a \link{definition}{basic.def}, |
3436 | 3435 | by a \grammarterm{new-expression}\iref{expr.new},
|
3437 | 3436 | by an operation that implicitly creates objects (see below),
|
3438 |
| -when implicitly changing the active member of a union\iref{class.union}, |
| 3437 | +when implicitly changing the active member of a \link{union}{class.union}, |
3439 | 3438 | or
|
3440 | 3439 | when a temporary object is created\iref{conv.rval,class.temporary}.
|
3441 | 3440 | An object occupies a region of storage
|
3442 | 3441 | in its period of construction\iref{class.cdtor},
|
3443 |
| -throughout its lifetime\iref{basic.life}, |
| 3442 | +throughout its \link{lifetime}{basic.life}, |
3444 | 3443 | and
|
3445 | 3444 | in its period of destruction\iref{class.cdtor}.
|
3446 | 3445 | \begin{note}
|
|
3570 | 3569 | \begin{itemize}
|
3571 | 3570 | \item a base class subobject, or
|
3572 | 3571 | \item a non-static data member
|
3573 |
| -declared with the \tcode{no_unique_address} attribute\iref{dcl.attr.nouniqueaddr}. |
| 3572 | +declared with the \link{\tcode{no_unique_address}}{dcl.attr.nouniqueaddr} attribute. |
3574 | 3573 | \end{itemize}
|
3575 | 3574 |
|
3576 | 3575 | \pnum
|
|
3591 | 3590 | are \impldef{which non-standard-layout objects
|
3592 | 3591 | containing no data are considered empty}.
|
3593 | 3592 | \indextext{most derived object!bit-field}%
|
3594 |
| -Unless it is a bit-field\iref{class.bit}, |
| 3593 | +Unless it is a \link{bit-field}{class.bit}, |
3595 | 3594 | an object with nonzero size
|
3596 | 3595 | shall occupy one or more bytes of storage,
|
3597 | 3596 | including every byte that is occupied in full or in part
|
|
4163 | 4162 | is produced by the evaluation of:
|
4164 | 4163 | \begin{itemize}
|
4165 | 4164 | \item
|
4166 |
| - the second or third operand of a conditional expression\iref{expr.cond}, |
| 4165 | + the second or third operand of a \link{conditional expression}{expr.cond}, |
4167 | 4166 | \item
|
4168 |
| - the right operand of a comma expression\iref{expr.comma}, |
| 4167 | + the right operand of a \link{comma expression}{expr.comma}, |
4169 | 4168 | \item
|
4170 | 4169 | the operand of a cast or conversion\iref{conv.integral,
|
4171 | 4170 | expr.type.conv,expr.static.cast,expr.cast}
|
4172 | 4171 | to an unsigned ordinary character type
|
4173 | 4172 | or \tcode{std::byte} type\iref{cstddef.syn}, or
|
4174 | 4173 | \item
|
4175 |
| - a discarded-value expression\iref{expr.context}, |
| 4174 | + a \deflink{discarded-value expression}{expr.context}, |
4176 | 4175 | \end{itemize}
|
4177 | 4176 | then the result of the operation is an indeterminate value or
|
4178 | 4177 | that erroneous value, respectively.
|
|
4363 | 4362 | \indextext{storage duration!dynamic|(}
|
4364 | 4363 |
|
4365 | 4364 | \pnum
|
4366 |
| -Objects can be created dynamically during program |
4367 |
| -execution\iref{intro.execution}, using |
| 4365 | +Objects can be created dynamically during \link{program |
| 4366 | +execution}{intro.execution}, using |
4368 | 4367 | \indextext{\idxcode{new}}%
|
4369 | 4368 | \grammarterm{new-expression}{s}\iref{expr.new}, and destroyed using
|
4370 | 4369 | \indextext{\idxcode{delete}}%
|
|
4528 | 4527 | \tcode{std::bad_alloc}\iref{bad.alloc}.
|
4529 | 4528 |
|
4530 | 4529 | \pnum
|
4531 |
| -A global allocation function is only called as the result of a new |
4532 |
| -expression\iref{expr.new}, or called directly using the function call |
4533 |
| -syntax\iref{expr.call}, or called indirectly to allocate storage for |
| 4530 | +A global allocation function is only called as the result of a \link{new |
| 4531 | +expression}{expr.new}, or called directly using the \link{function call}{expr.call} |
| 4532 | +syntax, or called indirectly to allocate storage for |
4534 | 4533 | a coroutine state\iref{dcl.fct.def.coroutine},
|
4535 | 4534 | or called indirectly through calls to the
|
4536 | 4535 | functions in the \Cpp{} standard library.
|
|
5036 | 5035 | impose requirements on implementations regarding the representation
|
5037 | 5036 | of types.
|
5038 | 5037 | There are two kinds of types: fundamental types and compound types.
|
5039 |
| -Types describe objects\iref{intro.object}, |
5040 |
| -references\iref{dcl.ref}, |
5041 |
| -or functions\iref{dcl.fct}. |
| 5038 | +Types describe \link{objects}{intro.object}, |
| 5039 | +\link{references}{dcl.ref}, |
| 5040 | +or \link{functions}{dcl.fct}. |
5042 | 5041 | \end{note}
|
5043 | 5042 |
|
5044 | 5043 | \pnum
|
|
5212 | 5211 | pointer types, pointer-to-member types\iref{basic.compound},
|
5213 | 5212 | \tcode{std::meta::\brk{}info}, \tcode{std::nullptr_t},
|
5214 | 5213 | and
|
5215 |
| -cv-qualified\iref{basic.type.qualifier} versions of these |
| 5214 | +\link{cv-qualified}{basic.type.qualifier} versions of these |
5216 | 5215 | types are collectively called
|
5217 | 5216 | \defnadjx{scalar}{types}{type}.
|
5218 | 5217 | \label{term.trivially.copyable.type}%
|
|
5246 | 5245 | \item a scalar type; or
|
5247 | 5246 | \item a reference type; or
|
5248 | 5247 | \item an array of literal type; or
|
5249 |
| -\item a possibly cv-qualified class type\iref{class} that |
| 5248 | +\item a possibly cv-qualified \link{class type}{class} that |
5250 | 5249 | has all of the following properties:
|
5251 | 5250 | \begin{itemize}
|
5252 | 5251 | \item it has a constexpr destructor\iref{dcl.constexpr},
|
|
5280 | 5279 | Two types \cvqual{cv1} \tcode{T1} and \cvqual{cv2} \tcode{T2} are
|
5281 | 5280 | \defnadjx{layout-compatible}{types}{type}
|
5282 | 5281 | if \tcode{T1} and \tcode{T2} are the same type,
|
5283 |
| -layout-compatible enumerations\iref{dcl.enum}, or |
5284 |
| -layout-compatible standard-layout class types\iref{class.mem}. |
| 5282 | +\deflinkx{layout-compatible enumerations}{layout-compatible!enumeration}{dcl.enum}, or |
| 5283 | +\deflinkx{layout-compatible standard-layout class types}{layout-compatible!class}{class.mem}. |
5285 | 5284 |
|
5286 | 5285 | \pnum
|
5287 | 5286 | A type is \defn{consteval-only} if it is either
|
|
5834 | 5833 | which identify members of a given
|
5835 | 5834 | type within objects of a given class, \ref{dcl.mptr}.
|
5836 | 5835 | Pointers to data members and pointers to member functions are collectively
|
5837 |
| -called \term{pointer-to-member} types. |
| 5836 | +called \defn{pointer-to-member} types. |
5838 | 5837 | \end{itemize}
|
5839 | 5838 |
|
5840 | 5839 | \pnum
|
|
5912 | 5911 | have the same value representation and alignment
|
5913 | 5912 | requirements\iref{basic.align}.
|
5914 | 5913 | \begin{note}
|
5915 |
| -Pointers to over-aligned types\iref{basic.align} have no special |
| 5914 | +Pointers to \deflinkx{over-aligned types}{type!over-aligned}{basic.align} have no special |
5916 | 5915 | representation, but their range of valid values is restricted by the extended
|
5917 | 5916 | alignment requirement.
|
5918 | 5917 | \end{note}
|
|
6227 | 6226 | \indextext{program execution|(}
|
6228 | 6227 |
|
6229 | 6228 | \pnum
|
6230 |
| -An instance of each object with automatic storage |
6231 |
| -duration\iref{basic.stc.auto} is associated with each entry into its |
| 6229 | +An instance of each object with \link{automatic storage |
| 6230 | +duration}{basic.stc.auto} is associated with each entry into its |
6232 | 6231 | block. Such an object exists and retains its last-stored value during
|
6233 | 6232 | the execution of the block and while the block is suspended (by a call
|
6234 | 6233 | of a function, suspension of a coroutine\iref{expr.await}, or receipt of a signal).
|
|
6273 | 6272 | the initialization of the entities captured by copy and
|
6274 | 6273 | the constituent expressions of the \grammarterm{initializer} of the \grammarterm{init-capture}{s},
|
6275 | 6274 | \item
|
6276 |
| -if $E$ is a function call\iref{expr.call} or implicitly invokes a function, |
| 6275 | +if $E$ is a \link{function call}{expr.call} or implicitly invokes a function, |
6277 | 6276 | the constituent expressions of each default argument\iref{dcl.fct.default}
|
6278 | 6277 | used in the call, or
|
6279 | 6278 | \item
|
|
6304 | 6303 | A \defn{full-expression} is
|
6305 | 6304 | \begin{itemize}
|
6306 | 6305 | \item
|
6307 |
| -an unevaluated operand\iref{expr.context}, |
| 6306 | +an \deflink{unevaluated operand}{expr.context}, |
6308 | 6307 | \item
|
6309 | 6308 | a \grammarterm{constant-expression}\iref{expr.const},
|
6310 | 6309 | \item
|
|
0 commit comments