mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
No double deletion (#1278)
This commit is contained in:
parent
0b275097b6
commit
7733c326b2
|
@ -4877,7 +4877,7 @@ The default copy operation will just copy the `p1.p` into `p2.p` leading to a do
|
||||||
|
|
||||||
void use(Smart_ptr3<int> p1)
|
void use(Smart_ptr3<int> p1)
|
||||||
{
|
{
|
||||||
auto p2 = p1; // error: double deletion
|
auto p2 = p1; // OK: no double deletion
|
||||||
}
|
}
|
||||||
|
|
||||||
##### Note
|
##### Note
|
||||||
|
|
Loading…
Reference in New Issue
Block a user