Skip to content
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
10 changes: 6 additions & 4 deletions source/classes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -842,9 +842,10 @@
\pnum
\indextext{member function!inline}%
\indextext{definition!member function}%
A member function may be defined\iref{dcl.fct.def} in its class
definition, in which case it is an inline member
function\iref{dcl.inline}, or it may be defined outside of its class
A member function may be defined\iref{dcl.fct.def} in its class definition,
in which case it is an inline\iref{dcl.inline} member function
if it is attached to the global module, or
it may be defined outside of its class
definition if it has already been declared but not defined in its class
definition. A member function definition that appears outside of the
class definition shall appear in a namespace scope enclosing the class
Expand Down Expand Up @@ -5192,7 +5193,8 @@
\end{example}

\pnum
Such a function is implicitly an inline function\iref{dcl.inline}.
Such a function is implicitly an inline\iref{dcl.inline} function
if it is attached to the global module.
A friend
function defined in a class is in the (lexical) scope of the class in which it is defined.
A friend function defined outside the class is not\iref{basic.lookup.unqual}.
Expand Down
8 changes: 4 additions & 4 deletions source/declarations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1059,9 +1059,6 @@
A variable declaration with an \tcode{inline} specifier declares an
\defnadj{inline}{variable}.

\pnum
A function defined within a class definition is an inline function.

\pnum
The \tcode{inline} specifier shall not appear on a block scope declaration or
on the declaration of a function parameter.
Expand Down Expand Up @@ -1108,6 +1105,8 @@
There is no restriction on the linkage (or absence thereof)
of entities that the function body of an exported inline function
can reference. A constexpr function\iref{dcl.constexpr} is implicitly inline.
In the global module, a function defined within a class definition
is implicitly inline~(\ref{class.mfct}, \ref{class.friend}).
\end{note}

\rSec2[dcl.type]{Type specifiers}%
Expand Down Expand Up @@ -6030,7 +6029,8 @@
An explicitly-defaulted function that is not defined as deleted may be declared
\tcode{constexpr} or \tcode{consteval} only
if it would have been implicitly declared as \tcode{constexpr}.
If a function is explicitly defaulted on its first declaration,
A function explicitly defaulted on its first declaration
is inline\iref{dcl.inline};
it is implicitly considered to be \tcode{constexpr} if the implicit
declaration would be.

Expand Down