Merge pull request #43 from runewalsh/master

std::move typo
This commit is contained in:
Anthony Calandra
2018-09-05 10:48:09 -04:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -559,7 +559,7 @@ Transferring `std::unique_ptr`s:
```c++ ```c++
std::unique_ptr<int> p1{ new int }; std::unique_ptr<int> p1{ new int };
std::unique_ptr<int> p2 = p1; // error -- cannot copy unique pointers std::unique_ptr<int> p2 = p1; // error -- cannot copy unique pointers
std::unique_ptr<int> p3 = std::move(p1); // move `p1` into `p2` std::unique_ptr<int> p3 = std::move(p1); // move `p1` into `p3`
// now unsafe to dereference object held by `p1` // now unsafe to dereference object held by `p1`
``` ```

View File

@@ -1151,7 +1151,7 @@ Transferring `std::unique_ptr`s:
```c++ ```c++
std::unique_ptr<int> p1{ new int }; std::unique_ptr<int> p1{ new int };
std::unique_ptr<int> p2 = p1; // error -- cannot copy unique pointers std::unique_ptr<int> p2 = p1; // error -- cannot copy unique pointers
std::unique_ptr<int> p3 = std::move(p1); // move `p1` into `p2` std::unique_ptr<int> p3 = std::move(p1); // move `p1` into `p3`
// now unsafe to dereference object held by `p1` // now unsafe to dereference object held by `p1`
``` ```