On 02/25/17 09:49 AM, Paul wrote:
> Here is some basic pimpl code below:
> I don't understand why this is legal. It seems that class widget{..}
> defines widget as a base class.
Where?
> And then class widget is then redefined as a class privately inheriting
> from impl.
Where?
> Why isn't widget being illegally defined twice?
> Also, can someone explain pimpl to me or direct me to a good explanation?
I think you need to explain where your conclusions (above) came from,
the code does not support them.
> class widget {
No base class...
> public:
> widget();
> ~widget();
> private:
> class impl;
> unique_ptr<impl> pimpl;
Contains a nested impl class, no inheritance.
--
Ian