
Vladimir Batov wrote:
Out of curiosity in this and all other examples of this pimpl library public inheritance is used. Isn't this an implemented in terms (spelled private) of rather than an IS-A (spelled public) relationship?
I'm sure there is a technical reason I'm missing.
I the examples I build two separate hierarchies -- for interfaces and for implementations. Those examples are to demonstrate pimpl<> deployment for polymorphic classes, i.e. with IS-A kind of relationship. I am not sure where "implemented in terms" comes in as interfaces inherit from interfaces and implementations inherit from implementations. Clearly IS-A as far as I can see.
You consider pimpl part of the interface? Interesting... I've always thought of it as an implementation detail to build compiler firewalls. I.E. any class I've made using the pimpl idiom I could have built the same interface with more external dependencies and heavier compile times.