Date: 2001-07-08 03:10:47
--- 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
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.
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
Saving two lines of code is not worth messing up a class hierarchy
(in addition to the problems mentioned by the OP).
Ivan Vecerina (a new poster here)
> * Deriving from noncopyable invokes warnings/remarks from MSVC and
> C++. In order to suppress them, I have to declare the copy
> the assignment operator private, which defeats the purpose.
> * In order to derive from boost::noncopyable, I have to introduce a
> dependency on boost/utility.hpp. Since headers with such names tend
> change frequently, this means frequent recompilations for no
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk