2 ms·
A move constructor/operator for POD or primitive types doesn't make any sense in the first place though (also AFAIK an object that contains a std::string - like
by flohofwoe 2y ago
A move constructor/operator for POD or primitive types doesn't make any sense in the first place though (also AFAIK an object that contains a std::string - like Person - is definitely not a POD?). Even if Person had a manually provided move-constructor and move-assignment-operator, a move would still perform a flat copy from the source to the destination object.
- gpderetta 2y agoCorrect on all accounts. It is definitely not a POD nor a standard layout type (the modern version of POD).