File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 38803880\end {codeblock }
38813881\end {example }
38823882
3883+ \pnum
3884+ A virtual function shall not be an explicit object member
3885+ function\iref {dcl.fct }.
3886+ \begin {example }
3887+ \begin {codeblock }
3888+ struct B {
3889+ virtual void g(); // \# 1
3890+ };
3891+ struct D : B {
3892+ virtual void f(this D&); // error: explicit object member function cannot be virtual
3893+ void g(this D&); // overrides \# 1; error: explicit object member function cannot be virtual
3894+ };
3895+ \end {codeblock }
3896+ \end {example }
3897+
38833898\pnum
38843899The \grammarterm {ref-qualifier}, or lack thereof, of an overriding function
38853900shall be the same as that of the overridden function.
Original file line number Diff line number Diff line change 38943894A \grammarterm {member-declarator} with an explicit-object-parameter-declaration
38953895shall not include
38963896a \grammarterm {ref-qualifier} or a \grammarterm {cv-qualifier-seq} and
3897- shall not be declared \keyword {static} or \keyword {virtual} .
3897+ shall not be declared \keyword {static}.
38983898\begin {example }
38993899\begin {codeblock }
39003900struct C {
You can’t perform that action at this time.
0 commit comments