Skip to content

Motions 2019 11 cwg 1: P1969R0 Core Language Working Group "ready" Issues #3480

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions source/declarations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
14 changes: 8 additions & 6 deletions source/expressions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}

Expand Down Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions source/templates.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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<class T> void f(T) { @\commentellip@ }
Expand Down