If I understand slicing correctly I don\'t think this could happen with pointers or smart pointers. For example, if you had:
Something error with my code. I use forward declaration in my class <RenderPass>, th开发者_运维技巧e std::unique_ptr<RenderPass> and std::list<std::unique_ptr<RenderPass>> work