Skip to content

Commit a1c248b

Browse files
committed
unique variable names in example
1 parent c0bff45 commit a1c248b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CppCoreGuidelines.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16200,7 +16200,7 @@ Note that a C-style `(T)expression` cast means to perform the first of the follo
1620016200
};
1620116201

1620216202
Derived1 d1;
16203-
Base* p = &d1; // ok, implicit conversion to pointer to Base is fine
16203+
Base* p1 = &d1; // ok, implicit conversion to pointer to Base is fine
1620416204

1620516205
// BAD, tries to treat d1 as a Derived2, which it is not
1620616206
Derived2* p2 = (Derived2*)(p);

0 commit comments

Comments
 (0)