mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 20:54:41 +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) {
|
T& T::operator=(const T& other) {
|
||||||
auto temp = other;
|
auto temp = other;
|
||||||
swap(temp);
|
swap(temp);
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
(See also Item 56. ???)
|
(See also Item 56. ???)
|
||||||
|
|||||||
Reference in New Issue
Block a user