C++26: std::polymorphic 0 ▲ Sandor Dargo's Blog 11 minutes ago · Tech · hide · 0 comments In the previous article, we looked at std::indirect — C++26’s answer to the “I need a heap-allocated member with value semantics” problem. indirect<T> always stores exactly a T. But what if you need to store a Circle or a Rectangle through a Shape base class — and copy it without slicing? That’s std::polymorphic<T>, the other half of P3019R14. It owns a heap-allocated object whose ... No comments yet. Log in to reply on the Fediverse. Comments will appear here.