mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 20:54:41 +03:00
No double deletion (#1278)
This commit is contained in:
committed by
Herb Sutter
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)
|
||||
{
|
||||
auto p2 = p1; // error: double deletion
|
||||
auto p2 = p1; // OK: no double deletion
|
||||
}
|
||||
|
||||
##### Note
|
||||
|
||||
Reference in New Issue
Block a user