From e2a9591a484f93fbe527f2b6eb51a8bd12e176b3 Mon Sep 17 00:00:00 2001 From: ven Date: Sun, 20 Sep 2015 14:19:27 +0200 Subject: [PATCH] Fix code typos for C.145 Also added the "extends B" to D --- CppCoreGuidelines.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 8e8dca7..3c55ab6 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -5013,8 +5013,8 @@ and such interfaces are often not easily or naturally organized into a single-ro **Example**: - struct B { int a; virtual f(); }; - struct D { int b; override f(); }; + struct B { int a; virtual int f(); }; + struct D : B { int b; int f() override; }; void use(B b) { @@ -5026,7 +5026,7 @@ and such interfaces are often not easily or naturally organized into a single-ro void use2() { D d; - use(b); // slice + use(d); // slice } Both `d`s are sliced.