pjs/xpcom/tests/static-checker/OverrideOK1.cpp

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