diff --git a/source/declarators.tex b/source/declarators.tex index 5c884c27cb..9c7c081194 100644 --- a/source/declarators.tex +++ b/source/declarators.tex @@ -673,12 +673,10 @@ \pnum -\indextext{lvalue reference}% -\indextext{rvalue reference}% A reference type that is declared using \tcode{\&} is called an -\term{lvalue reference}, and a reference type that +\defn{lvalue reference}, and a reference type that is declared using \tcode{\&\&} is called an -\term{rvalue reference}. Lvalue references and +\defn{rvalue reference}. Lvalue references and rvalue references are distinct types. Except where explicitly noted, they are semantically equivalent and commonly referred to as references. @@ -2943,8 +2941,7 @@ \end{note} \pnum -\indextext{aggregate!elements}% -The \term{elements} of an aggregate are: +The \defnx{elements}{aggregate!elements} of an aggregate are: \begin{itemize} \item for an array, the array elements in increasing subscript order, or diff --git a/source/derived.tex b/source/derived.tex index 29ed414d82..e9ecd40728 100644 --- a/source/derived.tex +++ b/source/derived.tex @@ -59,8 +59,7 @@ an incompletely defined class (Clause~\ref{class}). The class denoted by the \grammarterm{class-or-decltype} of a \grammarterm{base-specifier} is called a -\indextext{base class!direct}% -\term{direct base class} +\defnx{direct base class}{base class!direct} for the class being defined. \indextext{base class}% \indextext{derivation|see{inheritance}}% @@ -69,8 +68,7 @@ \grammarterm{class-name}, the program is ill-formed. A class \tcode{B} is a base class of a class \tcode{D} if it is a direct base class of \tcode{D} or a direct base class of one of \tcode{D}'s base classes. -\indextext{base class!indirect}% -A class is an \term{indirect} base class of another if it is a base +A class is an \defnx{indirect}{base class!indirect} base class of another if it is a base class but not a direct base class. A class is said to be (directly or indirectly) \term{derived} from its (direct or indirect) base classes. @@ -82,8 +80,7 @@ Unless redeclared in the derived class, members of a base class are also considered to be members of the derived class. Members of a base class other than constructors are said to be -\indextext{inheritance}% -\term{inherited} +\defnx{inherited}{inheritance} by the derived class. Constructors of a base class can also be inherited as described in~\ref{namespace.udecl}. Inherited members can be referred to in @@ -577,13 +574,12 @@ \rSec1[class.virtual]{Virtual functions}% \indextext{virtual function|(}% \indextext{type!polymorphic}% -\indextext{class!polymorphic} \pnum \begin{note} Virtual functions support dynamic binding and object-oriented programming. \end{note} A class that declares or inherits a virtual function is -called a \term{polymorphic class}. +called a \defnx{polymorphic class}{class!polymorphic}. \pnum If a virtual member function \tcode{vf} is declared in a class @@ -910,7 +906,6 @@ \indextext{virtual function|)} \rSec1[class.abstract]{Abstract classes}% -\indextext{class!abstract} \pnum \begin{note} @@ -922,15 +917,14 @@ \end{note} \pnum -An \term{abstract class} is a class that can be used only +An \defnx{abstract class}{class!abstract} is a class that can be used only as a base class of some other class; no objects of an abstract class can be created except as subobjects of a class derived from it. A class is abstract if it has at least one \term{pure virtual function}. \begin{note} Such a function might be inherited: see below. \end{note} -\indextext{virtual function!pure}% -A virtual function is specified \term{pure} by using a +A virtual function is specified \defnx{pure}{virtual function!pure} by using a \grammarterm{pure-specifier}~(\ref{class.mem}) in the function declaration in the class definition. \indextext{definition!pure virtual function}% diff --git a/source/expressions.tex b/source/expressions.tex index 62015dcbb7..e97bcb099b 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -3593,17 +3593,15 @@ type by calling the above-mentioned conversion function, and the converted operand is used in place of the original operand for the remainder of this section. -\indextext{object!delete}% In the first alternative -(\term{delete object}), the value of the operand of \tcode{delete} may +(\defnx{delete object}{object!delete}), the value of the operand of \tcode{delete} may be a null pointer value, a pointer to a non-array object created by a previous \grammarterm{new-expression}, or a pointer to a subobject~(\ref{intro.object}) representing a base class of such an object (Clause~\ref{class.derived}). If not, the behavior is undefined. \indextext{array!\idxcode{delete}}% -\indextext{\idxcode{delete}!array}% -In the second alternative (\term{delete array}), the value of the +In the second alternative (\defnx{delete array}{\idxcode{delete}!array}), the value of the operand of \tcode{delete} may be a null pointer value or a pointer value that resulted from @@ -5199,8 +5197,7 @@ the conversion sequence contains only the conversions above. \pnum -\indextext{expression!constant}% -A \term{constant expression} is either +A \defnx{constant expression}{expression!constant} is either a glvalue core constant expression that refers to an entity that is a permitted result of a constant expression (as defined below), or a prvalue core constant expression whose value diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 04a2b17977..6d37df3d5e 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -510,14 +510,10 @@ For non-reserved replacement and handler functions, Clause~\ref{language.support} specifies two behaviors for the functions in question: their required and default behavior. -The -\term{default behavior} +The \defnx{default behavior}{behavior!default} describes a function definition provided by the implementation. -\indextext{behavior!default}% -The -\term{required behavior} +The \defnx{required behavior}{behavior!required} describes the semantics of a function definition provided by -\indextext{behavior!required}% either the implementation or a \Cpp program. Where no distinction is explicitly made in the description, the behavior described is the required behavior. @@ -598,8 +594,7 @@ \pnum Several types defined in Clause~\ref{input.output} are -\term{enumerated types}. -\indextext{type!enumerated}% +\defnx{enumerated types}{type!enumerated}. Each enumerated type may be implemented as an enumeration or as a synonym for an enumeration.\footnote{Such as an integer type, with constant integer values~(\ref{basic.fundamental}).} @@ -630,8 +625,7 @@ \pnum Several types defined in Clauses~\ref{\firstlibchapter} through~\ref{\lastlibchapter} and Annex~\ref{depr} are -\term{bitmask types}. -\indextext{type!bitmask}% +\defnx{bitmask types}{type!bitmask}. Each bitmask type can be implemented as an enumerated type that overloads certain operators, as an integer type, or as a @@ -731,9 +725,8 @@ uppercase letters in the basic execution character set. \item The -\term{decimal-point character} +\defnx{decimal-point character}{character!decimal-point} is the -\indextext{character!decimal-point}% (single-byte) character used by functions that convert between a (single-byte) character sequence and a value of one of the floating-point types. It is used @@ -781,9 +774,8 @@ \pnum A -\indextext{string!null-terminated byte}% \indextext{NTBS}% -\term{null-terminated byte string}, +\defnx{null-terminated byte string}{string!null-terminated byte}, or \ntbs, is a character sequence whose highest-addressed element with defined content has the value zero @@ -820,8 +812,7 @@ \pnum A \indextext{NTBS}% -\indextext{NTBS!static}% -\term{static} \ntbs +\defnx{static}{NTBS!static} \ntbs is an \ntbs with static storage duration.\footnote{A string literal, such as \tcode{"abc"}, @@ -842,9 +833,8 @@ \pnum A -\term{static} \ntmbs +\defnx{static}{NTMBS!static} \ntmbs is an \ntmbs with static storage duration. -\indextext{NTMBS!static}% \indextext{NTMBS}% \rSec3[functions.within.classes]{Functions within classes} @@ -1268,11 +1258,10 @@ \pnum Two kinds of implementations are defined: -\term{hosted} +\defnx{hosted}{implementation!hosted} and \term{freestanding}~(\ref{intro.compliance}). For a hosted implementation, this International Standard -\indextext{implementation!hosted}% describes the set of available headers. \pnum diff --git a/source/special.tex b/source/special.tex index 6123ff6b80..41600dfb7d 100644 --- a/source/special.tex +++ b/source/special.tex @@ -150,10 +150,9 @@ \pnum \indextext{constructor!inheritance of}% -\indextext{constructor!default}% \indextext{constructor!non-trivial}% A -\term{default} +\defnx{default}{constructor!default} constructor for a class \tcode{X} is a constructor of class @@ -236,11 +235,10 @@ \defnx{non-trivial}{constructor!default!non-trivial}. \pnum -\indextext{constructor!implicitly defined}% A default constructor that is defaulted and not defined as deleted is -\term{implicitly defined} +\defnx{implicitly defined}{constructor!implicitly defined} when it is odr-used~(\ref{basic.def.odr}) to create an object of its class type~(\ref{intro.object}) or when it is explicitly defaulted after its first declaration. @@ -657,14 +655,13 @@ \pnum \indextext{conversion!class}% -\indextext{conversion!user-defined}% \indextext{constructor, conversion by|see{conversion, user-defined}}% \indextext{conversion function|see{conversion, user-defined}}% \indextext{conversion!implicit}% Type conversions of class objects can be specified by constructors and by conversion functions. These conversions are called -\term{user-defined conversions} +\defnx{user-defined conversions}{conversion!user-defined} and are used for implicit type conversions (Clause~\ref{conv}), for initialization~(\ref{dcl.init}), and for explicit type conversions~(\ref{expr.cast}, \ref{expr.static.cast}). @@ -735,8 +732,7 @@ the types of its parameters (if any) to the type of its class. Such a constructor is called a -\indexdefn{constructor!converting}% -\term{converting constructor}. +\defnx{converting constructor}{constructor!converting}. \begin{example} \indextext{Jessie}% @@ -1047,11 +1043,10 @@ \defnx{non-trivial}{destructor!non-trivial}. \pnum -\indextext{destructor!implicitly defined}% A destructor that is defaulted and not defined as deleted is -\term{implicitly defined} +\defnx{implicitly defined}{destructor!implicitly defined} when it is odr-used~(\ref{basic.def.odr}) or when it is explicitly defaulted after its first declaration. @@ -2543,9 +2538,8 @@ \end{example} \pnum -\indextext{constructor!copy!implicitly declared}% If the class definition does not explicitly declare a copy constructor, -a non-explicit one is declared \term{implicitly}. +a non-explicit one is declared \defnx{implicitly}{constructor!copy!implicitly declared}. If the class definition declares a move constructor or move assignment operator, the implicitly declared copy constructor is defined as deleted; otherwise, it is defined as @@ -2792,9 +2786,9 @@ \end{note} \pnum -\indextext{assignment operator!copy!implicitly declared}% If the class definition does not explicitly declare a copy assignment operator, -one is declared \term{implicitly}. If the class definition declares a move +one is declared \defnx{implicitly}{assignment operator!copy!implicitly declared}. +If the class definition declares a move constructor or move assignment operator, the implicitly declared copy assignment operator is defined as deleted; otherwise, it is defined as defaulted~(\ref{dcl.fct.def}). diff --git a/source/strings.tex b/source/strings.tex index 4a0bfb8102..dbeb0063ae 100644 --- a/source/strings.tex +++ b/source/strings.tex @@ -6,9 +6,9 @@ \pnum This Clause describes components for manipulating sequences of any non-array POD~(\ref{basic.types}) type. -Such types are called \term{char-like types},\indextext{char-like type} +Such types are called \defnx{char-like types}{char-like type}, and objects of -char-like types are called \term{char-like objects}\indextext{char-like object} or +char-like types are called \defnx{char-like objects}{char-like object} or simply \term{characters}. \pnum diff --git a/source/threads.tex b/source/threads.tex index 411e961788..47de038ece 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -4261,7 +4261,7 @@ \begin{itemdescr} \pnum -\effects Constructs an \indexdefn{empty \tcode{future} object}\term{empty} +\effects Constructs an \defnx{empty}{empty \tcode{future} object} \tcode{future} object that does not refer to a shared state. @@ -4547,8 +4547,8 @@ \begin{itemdescr} \pnum -\effects Constructs an \indexdefn{empty \tcode{shared_future} -object}\term{empty} \tcode{shared_future} object that does not refer to a +\effects Constructs an \defnx{empty}{empty \tcode{shared_future} object} +\tcode{shared_future} object that does not refer to a shared state. \pnum diff --git a/source/utilities.tex b/source/utilities.tex index 1ba9aa14d7..20db7d6799 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -12890,7 +12890,7 @@ \rSec1[function.objects]{Function objects} \pnum -A \indexdefn{function object!type}\term{function object type} is an object +A \defnx{function object type}{function object!type} is an object type~(\ref{basic.types}) that can be the type of the \grammarterm{postfix-expression} in a function call (\ref{expr.call},~\ref{over.match.call}).\footnote{Such a type is a function @@ -13068,30 +13068,24 @@ The following definitions apply to this Clause: \pnum -\indexdefn{call signature}% -A \term{call signature} is the name of a return type followed by a +A \defn{call signature} is the name of a return type followed by a parenthesized comma-separated list of zero or more argument types. \pnum -\indexdefn{callable type}% -A \term{callable type} is a function object type~(\ref{function.objects}) or a pointer to member. +A \defn{callable type} is a function object type~(\ref{function.objects}) or a pointer to member. \pnum -\indexdefn{callable object}% -A \term{callable object} is an object of a callable type. +A \defn{callable object} is an object of a callable type. \pnum -\indexdefn{call wrapper!type}% -A \term{call wrapper type} is a type that holds a callable object +A \defnx{call wrapper type}{call wrapper!type} is a type that holds a callable object and supports a call operation that forwards to that object. \pnum -\indexdefn{call wrapper}% -A \term{call wrapper} is an object of a call wrapper type. +A \defn{call wrapper} is an object of a call wrapper type. \pnum -\indexdefn{target object}% -A \term{target object} is the callable object held by a call wrapper. +A \defn{target object} is the callable object held by a call wrapper. \rSec2[func.require]{Requirements} @@ -13139,16 +13133,14 @@ \indextext{call wrapper}% \indextext{call wrapper!simple}% \indextext{call wrapper!forwarding}% -\indextext{simple call wrapper}% -\indextext{forwarding call wrapper}% Every call wrapper~(\ref{func.def}) shall be \tcode{MoveConstructible}. -A \term{forwarding call wrapper} is a +A \defn{forwarding call wrapper} is a call wrapper that can be called with an arbitrary argument list and delivers the arguments to the wrapped callable object as references. This forwarding step shall ensure that rvalue arguments are delivered as rvalue references and lvalue arguments are delivered as lvalue references. -A \term{simple call wrapper} is a forwarding call wrapper that is +A \defn{simple call wrapper} is a forwarding call wrapper that is \tcode{CopyConstructible} and \tcode{CopyAssignable} and whose copy constructor, move constructor, and assignment operator do not throw exceptions.