Skip to content

Glossary: Software Design Patterns in C++

Liskov substitution principle

Also written: LSP

The L in SOLID: a child class must work anywhere its parent works. A `LockedCard` that throws in `top_up` breaks what a `GiftCard` promises.

Where the book teaches it

Related terms

SOLIDHas-a / is-a