4 ms·
struct Person { string name; uint8_t age; }; isn't this missing a move constructor? Person::Person(Person&& p) : name(std::move(p.name)), age(p.ag
by cpp_noob 2y ago
struct Person {
string name;
uint8_t age;
};
isn't this missing a move constructor?
Person::Person(Person&& p) : name(std::move(p.name)), age(p.age) {}
or is C++ able to make these implicitly now?
- Maxatar 2y agoThe move and copy constructors are implicit.