Commit b7067432f48fef27e5c3bed2f02d0db04051a527
1 parent
196a8e9f
Added comment to move assignment example
Showing
1 changed file
with
1 additions
and
1 deletions
examples07/04-unique_ptr/02-move.cpp
@@ -12,7 +12,7 @@ class Example | @@ -12,7 +12,7 @@ class Example | ||
12 | std::cout << "Example::Example(Example &&)" << std::endl; | 12 | std::cout << "Example::Example(Example &&)" << std::endl; |
13 | } | 13 | } |
14 | 14 | ||
15 | - Example& operator=(Example&& rhs) | 15 | + Example& operator=(Example&& rhs) // buggy |
16 | { | 16 | { |
17 | val = rhs.val; | 17 | val = rhs.val; |
18 | rhs.val = nullptr; | 18 | rhs.val = nullptr; |