> lbonaf
...@yahoo.com wrote:
> > Every example I see (including on boost::org) of using noncopyable
> > involves inheriting from it privately. Is there a drawback from
> > inheriting publicly? Is it just that it's not a good example of and
> > "is-a" relationship?
> You've pretty much answered the question already. You don't want people
> making a function like:
> void profoundlyUselessFunction(const boost::noncopyable &);
> The typical use of boost::noncopyable is a "implemented in terms of"
> relationship, which is best modeled by inheriting privately.
> From a technical standpoint, since everything interesting in
> boost::noncopyable is private already, whether you inherit publicly or
> privately makes very little difference.
> --
> Alan Johnson
That was a great answer =)