logoalt Hacker News

aw1621107 • today at 8:03 AM • 1 reply • view on HN

Looks like it depends on the specific operation(s) you want to perform [0]. For instance, constructing a std::polymorphic<T> from an object of type T or derived from T requires that that object is copy-constructible (among other requirements), but copy-assigning one std::polymorphic<T> to another only requires that T is complete.

[0]: https://eel.is/c++draft/polymorphic


Replies

MFHava • today at 10:16 AM

Well, https://eel.is/c++draft/polymorphic#assign-2.2 requires copy-constructibility.

➕ show 1 reply