Boost logo

Boost :

From: Daniel Frey (daniel.frey_at_[hidden])
Date: 2001-09-18 06:33:56


dietmar_kuehl_at_[hidden] wrote:
>
> Hi,
> --- In boost_at_y..., Daniel Frey <daniel.frey_at_a...> wrote:
> > David Abrahams wrote:
> > >
> > > > class A : noncopyable {};
> > > > class B : public A, noncopyable {};
> > >
> > > Then you can try to disable the warnings... ;-)
> >
> > How about:
> >
> > #define BOOST_NONCOPYABLE virtual ::boost::noncopyable
> [snip]
>
> Why would anybody want to do something like this? If a class is

The original message implies that people at least try to do it and IMHO
it's a reasonable approach as using noncopyable is also a kind of
documentation or clarification. Otherwise the code will look like this:

  class B : public A /* A is noncopyable */ {};

which is IMHO not a good solution. Ommiting it completely is not a good
style either. Technically you're right, but 'noncopyable' is (at least
for me) mostly a convenient way to document a classes property.

Regards, Daniel

--
Daniel Frey
aixigo AG - financial training, research and technology
Schloß-Rahe-Straße 15, 52072 Aachen, Germany
fon: +49 (0)241 936737-42, fax: +49 (0)241 936737-99
eMail: daniel.frey_at_[hidden], web: http://www.aixigo.de

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk