mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 12:44:42 +03:00
missing a return *this in a copy-assignment
This commit is contained in:
@@ -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. ???)
|
||||
|
||||
Reference in New Issue
Block a user