From 1e12aba7afe4fc357357e790b8d67a4b4816a3f7 Mon Sep 17 00:00:00 2001 From: Sergey Zubkov Date: Thu, 6 Sep 2018 07:30:45 -0400 Subject: [PATCH] missing a return *this in a copy-assignment --- CppCoreGuidelines.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 116e0ec..d7042fc 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -21354,6 +21354,7 @@ Besides destructors and deallocation functions, common error-safety techniques r T& T::operator=(const T& other) { auto temp = other; swap(temp); + return *this; } (See also Item 56. ???)