diff --git a/source/classes.tex b/source/classes.tex index 59c0cedd8b..3c77482153 100644 --- a/source/classes.tex +++ b/source/classes.tex @@ -2991,6 +2991,10 @@ \end{codeblock} \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. @@ -3870,6 +3874,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 02fcaaa862..15ffd3e743 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -3579,7 +3579,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 {