mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 12:44:42 +03:00
fix missing return *this (#2097)
This commit is contained in:
@@ -5010,7 +5010,7 @@ Users will be surprised if copy/move construction and copy/move assignment do lo
|
|||||||
shared_ptr<Impl> p;
|
shared_ptr<Impl> p;
|
||||||
public:
|
public:
|
||||||
Silly(const Silly& a) : p(make_shared<Impl>()) { *p = *a.p; } // deep copy
|
Silly(const Silly& a) : p(make_shared<Impl>()) { *p = *a.p; } // deep copy
|
||||||
Silly& operator=(const Silly& a) { p = a.p; } // shallow copy
|
Silly& operator=(const Silly& a) { p = a.p; return *this; } // shallow copy
|
||||||
// ...
|
// ...
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user