mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
Merge pull request #43 from vendethiel/patch-3
Fix code typos for C.145
This commit is contained in:
commit
fe05904a1f
|
@ -5013,8 +5013,8 @@ and such interfaces are often not easily or naturally organized into a single-ro
|
||||||
|
|
||||||
**Example**:
|
**Example**:
|
||||||
|
|
||||||
struct B { int a; virtual f(); };
|
struct B { int a; virtual int f(); };
|
||||||
struct D { int b; override f(); };
|
struct D : B { int b; int f() override; };
|
||||||
|
|
||||||
void use(B b)
|
void use(B b)
|
||||||
{
|
{
|
||||||
|
@ -5026,7 +5026,7 @@ and such interfaces are often not easily or naturally organized into a single-ro
|
||||||
void use2()
|
void use2()
|
||||||
{
|
{
|
||||||
D d;
|
D d;
|
||||||
use(b); // slice
|
use(d); // slice
|
||||||
}
|
}
|
||||||
|
|
||||||
Both `d`s are sliced.
|
Both `d`s are sliced.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user