Hello everyone,
Why it is useless for any inheritance in Pimpl idiom? Here is the source, but no detailed reasons are provided.
http://www.gotw.ca/gotw/024.htm
--------------------
- make XImpl entirely the class that X would have been, and write X as only the public interface made up entirely of simple forwarding functions (a handle/body variant).
This is useful in a few restricted cases, and has the benefit of avoiding a back pointer since all services are available in the pimpl class. The chief drawback is that it normally makes the visible class useless for any inheritance, as either a base or a derived class.
--------------------
thanks in advance,
George
Why it is useless for any inheritance in Pimpl idiom? Here is the source, but no detailed reasons are provided.
http://www.gotw.ca/gotw/024.htm
--------------------
- make XImpl entirely the class that X would have been, and write X as only the public interface made up entirely of simple forwarding functions (a handle/body variant).
This is useful in a few restricted cases, and has the benefit of avoiding a back pointer since all services are available in the pimpl class. The chief drawback is that it normally makes the visible class useless for any inheritance, as either a base or a derived class.
--------------------
thanks in advance,
George