David Abrahams wrote:
> "Paul Mensonides" <[EMAIL PROTECTED]> writes:
>
> > Aleksey Gurtovoy wrote:
> >> David Abrahams wrote:
> >> > Here's an example I just cooked up of using the PP lib to solve a
> >> > classic C++ OO problem: repeated boilerplate in the definition of
> >> > Pimpl classes.
> >>
> >> There is another variation of the idiom, sometimes called
> >> "hidden state", which doesn't have the shortcoming in the first place:
> >
> > Dave, do you still think this would be a good example to add to the
> > docs?
>
> Well, yeah.  I don't understand how Aleksey's idiom accomplishes the
> same things as pimpl (yet).

I was talking about pimpl as described here -
http://www.gotw.ca/gotw/024.htm.

> I need to be able to plug in different
> runtime-polymorphic implementations behind the handle classes I'm
> defining.

Sounds like a job for an interface class + a factory function, unless your
objects need to be passed by value. In any case, IMO the latter one is more
correctly described as "handle/body".

Aleksey
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to