зеркало из https://github.com/mozilla/pjs.git
11 строки
269 B
C++
11 строки
269 B
C++
|
#include "nscore.h"
|
||
|
|
||
|
struct S {
|
||
|
virtual NS_MUST_OVERRIDE void f();
|
||
|
virtual void g();
|
||
|
};
|
||
|
|
||
|
struct A : S { virtual void f(); }; // ok
|
||
|
struct B : S { virtual NS_MUST_OVERRIDE void f(); }; // also ok
|
||
|
struct E : A { }; // ok: A's definition of f() is good for subclasses
|