mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
9b788e903b
--HG-- extra : rebase_source : 4f3034c93cc76c7504d1cfb21953c495c35d068f
25 lines
630 B
C++
25 lines
630 B
C++
#include "nscore.h"
|
|
|
|
struct Base {
|
|
NS_MUST_OVERRIDE virtual void f(); // normal case
|
|
NS_MUST_OVERRIDE void g(); // virtual not required
|
|
NS_MUST_OVERRIDE static void h(); // can even be static
|
|
};
|
|
|
|
void Base::f() {} // can be defined, or not, don't care
|
|
|
|
struct Derived1 : Base { // propagates override annotation
|
|
NS_MUST_OVERRIDE virtual void f();
|
|
NS_MUST_OVERRIDE void g();
|
|
NS_MUST_OVERRIDE static void h();
|
|
};
|
|
|
|
struct Derived2 : Derived1 { // doesn't propagate override annotation
|
|
virtual void f();
|
|
void g();
|
|
static void h();
|
|
};
|
|
|
|
struct Derived3 : Derived2 { // doesn't have to override anything
|
|
};
|