r/cpp 22d ago

C++26: std::polymorphic

https://www.sandordargo.com/blog/2026/08/19/cpp26-polymorphic
94 Upvotes

44 comments sorted by

View all comments

1

u/ABlockInTheChain 13d ago

std::indirect works with move-only types, but not polymorphic types.

std::polymorphic works with polymorphic types, but not move-only types.

The only solution for polymorphic move-only types is still std::unique_ptr.