English
Summary
Conclusions
An interface describes a capability that the client needs. Composition combines a context with a variable algorithm. A shared virtual base removes the duplicated state of a diamond. The lifetime of non-owning links is part of the contract.
Self-check questions
- What makes a class abstract?
- Why does a pure virtual destructor need a definition?
- Who initializes a virtual base?
- How does virtual inheritance differ from a virtual method?
- How does NVI guarantee a shared check?
- Can a private virtual method be overridden?
- What problems do a qualified name and using solve?
- When are several interfaces better than one large one?
- Who owns the strategy in the Order example?
- What is the risk of subscribing through a raw pointer?
- What happens to redo after a new command?
- How do you prepare the history for a possible allocation exception?
- What is a mixin, and what name risks does it add?
- Why does a layout diagram not allow reinterpret_cast between roles?
- When should you choose static polymorphism, and when dynamic polymorphism?