| ▲ | MFHava a day ago | |
Well, https://eel.is/c++draft/polymorphic#assign-2.2 requires copy-constructibility. | ||
| ▲ | aw1621107 a day ago | parent [-] | |
Ah, you're right, that's a bad example. I had assumed that that kind of precondition would be explicitly mentioned so I didn't read the rest of the text as closely as I should have. Perhaps move-assignment would have been a better example? That one at least mentions construction using an rvalue so I think that specific operation would work for move-only types. Though now that I think about a bit more I suppose it's a bit of a moot point since the constructors all look like they require a copy-constructible T | ||