diff --git a/source/algorithms.tex b/source/algorithms.tex index ff4c3b38ed..00791a0999 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -335,7 +335,7 @@ another function invocation is specified to synchronize with it, and if it is not a memory allocation or deallocation function. \begin{note} -Implementations must ensure that internal synchronization +Implementations are expected to ensure that internal synchronization inside standard library functions does not prevent forward progress when those functions are executed by threads of execution with weakly parallel forward progress guarantees. diff --git a/source/basic.tex b/source/basic.tex index a6d708976f..768e384861 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -585,8 +585,8 @@ \end{example} \begin{note} The rules for declarations and expressions -describe in which contexts complete class types are required. A class -type \tcode{T} must be complete if: +describe in which contexts complete class types are required. +The program is ill-formed unless a class type \tcode{T} is complete if: \begin{itemize} \item an object of type \tcode{T} is defined\iref{basic.def}, or \item a non-static class data member of type \tcode{T} is @@ -1220,7 +1220,7 @@ The locus of a \grammarterm{concept-definition} is immediately after its \grammarterm{concept-name}\iref{temp.concept}. \begin{note} -The \grammarterm{constraint-expression} cannot use +It is not possible for the \grammarterm{constraint-expression} to use the \grammarterm{concept-name}. \end{note} @@ -1324,7 +1324,7 @@ A \grammarterm{parameter-declaration-clause} $P$ introduces a \defnadj{function parameter}{scope} that includes $P$. \begin{note} -A function parameter cannot be used for its value +It is not possible for a function parameter to be used for its value within the \grammarterm{parameter-declaration-clause}\iref{dcl.fct.default}. \end{note} \begin{itemize} @@ -4207,10 +4207,10 @@ struct D : virtual B { char c; }; \end{codeblock} -When \tcode{D} is the type of a complete object, it will have a subobject of -type \tcode{B}, so it must be aligned appropriately for a \tcode{\keyword{long} \keyword{double}}. +When \tcode{D} is the type of a complete object, it has a subobject of +type \tcode{B}, so it is aligned appropriately for a \tcode{\keyword{long} \keyword{double}}. If \tcode{D} appears as a subobject of another object that also has \tcode{B} -as a virtual base class, the \tcode{B} subobject might be part of a different +as a virtual base class, the \tcode{B} subobject can be part of a different subobject, reducing the alignment requirements on the \tcode{D} subobject. \end{example} The result of the \keyword{alignof} operator reflects the alignment @@ -6368,7 +6368,7 @@ \begin{note} The value observed by a load of an atomic depends on the ``happens before'' relation, which depends on the values observed by loads of atomics. -The intended reading is that there must exist an +The intended reading is that there exists an association of atomic loads with modifications they observe that, together with suitably chosen modification orders and the ``happens before'' relation derived as described above, satisfy the resulting constraints as imposed here. diff --git a/source/classes.tex b/source/classes.tex index 186a645fb4..002cf191fb 100644 --- a/source/classes.tex +++ b/source/classes.tex @@ -435,9 +435,10 @@ class A * A; \end{codeblock} first specifies \tcode{A} to be the name of a class and then redefines -it as the name of a pointer to an object of that class. This means that -the elaborated form \keyword{class} \tcode{A} must be used to refer to the -class. Such artistry with names can be confusing and is best avoided. +it as the name of a pointer to an object of that class. +This means references to the class are ill-formed +unless the elaborated form \keyword{class} \tcode{A} is used. +Such artistry with names can be confusing and is best avoided. \end{note} \pnum @@ -2226,7 +2227,7 @@ \end{codeblock} \end{example} \begin{note} -An explicit destructor call must always be written using +An explicit destructor call is always written using a member access operator\iref{expr.ref} or a \grammarterm{qualified-id}\iref{expr.prim.id.qual}; in particular, the \grammarterm{unary-expression} @@ -3106,9 +3107,10 @@ default constructor\iref{class.default.ctor}, copy constructor, move constructor\iref{class.copy.ctor}, copy assignment operator, move assignment operator\iref{class.copy.assign}, -or destructor\iref{class.dtor}, the corresponding member function -of the union must be user-provided or it will -be implicitly deleted\iref{dcl.fct.def.delete} for the union. +or destructor\iref{class.dtor}, +the corresponding member function of the union +will be implicitly deleted\iref{dcl.fct.def.delete} +unless it is user-provided. \begin{example} Consider the following union: \begin{codeblock} @@ -3122,8 +3124,8 @@ member functions, \tcode{U} will have an implicitly deleted default constructor, copy/move constructor, copy/move assignment operator, and destructor. -To use \tcode{U}, some or all of these member functions -must be user-provided. +A use \tcode{U} is ill-formed +unless some or all of these member functions are user-provided. \end{example} \end{note} @@ -4158,8 +4160,9 @@ void draw(); // a definition is required somewhere }; \end{codeblock} -would make class \tcode{circle} non-abstract and a definition of -\tcode{circle::draw()} must be provided. +would make class \tcode{circle} non-abstract; +the program is ill-formed, no diagnostic required, +unless a definition of \tcode{circle::draw()} is provided\iref{basic.def.odr}. \end{example} \pnum @@ -4348,14 +4351,14 @@ \tcode{A}. This implies, for example, that access checking on the first use of \tcode{A::I} -must be deferred until it is determined that this use of +is deferred until it is determined that this use of \tcode{A::I} is as the return type of a member of class \tcode{A}. Similarly, the use of \tcode{A::B} as a \grammarterm{base-specifier} is well-formed because \tcode{D} is derived from \tcode{A}, so checking of \grammarterm{base-specifier}{s} -must be deferred until the entire \grammarterm{base-specifier-list} has been seen. +is deferred until the entire \grammarterm{base-specifier-list} has been seen. \end{example} \pnum diff --git a/source/compatibility.tex b/source/compatibility.tex index 4e1948add1..60930a48ff 100644 --- a/source/compatibility.tex +++ b/source/compatibility.tex @@ -2508,8 +2508,8 @@ Semantic transformation. In \Cpp{}, the initializer for one of a set of mutually-referential file-local objects with static storage -duration must invoke a function -call to achieve the initialization. +duration is expected to invoke a function +to achieve the initialization. \howwide Seldom. @@ -2708,7 +2708,7 @@ \tcode{sizeof(char*)} in C. \difficulty -Programs must add explicit casts to the appropriate rvalue. +Programs need to add explicit casts to the appropriate rvalue. \howwide Rare. @@ -2744,7 +2744,7 @@ return-value mechanisms for the return of class objects. If some flow paths execute a return without specifying any value, -the implementation must embody many more complications. +the implementation gets more complicated. Besides, promising to return a value of a given type, and then not returning such a value, has always been recognized to be a questionable @@ -2803,7 +2803,7 @@ \diffref{dcl.typedef} \change -A \Cpp{} \grammarterm{typedef-name} must be different from any class type name declared +A \Cpp{} \grammarterm{typedef-name} needs to be different from any class type name declared in the same scope (except if the typedef is a synonym of the class name with the same name). In C, a \grammarterm{typedef-name} and a struct tag name declared in the same scope can have the same name (because they have different name spaces). @@ -2836,9 +2836,9 @@ \diffref{dcl.type} [see also \ref{basic.link}] \change -Const objects must be initialized in \Cpp{} but can be left uninitialized in C. +Const objects need to be initialized in \Cpp{} but can be left uninitialized in C. \rationale -A const object cannot be assigned to so it must be initialized +A const object cannot be assigned to so it needs to be initialized to hold a useful value. \effect Deletion of semantically well-defined feature. @@ -2888,8 +2888,8 @@ This feature was marked as ``obsolescent'' in C. \difficulty Syntactic transformation. -The function declarations using C incomplete declaration style must -be completed to become full prototype declarations. +The function declarations using C incomplete declaration style +need to be completed to become full prototype declarations. A program may need to be updated further if different calls to the same (non-prototype) function have different numbers of arguments or if the type of corresponding arguments differed. @@ -2917,7 +2917,7 @@ Deletion of semantically well-defined feature. \difficulty Semantic transformation. -The type definitions must be moved to file scope, or in header files. +The type definitions need to be moved to file scope, or in header files. \howwide Seldom. This style of type definition is seen as poor coding style. @@ -2941,7 +2941,7 @@ compared to the corresponding functionality in C\@. In \Cpp{}, designators for non-static data members -must be specified in declaration order, +need to be specified in declaration order, designators for array elements and nested designators are not supported, and @@ -2960,7 +2960,7 @@ \rationale In \Cpp{}, members are destroyed in reverse construction order and the elements of an initializer list are evaluated in lexical order, -so member initializers must be specified in order. +so member initializers need to be specified in order. Array designators conflict with \grammarterm{lambda-expression} syntax. Nested designators are seldom used. \effect @@ -2973,8 +2973,10 @@ \diffref{dcl.init.string} \change -In \Cpp{}, when initializing an array of character with a string, the number of -characters in the string (including the terminating \tcode{'\textbackslash 0'}) must not exceed the +In \Cpp{}, when initializing an array of character with a string, +it is not possible for the number of +characters in the string (including the terminating \tcode{'\textbackslash 0'}) +to exceed the number of elements in the array. In C, an array can be initialized with a string even if the array is not large enough to contain the string-terminating \tcode{'\textbackslash 0'}. @@ -2989,7 +2991,7 @@ Deletion of semantically well-defined feature. \difficulty Semantic transformation. -The arrays must be declared one element bigger to contain the +The arrays need to be declared one element bigger to contain the string terminating \tcode{'\textbackslash 0'}. \howwide Seldom. @@ -3141,7 +3143,7 @@ \difficulty Semantic transformation. If volatile semantics are required for the copy, -a user-declared constructor or assignment must +a user-declared constructor or assignment needs to be provided. If non-volatile semantics are required, an explicit diff --git a/source/containers.tex b/source/containers.tex index 5ff8465de7..0613705013 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -594,8 +594,9 @@ All other constructors for these container types take a \tcode{const allocator_type\&} argument. \begin{note} -If an invocation of a constructor uses the default value of an optional -allocator argument, then the allocator type must support value-initialization. +Invocation of a constructor that uses the default value of an optional +allocator argument is ill-formed +unless the allocator type supports value-initialization. \end{note} A copy of this allocator is used for any memory allocation and element construction performed, by these constructors and by all member functions, diff --git a/source/declarations.tex b/source/declarations.tex index 6a7b78e9a5..248a6a0bcd 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -332,7 +332,7 @@ void g(char c) { f(0); // OK - f(c); // error on implementations where \tcode{sizeof(int) > 1}: must be \tcode{int}-sized + f(c); // error on implementations where \tcode{sizeof(int) > 1}: \tcode{must be int-sized} } \end{codeblock} \end{example} @@ -823,7 +823,7 @@ with respect to the \keyword{constexpr} or \keyword{consteval} specifier. \end{note} \begin{note} -Function parameters cannot be declared \keyword{constexpr}. +It is not possible for a function parameter to be declared \keyword{constexpr}. \end{note} \begin{example} \begin{codeblock} @@ -1196,10 +1196,11 @@ \pnum \begin{note} Declaring a variable \keyword{const} can affect its linkage\iref{dcl.stc} -and its usability in constant expressions\iref{expr.const}. As -described in~\ref{dcl.init}, the definition of an object or subobject -of const-qualified type must specify an initializer or be subject to -default-initialization. +and its usability in constant expressions\iref{expr.const}. +As described in~\ref{dcl.init}, +the definition of an object or subobject of const-qualified type is ill-formed +unless the definition specifies an initializer or +be subject to default-initialization. \end{note} \pnum @@ -3595,10 +3596,9 @@ printf("a=%d b=%d", a, b); \end{codeblock} -However, the first argument must be of a type -that can be converted to a -\keyword{const} -\tcode{char*}. +However, the program is ill-formed +unless the first argument is of a type +that can be converted to a \keyword{const} \tcode{char*}. \end{example} \begin{note} The standard header \libheaderref{cstdarg} @@ -4963,7 +4963,7 @@ are the first $n$ elements of the aggregate, where $n$ is the number of elements in the initializer list. \item -Otherwise, the initializer list must be \tcode{\{\}}, +Otherwise, the initializer list is \tcode{\{\}}, and there are no explicitly initialized elements. \end{itemize} @@ -7995,7 +7995,7 @@ \pnum \begin{note} Since destructors do not have names, a -\grammarterm{using-declaration} cannot refer to a +\grammarterm{using-declaration} is not able to refer to a destructor for a base class. \end{note} If a constructor or assignment operator brought from a base class into a derived class diff --git a/source/expressions.tex b/source/expressions.tex index cd338610eb..e24ba9f14d 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -129,7 +129,7 @@ required by the type; the types are not changed\ thereby. \begin{footnote} -The cast and assignment operators must still perform their specific +The cast and assignment operators still perform their specific conversions as described in~\ref{expr.type.conv}, \ref{expr.cast}, \ref{expr.static.cast} and~\ref{expr.ass}. \end{footnote} @@ -479,7 +479,8 @@ if the (possibly converted) expression is a prvalue of object type. \begin{note} If the original expression is an lvalue of class type, -it must have a volatile copy constructor to initialize the temporary object +the program is ill-formed unless +the class has a volatile copy constructor to initialize the temporary object that is the result object of the temporary materialization conversion. \end{note} The expression is evaluated and its result (if any) is discarded. @@ -716,7 +717,8 @@ \tcode{T} shall be a complete type. \begin{note} If \tcode{T} is a class type (or array thereof), -it must have an accessible and non-deleted destructor; +the program is ill-formed +unless the class has an accessible and non-deleted destructor; see~\ref{class.dtor}. \end{note} \begin{example} @@ -1394,7 +1396,7 @@ overload resolution is performed to select a unique function\iref{over.match,over.over}. \begin{note} -A program cannot refer to a function +A program is not able to refer to a function with a trailing \grammarterm{requires-clause} whose \grammarterm{constraint-expression} is not satisfied, because such functions are never selected by overload resolution. @@ -2389,7 +2391,7 @@ \end{itemize} \begin{note} This enables an \grammarterm{init-capture} like -``\tcode{x = std::move(x)}''; the second ``\tcode{x}'' must bind to a +``\tcode{x = std::move(x)}''; the second ``\tcode{x}'' binds to a declaration in the surrounding context. \end{note} \begin{example} @@ -2628,7 +2630,7 @@ If declared, such non-static data members shall be of literal type. \begin{example} \begin{codeblock} -// The inner closure type must be a literal type regardless of how reference captures are represented. +// The inner closure type is a literal type regardless of how reference captures are represented. static_assert([](int n) { return [&n] { return ++n; }(); }(3) == 4); \end{codeblock} \end{example} @@ -4205,9 +4207,10 @@ containing the original member, the resulting pointer to member points to the original member. Otherwise, the behavior is undefined. \begin{note} -Although class \tcode{B} need not contain the original member, the -dynamic type of the object with which indirection through the pointer -to member is performed must contain the original member; +Although class \tcode{B} need not contain the original member, +the behavior is undefined +if the dynamic type of the object with which indirection through the pointer +to member is performed does not contain the original member; see~\ref{expr.mptr.oper}. \end{note} @@ -4591,8 +4594,9 @@ \indextext{type!incomplete}% Indirection through a pointer to an incomplete type (other than \cv{} \keyword{void}) is valid. The lvalue thus obtained can be -used in limited ways (to initialize a reference, for example); this -lvalue must not be converted to a prvalue, see~\ref{conv.lval}. +used in limited ways (to initialize a reference, for example); +the program is ill-formed +if such an lvalue is converted to a prvalue, see~\ref{conv.lval}. \end{note} \pnum @@ -5593,7 +5597,7 @@ \pnum \begin{note} -When the allocation function returns a value other than null, it must be +When the allocation function returns a value other than null, it returns a pointer to a block of storage in which space for the object has been reserved. The block of storage is assumed to be appropriately aligned\iref{basic.align} @@ -5778,9 +5782,10 @@ \end{footnote} If not, the behavior is undefined. \begin{note} -This means that the syntax of the \grammarterm{delete-expression} must -match the type of the object allocated by \keyword{new}, not the syntax of the -\grammarterm{new-expression}. +This means that the behavior is undefined +if the syntax of the \grammarterm{delete-expression} does not +match the type of the object allocated by \keyword{new}, +regardless of the syntax of the \grammarterm{new-expression}. \end{note} \begin{note} A pointer to a \keyword{const} type can be the operand of a @@ -7947,8 +7952,8 @@ \begin{example} \begin{codeblock} bool f() { - char array[1 + int(1 + 0.2 - 0.1 - 0.1)]; // Must be evaluated during translation - int size = 1 + int(1 + 0.2 - 0.1 - 0.1); // May be evaluated at runtime + char array[1 + int(1 + 0.2 - 0.1 - 0.1)]; // Evaluated during translation + int size = 1 + int(1 + 0.2 - 0.1 - 0.1); // Can be evaluated at runtime return sizeof(array) == size; } \end{codeblock} diff --git a/source/iterators.tex b/source/iterators.tex index 1a7b67109a..8e71927ffc 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -609,9 +609,9 @@ the nested \grammarterm{typedef-name}{s} specified in \ref{iterator.traits} shall be provided for the iterator type. \begin{note} -Either the iterator type must provide the \grammarterm{typedef-name}{s} directly +Either the iterator type provides the \grammarterm{typedef-name}{s} directly (in which case \tcode{iterator_traits} pick them up automatically), or -an \tcode{iterator_traits} specialization must provide them. +an \tcode{iterator_traits} specialization provides them. \end{note} \pnum @@ -2000,8 +2000,9 @@ \tcode{o} denotes a value of some type that is writable to the output iterator. \begin{note} -For an iterator type \tcode{X} there must be an instantiation -of \tcode{iterator_traits}\iref{iterator.traits}. +The program is ill-formed if, for an iterator type \tcode{X}, +the specialization \tcode{iterator_traits}\iref{iterator.traits} +is ill-formed. \end{note} \rSec3[iterator.iterators]{\oldconcept{Iterator}} diff --git a/source/lex.tex b/source/lex.tex index cd23d40013..e3f529876a 100644 --- a/source/lex.tex +++ b/source/lex.tex @@ -212,7 +212,7 @@ requested\iref{temp.explicit}. \end{note} The definitions of the -required templates are located. It is \impldef{whether source of translation units must +required templates are located. It is \impldef{whether source of translation units are required to be available to locate template definitions} whether the source of the translation units containing these definitions is required to be available. diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 5886165826..33b0be6bea 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -276,7 +276,7 @@ Such code is intended as a specification of equivalence of a construct to another construct, not necessarily as the way the construct -must be implemented. +is required to be implemented. \begin{footnote} Although in some cases the code given is unambiguously the optimum implementation. @@ -1761,9 +1761,10 @@ \multicolumn{2}{|p{5.3in}|}{ \tcode{rv}'s state is unspecified \begin{tailnote} -\tcode{rv} must still meet the requirements of the library - component that is using it. The operations listed in those requirements must - work as specified whether \tcode{rv} has been moved from or not. + The behavior is undefined + if \tcode{rv} does not meet the requirements of the library component + that is using it, + regardless of whether \tcode{rv} has been moved from or not. \end{tailnote} }\\ \end{oldconcepttable} @@ -1787,10 +1788,11 @@ \multicolumn{4}{|p{5.3in}|}{ \tcode{rv}'s state is unspecified. \begin{tailnote} - \tcode{rv} must still meet the requirements of the library - component that is using it, whether or not \tcode{t} and \tcode{rv} refer to the same object. - The operations listed in those requirements must - work as specified whether \tcode{rv} has been moved from or not. + The behavior is undefined + if \tcode{rv} does not meet the requirements of the library component + that is using it, + regardless of whether or not \tcode{t} and \tcode{rv} refer to the same object + or whether \tcode{rv} has been moved from or not. \end{tailnote} }\\ \end{oldconcepttable} @@ -2899,9 +2901,8 @@ \item the specialization meets the standard library requirements for the original template. \begin{footnote} -Any -library code that instantiates other library templates -must be prepared to work adequately with any user-supplied specialization +Any library code that instantiates other library templates +is expected to be prepared to work adequately with any user-supplied specialization that meets the minimum requirements of this document. \end{footnote} \end{itemize} diff --git a/source/locales.tex b/source/locales.tex index 71dab743fa..9b385d333b 100644 --- a/source/locales.tex +++ b/source/locales.tex @@ -3915,7 +3915,7 @@ if no sign is detected, the result is given the sign that corresponds to the source of the empty string. Otherwise, -the character in the indicated position must match +the character in the indicated position shall match the first character of \tcode{pos} or \tcode{neg}, and the result is given the corresponding sign. If the first character of \tcode{pos} is equal to diff --git a/source/memory.tex b/source/memory.tex index a24a3b4973..033a7c36bd 100644 --- a/source/memory.tex +++ b/source/memory.tex @@ -1054,7 +1054,7 @@ \begin{note} For \tcode{uses_allocator_construction_args} and \tcode{make_obj_using_allocator}, type \tcode{T} -is not deduced and must therefore be specified explicitly by the caller. +is not deduced and is therefore expected to be specified explicitly by the caller. \end{note} \indexlibraryglobal{uses_allocator_construction_args}% @@ -2218,8 +2218,8 @@ \begin{example} \begin{codeblock} D d; -unique_ptr p1(new int, D()); // \tcode{D} must be \oldconcept{MoveConstructible} -unique_ptr p2(new int, d); // \tcode{D} must be \oldconcept{CopyConstructible} +unique_ptr p1(new int, D()); // \tcode{D} is expected to be \oldconcept{MoveConstructible} +unique_ptr p2(new int, d); // \tcode{D} is expected to be \oldconcept{CopyConstructible} unique_ptr p3(new int, d); // \tcode{p3} holds a reference to \tcode{d} unique_ptr p4(new int, D()); // error: rvalue deleter object combined // with reference deleter type @@ -5968,7 +5968,8 @@ \pnum \begin{note} -\tcode{T} is not deduced and must therefore be provided as a template argument. +\tcode{T} is not deduced and +is there therefore expected to be provided as a template argument. \end{note} \end{itemdescr} @@ -6008,7 +6009,8 @@ \pnum \begin{note} -\tcode{T} is not deduced and must therefore be provided as a template argument. +\tcode{T} is not deduced and +is therefore expected to be provided as a template argument. \end{note} \end{itemdescr} diff --git a/source/meta.tex b/source/meta.tex index 17cbbf91dd..06a6abbac8 100644 --- a/source/meta.tex +++ b/source/meta.tex @@ -2500,7 +2500,7 @@ if consteval { return std::is_within_lifetime(&b); // during constant evaluation, cannot read from \tcode{c} } else { - return c != 2; // during runtime, must read from \tcode{c} + return c != 2; // during runtime, read from \tcode{c} } } diff --git a/source/modules.tex b/source/modules.tex index 52873a37ae..0f22cc934e 100644 --- a/source/modules.tex +++ b/source/modules.tex @@ -824,7 +824,7 @@ \item where definitions for inline functions and templates -must appear\iref{basic.def.odr,dcl.inline,temp.pre}, +are required to appear\iref{basic.def.odr,dcl.inline,temp.pre}, \item the instantiation contexts of templates diff --git a/source/overloading.tex b/source/overloading.tex index 52de08ebe9..a38a15afad 100644 --- a/source/overloading.tex +++ b/source/overloading.tex @@ -11,7 +11,7 @@ \indextext{function!overloaded|see{overloading}}% \begin{note} Each of two or more entities with the same name in the same scope, -which must be functions or function templates, +which are necessarily functions or function templates, is commonly called an ``overload''. \end{note} @@ -1379,7 +1379,7 @@ \pnum When resolving a placeholder for a deduced class type\iref{dcl.type.simple} where the \grammarterm{template-name} names an alias template \tcode{A}, -the \grammarterm{defining-type-id} of \tcode{A} must be of the form +the \grammarterm{defining-type-id} of \tcode{A} is required to be of the form \begin{ncsimplebnf} \opt{\keyword{typename}} \opt{nested-name-specifier} \opt{\keyword{template}} simple-template-id \end{ncsimplebnf} diff --git a/source/support.tex b/source/support.tex index aac5caf95a..8be7ba772f 100644 --- a/source/support.tex +++ b/source/support.tex @@ -3819,7 +3819,7 @@ \pnum \remarks Called by the implementation when exception -handling must be abandoned for any of several reasons\iref{except.terminate}. +handling is abandoned for any of several reasons\iref{except.terminate}. May also be called directly by the program. \end{itemdescr} diff --git a/source/templates.tex b/source/templates.tex index 5c6c3bde0a..1c1f01752f 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -138,7 +138,8 @@ \begin{note} Default arguments for function templates and for member functions of class templates are considered definitions for the purpose of template -instantiation\iref{temp.decls} and must obey the one-definition rule\iref{basic.def.odr}. +instantiation\iref{temp.decls} and +thus are covered by the one-definition rule\iref{basic.def.odr}. \end{note} \pnum @@ -2471,7 +2472,8 @@ A member class of a class template may be defined outside the class template definition in which it is declared. \begin{note} -The member class must be defined before its first use that requires +The program is ill-formed +if the member class is not defined before its first use that requires an instantiation\iref{temp.inst}. For example, \begin{codeblock} @@ -3621,8 +3623,11 @@ overload resolution of function template specializations with the same name. -If such a non-template function is odr-used\iref{term.odr.use} in a program, it must be defined; -it will not be implicitly instantiated using the function template definition. +A program is ill-formed +if such a non-template function is odr-used\iref{term.odr.use} in a program +and there is no definition; +the definition will not be implicitly instantiated +using the function template definition. \end{footnote} \rSec3[temp.over.link]{Function template overloading} @@ -6576,7 +6581,7 @@ void h() { A a; - a.f(16); // \tcode{A::f} must be defined somewhere + a.f(16); // error: \tcode{A::f} is not defined } // \tcode{\keyword{template}<>} not used for a member of an explicitly specialized class template @@ -7752,9 +7757,9 @@ is not used in any of the function parameters of a function template, or is used only in a non-deduced context, its corresponding \grammarterm{template-argument} -cannot be deduced from a function call and the -\grammarterm{template-argument} -must be explicitly specified. +cannot be deduced from a function call, and +thus the program is ill-formed +unless the \grammarterm{template-argument} is explicitly specified. \end{note} \pnum @@ -8692,8 +8697,8 @@ B<77> b; int x = deduce<77>(a.xm, 62, b.ym); -// \tcode{T} deduced as \tcode{int}; \tcode{a.xm} must be convertible to \tcode{A::X} -// \tcode{i} is explicitly specified to be \tcode{77}; \tcode{b.ym} must be convertible to \tcode{B<77>::Y} +// \tcode{T} deduced as \tcode{int}; \tcode{a.xm} is required to be convertible to \tcode{A::X} +// \tcode{i} is explicitly specified to be \tcode{77}; \tcode{b.ym} is required to be convertible to \tcode{B<77>::Y} \end{codeblock} \end{note} diff --git a/source/threads.tex b/source/threads.tex index 923f60ec62..df0d0ca6ab 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -2502,7 +2502,7 @@ \begin{note} Atomic operations specifying \tcode{memory_order::relaxed} are relaxed -with respect to memory ordering. Implementations must still guarantee that any +with respect to memory ordering. It is still guaranteed that any given atomic access to a particular atomic object be indivisible with respect to all other atomic accesses to that object. \end{note} @@ -10228,7 +10228,7 @@ visible in the objects that reference this state in the sense of data race avoidance\iref{res.on.data.races}. For example, concurrent accesses through references returned by \tcode{shared_future::get()}\iref{futures.shared.future} -must either use read-only operations or provide additional synchronization. +are expected to either use read-only operations or provide additional synchronization. \end{note} \rSec2[futures.promise]{Class template \tcode{promise}} diff --git a/source/uax31.tex b/source/uax31.tex index aea6e6b5ba..0393e5d6b7 100644 --- a/source/uax31.tex +++ b/source/uax31.tex @@ -51,7 +51,7 @@ \pnum If an implementation of \UAX{31} wishes to allow format characters such as \unicode{200d}{zero width joiner} or \unicode{200c}{zero width non-joiner} -it must define a profile allowing them, or +it is required to define a profile allowing them, or describe precisely which combinations are permitted. \pnum diff --git a/source/utilities.tex b/source/utilities.tex index c62cf5d6e3..e6cf074496 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -2715,7 +2715,7 @@ make_index_sequence>>{}); \end{codeblock} \begin{note} -The type of \tcode{T} must be supplied +The type of \tcode{T} is expected to be supplied as an explicit template parameter, as it cannot be deduced from the argument list. \end{note} @@ -2999,9 +2999,9 @@ \pnum \begin{note} The above definition does not require \tcode{t$_{\mathrm{tail}}$} -(or \tcode{u$_{\mathrm{tail}}$}) to be constructed. It might not -even be possible, as \tcode{t} and \tcode{u} are not required to be copy -constructible. Also, all comparison operator functions are short circuited; +(or \tcode{u$_{\mathrm{tail}}$}) to be constructed; +this is impossible if \tcode{t} or \tcode{u} is not copy-constructible. +Also, all comparison operator functions are short circuited; they do not perform element accesses beyond what is needed to determine the result of the comparison. \end{note} @@ -15958,7 +15958,7 @@ \begin{note} The presence of a \fmtgrammarterm{fill} option is signaled by the character following it, -which must be one of the alignment options. +which is one of the alignment options. If the second character of \fmtgrammarterm{std-format-spec} is not a valid alignment option, then it is assumed that