|
127 | 127 | \indextext{linkage}%
|
128 | 128 | A name used in more than one translation unit can potentially
|
129 | 129 | refer to the same entity in these translation units depending on the
|
130 |
| -linkage\iref{basic.link} of the name specified in each |
| 130 | +\link{linkage}{basic.link} of the name specified in each |
131 | 131 | translation unit.
|
132 | 132 |
|
133 | 133 | \rSec1[basic.def]{Declarations and definitions}
|
|
149 | 149 | \item a static assertion\iref{dcl.pre},
|
150 | 150 | \item controlling template instantiation\iref{temp.explicit},
|
151 | 151 | \item guiding template argument deduction for constructors\iref{temp.deduct.guide},
|
152 |
| -\item use of attributes\iref{dcl.attr}, and |
| 152 | +\item use of \link{attributes}{dcl.attr}, and |
153 | 153 | \item nothing (in the case of an \grammarterm{empty-declaration}).
|
154 | 154 | \end{itemize}
|
155 | 155 |
|
|
233 | 233 | \item it is
|
234 | 234 | an explicit instantiation declaration\iref{temp.explicit}, or
|
235 | 235 | \item it is
|
236 |
| -an explicit specialization\iref{temp.expl.spec} whose |
| 236 | +an \link{explicit specialization}{temp.expl.spec} whose |
237 | 237 | \grammarterm{declaration} is not a definition.
|
238 | 238 | \end{itemize}
|
239 | 239 | A declaration is said to be a \defn{definition} of each entity that it defines.
|
|
275 | 275 | default constructor\iref{class.default.ctor},
|
276 | 276 | copy constructor, move constructor\iref{class.copy.ctor},
|
277 | 277 | copy assignment operator, move assignment operator\iref{class.copy.assign},
|
278 |
| -or destructor\iref{class.dtor} member functions. |
| 278 | +or \link{destructor}{class.dtor} member functions. |
279 | 279 | \end{note}
|
280 | 280 | \begin{example}
|
281 | 281 | Given
|
|
359 | 359 | \item If $E$ is an
|
360 | 360 | \grammarterm{id-expression}\iref{expr.prim.id}, the set
|
361 | 361 | contains only $E$.
|
362 |
| -\item If $E$ is a subscripting operation\iref{expr.sub} with |
| 362 | +\item If $E$ is a \link{subscripting}{expr.sub} operation with |
363 | 363 | an array operand, the set contains the potential results of that operand.
|
364 | 364 | \item If $E$ is a class member access
|
365 | 365 | expression\iref{expr.ref} of the form
|
|
369 | 369 | \item If $E$ is a class member access expression
|
370 | 370 | naming a static data member,
|
371 | 371 | the set contains the \grammarterm{id-expression} designating the data member.
|
372 |
| -\item If $E$ is a pointer-to-member |
373 |
| -expression\iref{expr.mptr.oper} of the form |
| 372 | +\item If $E$ is a \link{pointer-to-member expression}{expr.mptr.oper} of the form |
374 | 373 | $E_1$ \tcode{.*} $E_2$,
|
375 | 374 | the set contains the potential results of $E_1$.
|
376 | 375 | \item If $E$ has the form \tcode{($E_1$)}, the set contains the
|
377 | 376 | potential results of $E_1$.
|
378 |
| -\item If $E$ is a glvalue conditional |
379 |
| -expression\iref{expr.cond}, the set is the union of the sets of |
| 377 | +\item If $E$ is a glvalue \link{conditional expression}{expr.cond}, |
| 378 | +the set is the union of the sets of |
380 | 379 | potential results of the second and third operands.
|
381 |
| -\item If $E$ is a comma expression\iref{expr.comma}, the set |
| 380 | +\item If $E$ is a \link{comma expression}{expr.comma}, the set |
382 | 381 | contains the potential results of the right operand.
|
383 | 382 | \item Otherwise, the set is empty.
|
384 | 383 | \end{itemize}
|
|
528 | 527 | copy assignment or move assignment function for another class as specified
|
529 | 528 | in~\ref{class.copy.assign}.
|
530 | 529 | A constructor for a class is odr-used as specified
|
531 |
| -in~\ref{dcl.init}. A destructor for a class is odr-used if it is potentially |
532 |
| -invoked\iref{class.dtor}. |
| 530 | +in~\ref{dcl.init}. A destructor for a class is odr-used if it is |
| 531 | +\deflink{potentially invoked}{class.dtor}. |
533 | 532 |
|
534 | 533 | \pnum
|
535 | 534 | A local entity\iref{basic.pre}
|
|
600 | 599 | \pnum
|
601 | 600 | Every program shall contain at least one definition of every
|
602 | 601 | function or variable that is odr-used in that program
|
603 |
| -outside of a discarded statement\iref{stmt.if}; no diagnostic required. |
| 602 | +outside of a \deflink{discarded statement}{stmt.if}; no diagnostic required. |
604 | 603 | The definition can appear explicitly in the program, it can be found in
|
605 | 604 | the standard or a user-defined library, or (when appropriate) it is
|
606 | 605 | implicitly defined (see~\ref{class.default.ctor}, \ref{class.copy.ctor},
|
|
648 | 647 | describe in which contexts complete class types are required. A class
|
649 | 648 | type \tcode{T} must be complete if
|
650 | 649 | \begin{itemize}
|
651 |
| -\item an object of type \tcode{T} is defined\iref{basic.def}, or |
652 |
| -\item a non-static class data member of type \tcode{T} is |
653 |
| -declared\iref{class.mem}, or |
| 650 | +\item an object of type \tcode{T} is \link{defined}{basic.def}, or |
| 651 | +\item a non-static class \deflink{data member}{class.mem} of |
| 652 | +type \tcode{T} is declared, or |
654 | 653 | \item \tcode{T} is used as the allocated type or array element type in a
|
655 | 654 | \grammarterm{new-expression}\iref{expr.new}, or
|
656 | 655 | \item an lvalue-to-rvalue conversion is applied to
|
|
670 | 669 | \keyword{sizeof} operator\iref{expr.sizeof} is applied to an operand of
|
671 | 670 | type \tcode{T}, or
|
672 | 671 | \item a function with a return type or argument type of type \tcode{T}
|
673 |
| -is defined\iref{basic.def} or called\iref{expr.call}, or |
| 672 | +is defined\iref{basic.def} or \link{called}{expr.call}, or |
674 | 673 | \item a class with a base class of type \tcode{T} is
|
675 | 674 | defined\iref{class.derived}, or
|
676 | 675 | \item an lvalue of type \tcode{T} is assigned to\iref{expr.assign}, or
|
|
716 | 715 | a non-volatile const object with internal or no linkage if the object
|
717 | 716 | \begin{itemize}
|
718 | 717 | \item has the same literal type in all definitions of \tcode{D},
|
719 |
| -\item is initialized with a constant expression\iref{expr.const}, |
| 718 | +\item is initialized with a \link{constant expression}{expr.const}, |
720 | 719 | \item is not odr-used in any definition of \tcode{D}, and
|
721 | 720 | \item has the same value in all definitions of \tcode{D},
|
722 | 721 | \end{itemize}
|
|
2690 | 2689 |
|
2691 | 2690 | \pnum
|
2692 | 2691 | \indextext{program}%
|
2693 |
| -A \defn{program} consists of one or more translation units\iref{lex.separate} |
| 2692 | +A \defn{program} consists of one or more \deflinkx{translation units}{translation unit}{lex.separate} |
2694 | 2693 | linked together. A translation unit consists
|
2695 | 2694 | of a sequence of declarations.
|
2696 | 2695 |
|
|
2723 | 2722 | \indextext{linkage!\idxcode{inline} and}%
|
2724 | 2723 | \indextext{\idxcode{inline}!linkage of}%
|
2725 | 2724 | The name of an entity
|
2726 |
| -that belongs to a namespace scope\iref{basic.scope.namespace} |
| 2725 | +that belongs to a \link{namespace scope}{basic.scope.namespace} |
2727 | 2726 | has internal linkage if it is the name of
|
2728 | 2727 | \begin{itemize}
|
2729 | 2728 | \item
|
|
2764 | 2763 | purposes\iref{dcl.typedef}; or
|
2765 | 2764 | \item
|
2766 | 2765 | \indextext{enumeration!linkage of}%
|
2767 |
| -a named enumeration\iref{dcl.enum}, or an unnamed enumeration defined |
| 2766 | +a named \link{enumeration}{dcl.enum}, or an unnamed enumeration defined |
2768 | 2767 | in a typedef declaration in which the enumeration has the typedef name
|
2769 | 2768 | for linkage purposes\iref{dcl.typedef}; or
|
2770 | 2769 | \item an unnamed enumeration
|
|
2840 | 2839 | \pnum
|
2841 | 2840 | \indextext{linkage!no}%
|
2842 | 2841 | Names not covered by these rules have no linkage. Moreover, except as
|
2843 |
| -noted, a name declared at block scope\iref{basic.scope.block} has no |
| 2842 | +noted, a name declared at \deflinkx{block scope}{scope!block}{basic.scope.block} has no |
2844 | 2843 | linkage.
|
2845 | 2844 |
|
2846 | 2845 | \pnum
|
|
3162 | 3161 | involve additional memory locations that are not accessible to programs but are
|
3163 | 3162 | managed by the implementation.
|
3164 | 3163 | \end{note}
|
3165 |
| -Two or more threads of |
3166 |
| -execution\iref{intro.multithread} can access separate memory |
| 3164 | +Two or more \deflinkx{threads of |
| 3165 | +execution}{thread of execution}{intro.multithread} can access separate memory |
3167 | 3166 | locations without interfering with each other.
|
3168 | 3167 |
|
3169 | 3168 | \pnum
|
|
3207 | 3206 | The constructs in a \Cpp{} program create, destroy, refer to, access, and
|
3208 | 3207 | manipulate objects.
|
3209 | 3208 | An \defn{object} is created
|
3210 |
| -by a definition\iref{basic.def}, |
| 3209 | +by a \link{definition}{basic.def}, |
3211 | 3210 | by a \grammarterm{new-expression}\iref{expr.new},
|
3212 | 3211 | by an operation that implicitly creates objects (see below),
|
3213 |
| -when implicitly changing the active member of a union\iref{class.union}, |
| 3212 | +when implicitly changing the active member of a \link{union}{class.union}, |
3214 | 3213 | or
|
3215 | 3214 | when a temporary object is created\iref{conv.rval,class.temporary}.
|
3216 | 3215 | An object occupies a region of storage
|
3217 | 3216 | in its period of construction\iref{class.cdtor},
|
3218 |
| -throughout its lifetime\iref{basic.life}, |
| 3217 | +throughout its \link{lifetime}{basic.life}, |
3219 | 3218 | and
|
3220 | 3219 | in its period of destruction\iref{class.cdtor}.
|
3221 | 3220 | \begin{note}
|
|
3345 | 3344 | \begin{itemize}
|
3346 | 3345 | \item a base class subobject, or
|
3347 | 3346 | \item a non-static data member
|
3348 |
| -declared with the \tcode{no_unique_address} attribute\iref{dcl.attr.nouniqueaddr}. |
| 3347 | +declared with the \link{\tcode{no_unique_address}}{dcl.attr.nouniqueaddr} attribute. |
3349 | 3348 | \end{itemize}
|
3350 | 3349 |
|
3351 | 3350 | \pnum
|
|
3366 | 3365 | are \impldef{which non-standard-layout objects
|
3367 | 3366 | containing no data are considered empty}.
|
3368 | 3367 | \indextext{most derived object!bit-field}%
|
3369 |
| -Unless it is a bit-field\iref{class.bit}, |
| 3368 | +Unless it is a \link{bit-field}{class.bit}, |
3370 | 3369 | an object with nonzero size
|
3371 | 3370 | shall occupy one or more bytes of storage,
|
3372 | 3371 | including every byte that is occupied in full or in part
|
|
3931 | 3930 | is produced by the evaluation of:
|
3932 | 3931 | \begin{itemize}
|
3933 | 3932 | \item
|
3934 |
| - the second or third operand of a conditional expression\iref{expr.cond}, |
| 3933 | + the second or third operand of a \link{conditional expression}{expr.cond}, |
3935 | 3934 | \item
|
3936 |
| - the right operand of a comma expression\iref{expr.comma}, |
| 3935 | + the right operand of a \link{comma expression}{expr.comma}, |
3937 | 3936 | \item
|
3938 | 3937 | the operand of a cast or conversion\iref{conv.integral,
|
3939 | 3938 | expr.type.conv,expr.static.cast,expr.cast}
|
3940 | 3939 | to an unsigned ordinary character type
|
3941 | 3940 | or \tcode{std::byte} type\iref{cstddef.syn}, or
|
3942 | 3941 | \item
|
3943 |
| - a discarded-value expression\iref{expr.context}, |
| 3942 | + a \deflink{discarded-value expression}{expr.context}, |
3944 | 3943 | \end{itemize}
|
3945 | 3944 | then the result of the operation is an indeterminate value or
|
3946 | 3945 | that erroneous value, respectively.
|
|
4131 | 4130 | \indextext{storage duration!dynamic|(}
|
4132 | 4131 |
|
4133 | 4132 | \pnum
|
4134 |
| -Objects can be created dynamically during program |
4135 |
| -execution\iref{intro.execution}, using |
| 4133 | +Objects can be created dynamically during \link{program |
| 4134 | +execution}{intro.execution}, using |
4136 | 4135 | \indextext{\idxcode{new}}%
|
4137 | 4136 | \grammarterm{new-expression}{s}\iref{expr.new}, and destroyed using
|
4138 | 4137 | \indextext{\idxcode{delete}}%
|
|
4301 | 4300 | \tcode{std::bad_alloc}\iref{bad.alloc}.
|
4302 | 4301 |
|
4303 | 4302 | \pnum
|
4304 |
| -A global allocation function is only called as the result of a new |
4305 |
| -expression\iref{expr.new}, or called directly using the function call |
4306 |
| -syntax\iref{expr.call}, or called indirectly to allocate storage for |
| 4303 | +A global allocation function is only called as the result of a \link{new |
| 4304 | +expression}{expr.new}, or called directly using the \link{function call}{expr.call} |
| 4305 | +syntax, or called indirectly to allocate storage for |
4307 | 4306 | a coroutine state\iref{dcl.fct.def.coroutine},
|
4308 | 4307 | or called indirectly through calls to the
|
4309 | 4308 | functions in the \Cpp{} standard library.
|
4310 | 4309 | \begin{note}
|
4311 | 4310 | In particular, a
|
4312 | 4311 | global allocation function is not called to allocate storage for objects
|
4313 |
| -with static storage duration\iref{basic.stc.static}, for objects or references |
4314 |
| -with thread storage duration\iref{basic.stc.thread}, for objects of |
4315 |
| -type \tcode{std::type_info}\iref{expr.typeid}, or for an |
4316 |
| -exception object\iref{except.throw}. |
| 4312 | +with \link{static storage duration}{basic.stc.static}, for objects or references |
| 4313 | +with \link{thread storage duration}{basic.stc.thread}, for objects of |
| 4314 | +type \link{\tcode{std::type_info}}{expr.typeid}, or for an |
| 4315 | +\link{exception object}{except.throw}. |
4317 | 4316 | \end{note}
|
4318 | 4317 |
|
4319 | 4318 | \rSec4[basic.stc.dynamic.deallocation]{Deallocation functions}
|
|
4777 | 4776 | impose requirements on implementations regarding the representation
|
4778 | 4777 | of types.
|
4779 | 4778 | There are two kinds of types: fundamental types and compound types.
|
4780 |
| -Types describe objects\iref{intro.object}, |
4781 |
| -references\iref{dcl.ref}, |
4782 |
| -or functions\iref{dcl.fct}. |
| 4779 | +Types describe \link{objects}{intro.object}, |
| 4780 | +\link{references}{dcl.ref}, |
| 4781 | +or \link{functions}{dcl.fct}. |
4783 | 4782 | \end{note}
|
4784 | 4783 |
|
4785 | 4784 | \pnum
|
|
4953 | 4952 | pointer types, pointer-to-member types\iref{basic.compound},
|
4954 | 4953 | \tcode{std::nullptr_t},
|
4955 | 4954 | and
|
4956 |
| -cv-qualified\iref{basic.type.qualifier} versions of these |
| 4955 | +\link{cv-qualified}{basic.type.qualifier} versions of these |
4957 | 4956 | types are collectively called
|
4958 | 4957 | \defnadjx{scalar}{types}{type}.
|
4959 | 4958 | \label{term.trivially.copyable.type}%
|
|
4978 | 4977 | \item a scalar type; or
|
4979 | 4978 | \item a reference type; or
|
4980 | 4979 | \item an array of literal type; or
|
4981 |
| -\item a possibly cv-qualified class type\iref{class} that |
| 4980 | +\item a possibly cv-qualified \link{class type}{class} that |
4982 | 4981 | has all of the following properties:
|
4983 | 4982 | \begin{itemize}
|
4984 | 4983 | \item it has a constexpr destructor\iref{dcl.constexpr},
|
|
5012 | 5011 | Two types \cvqual{cv1} \tcode{T1} and \cvqual{cv2} \tcode{T2} are
|
5013 | 5012 | \defnadjx{layout-compatible}{types}{type}
|
5014 | 5013 | if \tcode{T1} and \tcode{T2} are the same type,
|
5015 |
| -layout-compatible enumerations\iref{dcl.enum}, or |
5016 |
| -layout-compatible standard-layout class types\iref{class.mem}. |
| 5014 | +\deflinkx{layout-compatible enumerations}{layout-compatible!enumeration}{dcl.enum}, or |
| 5015 | +\deflinkx{layout-compatible standard-layout class types}{layout-compatible!class}{class.mem}. |
5017 | 5016 |
|
5018 | 5017 | \rSec2[basic.fundamental]{Fundamental types}
|
5019 | 5018 |
|
|
5461 | 5460 | which identify members of a given
|
5462 | 5461 | type within objects of a given class, \ref{dcl.mptr}.
|
5463 | 5462 | Pointers to data members and pointers to member functions are collectively
|
5464 |
| -called \term{pointer-to-member} types. |
| 5463 | +called \defn{pointer-to-member} types. |
5465 | 5464 | \end{itemize}
|
5466 | 5465 |
|
5467 | 5466 | \pnum
|
|
5539 | 5538 | have the same value representation and alignment
|
5540 | 5539 | requirements\iref{basic.align}.
|
5541 | 5540 | \begin{note}
|
5542 |
| -Pointers to over-aligned types\iref{basic.align} have no special |
| 5541 | +Pointers to \deflinkx{over-aligned types}{type!over-aligned}{basic.align} have no special |
5543 | 5542 | representation, but their range of valid values is restricted by the extended
|
5544 | 5543 | alignment requirement.
|
5545 | 5544 | \end{note}
|
|
5854 | 5853 | \indextext{program execution|(}
|
5855 | 5854 |
|
5856 | 5855 | \pnum
|
5857 |
| -An instance of each object with automatic storage |
5858 |
| -duration\iref{basic.stc.auto} is associated with each entry into its |
| 5856 | +An instance of each object with \link{automatic storage |
| 5857 | +duration}{basic.stc.auto} is associated with each entry into its |
5859 | 5858 | block. Such an object exists and retains its last-stored value during
|
5860 | 5859 | the execution of the block and while the block is suspended (by a call
|
5861 | 5860 | of a function, suspension of a coroutine\iref{expr.await}, or receipt of a signal).
|
|
5900 | 5899 | the initialization of the entities captured by copy and
|
5901 | 5900 | the constituent expressions of the \grammarterm{initializer} of the \grammarterm{init-capture}{s},
|
5902 | 5901 | \item
|
5903 |
| -if $E$ is a function call\iref{expr.call} or implicitly invokes a function, |
| 5902 | +if $E$ is a \link{function call}{expr.call} or implicitly invokes a function, |
5904 | 5903 | the constituent expressions of each default argument\iref{dcl.fct.default}
|
5905 | 5904 | used in the call, or
|
5906 | 5905 | \item
|
|
5931 | 5930 | A \defn{full-expression} is
|
5932 | 5931 | \begin{itemize}
|
5933 | 5932 | \item
|
5934 |
| -an unevaluated operand\iref{expr.context}, |
| 5933 | +an \deflink{unevaluated operand}{expr.context}, |
5935 | 5934 | \item
|
5936 | 5935 | a \grammarterm{constant-expression}\iref{expr.const},
|
5937 | 5936 | \item
|
|
0 commit comments