What does Is-Implemented-In-Terms-Of mean? It may surprise you to learn there are definite exception-safety consequences when choosing between inheritance and delegation . Can you spot them?
What does Is-Implemented-In-Terms-Of mean?
In C++, Is-Implemented-In-Terms-Of can be expressed by either nonpublic inheritance or by containment/delegation. That is, when writing a class T that is implemented in terms of a class U , the two main options are to inherit privately from U or to contain a U member object.
Does the choice between these techniques have exception safety implications? Explain. (Ignore any issues not related to exception safety.)