Skip to content

Glossary: Software Design Patterns in C++

Slice

Also written: slicing, object slicing

Copying a derived object into a base-class variable, which keeps only the base part. Holding wrappers by `unique_ptr` to the base avoids it.

Where the book teaches it

Related terms

std::unique_ptrDecorator