Boost logo

Boost :

From: Daniel Frey (daniel.frey_at_[hidden])
Date: 2001-09-18 02:50:16

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

to be used as

class B : public A, BOOST_NONCOPYABLE {};

does anyone see any problem? Is this a bad approach? Should it be added
to boost/utility.hpp?

Another approach, if we don't care too much about namespaces: you could
even rename noncopyable to noncopyable_t and add

#define noncopyable virtual ::boost::noncopyable_t

but I don't like this very much :)

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:

Boost list run by bdawes at, gregod at, cpdaniel at, john at