Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Person {
- // …
- // move constructor
- Person(Person&& other) : name(std::move(other.name)), age(std::move(other.age)) {}
- // move assignment operator
- Person& operator=(Person&& other) {
- name = std::move(other.name);
- age = std::move(other.age);
- return *this;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement