|
Boost : |
From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-07-08 07:32:33
----- Original Message -----
From: <ivec_at_[hidden]>
> --- In boost_at_y..., "Peter Dimov" <pdimov_at_m...> wrote:
> > I disagree with the 'noncopyable' guideline. Here's why:
>
> I would also prefer this guideline to be removed, as well as the
> recommendation mentioned by Aleksey
> (at http://www.boost.org/more/library_reuse.htm).
>
> I have stopped using noncopyable mostly because it creates an
> inheritance relationship between unrelated classes that rely on it.
> The inconvenience is especially severe when using a reverse-
> engineering tool (e.g. free www.doxygen.org) which generates
> graphical class hierarchies.
Can't you tell it to ignore private inheritance?
> I currently prefer adding the individual copy-ctr & op=. No big deal.
> If anything, I would rather use a preprocessor macro (e.g. add a
> BOOST_DEFINE_NON_COPYABLE).
>
> Saving two lines of code is not worth messing up a class hierarchy
> (in addition to the problems mentioned by the OP).
It's not messed up in the classical sense: noncopyable should not be a
public base; it's just a (non-) implementation detail.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk