
From: Caleb Epstein <caleb.epstein@gmail.com>
On 10/4/05, Asger Mangaard <tmb@tmbproductions.com> wrote:
My understanding is that the class that holds the pimpl (lets call it the Interface class) generally provides forwarding methods that invoke methods on an Implementation class (the class pointed to by m_pImpl). From what I can see of your implementation, if a user wants to invoke Implementation::foo, they will need to include Implementation.h, which effectively negates the benefit of pimpl in the first place.
For pimpl to work, the implementation class must be complete when you try to use it. No library can eliminate that. The pimple library automates the memory management, including during copying and copy assignment, so you don't have to. Thus, you declare a pimpl object and, in the process, forward declare your impl type, and in exchange, you get automated memory management. Where's the problem? -- Rob Stewart stewart@sig.com Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;