mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
parent
8249a49c69
commit
9c9d8d2dfc
|
@ -6693,6 +6693,8 @@ Use `virtual` only when declaring a new virtual function. Use `override` only wh
|
|||
// ...
|
||||
};
|
||||
|
||||
##### Example, good
|
||||
|
||||
struct Better : B {
|
||||
void f1(int) override; // error (caught): D::f1() hides B::f1()
|
||||
void f2(int) const override;
|
||||
|
|
Loading…
Reference in New Issue
Block a user