Boost logo

Boost :

From: Thorsten Ottosen (tottosen_at_[hidden])
Date: 2006-01-04 08:23:44


axter wrote:

>>The pointer-containers don't slica anything on their own.
>>If you insist on not making your class hierarchy non-copyable, I can't
>>help you.
>>
>
>
> I don't see that making a difference, but could you please post a small
> example class that is non-copyable, so that I can test it out.

struct Foo
{
private:
   Foo( const Foo& );
   Foo& operator=( const Foo& );
};

or

#include <boost/utility.hpp>

struct Bar : boost::noncopyable
{
};

In addition, an explicit copy-constructor will prohibit slicing on
compliant compilers.

-Thorsten


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