diff --git a/source/classes.tex b/source/classes.tex index ed746ce981..af39da7e5b 100644 --- a/source/classes.tex +++ b/source/classes.tex @@ -2996,6 +2996,10 @@ \end{example} \end{note} +\pnum +An allocation or deallocation function for a class +shall not have an explicit object parameter\iref{dcl.fct}. + \pnum Access to the deallocation function is checked statically, even if a different one is actually executed. @@ -3880,6 +3884,21 @@ \end{codeblock} \end{example} +\pnum +A virtual function shall not be an explicit object member +function\iref{dcl.fct}. +\begin{example} +\begin{codeblock} +struct B { + virtual void g(); // \#1 +}; +struct D : B { + virtual void f(this D&); // error: explicit object member function cannot be virtual + void g(this D&); // overrides \#1; error: explicit object member function cannot be virtual +}; +\end{codeblock} +\end{example} + \pnum The \grammarterm{ref-qualifier}, or lack thereof, of an overriding function shall be the same as that of the overridden function. diff --git a/source/declarations.tex b/source/declarations.tex index 510def3e41..a03fbefca6 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -3894,7 +3894,7 @@ A \grammarterm{member-declarator} with an explicit-object-parameter-declaration shall not include a \grammarterm{ref-qualifier} or a \grammarterm{cv-qualifier-seq} and -shall not be declared \keyword{static} or \keyword{virtual}. +shall not be declared \keyword{static}. \begin{example} \begin{codeblock} struct C {