fix missing return *this (#2097)

pull/2104/head
Eisenwave 3 years ago committed by GitHub
parent 95aca76777
commit 68f56f0a34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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
// ... // ...
}; };

Loading…
Cancel
Save