| ▲ | tialaramex 2 hours ago | |
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n13... "There is significant desire among C++ programmers for what we call destructive move semantics [...]" "In the end, we simply gave up on this as too much pain for not enough gain." | ||
| ▲ | LexiMax an hour ago | parent [-] | |
groan > When dealing with class hierarchies, destructive move semantics becomes problematic. If you move the base first, then the source has a constructed derived part and a destructed base part. If you move the derived part first then the target has a constructed derived part and a not-yet-constructed base part. Neither option seems viable. Several solutions to this dilemma have been explored. Add this to my "C++ chose the wrong kind of polymorphism to make first-class" tally. | ||