Composite objects and C++26 the std::polymorphic type
Summary
The article introduces std::polymorphic in C++26 for composing objects with polymorphic members, compares it with std::indirect and std::variant, and provides a practical example of an EventLog that copy-copies its content. It argues how std::polymorphic enables value semantics, eliminates the need for a clone method, and improves interface cleanliness and const propagation.