diff --git a/source/declarations.tex b/source/declarations.tex index ffd9809b11..1fa58dd3fa 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -1058,6 +1058,9 @@ the point of call; however, even if this inline substitution is omitted, the other rules for inline functions specified in this subclause shall still be respected. +\begin{note} +The \tcode{inline} keyword has no effect on the linkage of a function. +\end{note} \pnum A variable declaration with an \tcode{inline} specifier declares an @@ -1067,8 +1070,8 @@ A function defined within a class definition is an inline function. \pnum -The \tcode{inline} specifier shall not appear on a block scope -declaration.\footnote{The \tcode{inline} keyword has no effect on the linkage of a function.} +The \tcode{inline} specifier shall not appear on a block scope declaration or +on the declaration of a function parameter. If the \tcode{inline} specifier is used in a friend function declaration, that declaration shall be a definition or the function shall have previously been declared inline. diff --git a/source/expressions.tex b/source/expressions.tex index 37ed18d2c0..bfcc1d2b39 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -4995,7 +4995,9 @@ allocation function as the first argument of type \tcode{std::size_t}. That argument shall be no less than the size of the object being created; it may be greater than the size of the -object being created only if the object is an array. For arrays of +object being created only if the object is an array and +the allocation function is not a non-allocating form\iref{new.delete.placement}. +For arrays of \tcode{char}, \tcode{unsigned char}, and \tcode{std::byte}, the difference between the result of the \grammarterm{new-expression} and the address returned by the @@ -5072,9 +5074,10 @@ representing array allocation overhead; the result of the \grammarterm{new-expression} will be offset by this amount from the value returned by \tcode{operator new[]}. This overhead may be applied in all -array \grammarterm{new-expression}{s}, including those referencing the -library function \tcode{operator new[](std::size_t, void*)} and other -placement allocation functions. The amount of overhead may vary from one +array \grammarterm{new-expression}{s}, including those referencing +a placement allocation function, except when referencing +the library function \tcode{operator new[](std::size_t, void*)}. +The amount of overhead may vary from one invocation of \tcode{new} to another. \end{example} @@ -5183,13 +5186,12 @@ will be called; otherwise, no deallocation function will be called. If the lookup finds a usual deallocation function -with a parameter of type \tcode{std::size_t}\iref{basic.stc.dynamic.deallocation} and that function, considered as a placement deallocation function, would have been selected as a match for the allocation function, the program is ill-formed. For a non-placement allocation function, the normal deallocation function lookup is used to find the matching deallocation -function\iref{expr.delete} +function\iref{expr.delete}. \begin{example} \begin{codeblock} struct S { diff --git a/source/templates.tex b/source/templates.tex index 9829037ff6..462aa156d5 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -6698,10 +6698,10 @@ of a template specialization is not an explicit specialization\iref{temp.fct}. \pnum -An explicit specialization of a function or variable template is inline -only if it is declared with the \tcode{inline} -specifier or defined as deleted, and independently of whether its -function or variable template is inline. +Whether an explicit specialization of a function or variable template +is inline, constexpr, or an immediate function +is determined by the explicit specialization and +is independent of those properties of the template. \begin{example} \begin{codeblock} template void f(T) { @\commentellip@ }