From 68f56f0a34d4c803e0e6e8c902351cc2d8356cb3 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Sat, 24 Jun 2023 05:39:17 +0200 Subject: [PATCH] fix missing return *this (#2097) --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 6696e14..5a0c752 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -5010,7 +5010,7 @@ Users will be surprised if copy/move construction and copy/move assignment do lo shared_ptr p; public: Silly(const Silly& a) : p(make_shared()) { *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 // ... };