Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-04-05 12:23:11


From: "Gary Powell" <Gary.Powell_at_[hidden]>

> > MSVC 7 works, but says
> >
> > "assignment operator could not be generated" - for auto_ptr_ref
> <<
> I'm confused about what to do for this.

I added a private

   auto_ptr_ref & operator= (auto_ptr_ref const &);

to auto_ptr_ref and it seems to work.

This is also a problem for any class that derives from boost::noncopyable,
by the way.

> > "nonstandard extension used - non-const reference binds to non-lvalue"
in
> > main.cpp(89) (conversion from conversion from 'boost::auto_ptr<X>' to
> > 'boost::auto_ptr<X>::self &')
> <<
> I think this issue is under discussion by WG21.

Interesting... I can't quite understand what is causing this and why only
MSVC complains.

Another point, you are using several C-style casts, why?

--
Peter Dimov
Multi Media Ltd.

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