mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 04:44:34 +03:00
Fix C.127 example (#1775)
- fix for D being abstract but trying to create an object of type D in make_unique<D>()
This commit is contained in:
@@ -7144,6 +7144,7 @@ A class with a virtual function is usually (and in general) used via a pointer t
|
|||||||
// bad: derived from a class without a virtual destructor
|
// bad: derived from a class without a virtual destructor
|
||||||
struct D : B {
|
struct D : B {
|
||||||
string s {"default"};
|
string s {"default"};
|
||||||
|
// ...
|
||||||
};
|
};
|
||||||
|
|
||||||
void use()
|
void use()
|
||||||
|
|||||||
Reference in New Issue
Block a user