Boost logo

Boost :

From: Yitzhak Sapir (yitzhaks_at_[hidden])
Date: 2002-06-27 07:05:50


I've had problems with the #import<> generated files defining operator& for all their smart pointers. These, in turn, release the smart pointer. This causes problems with stl containers, at least in stlport, but I suppose it might be a more generic problem across other stl implementations.

Anyway, the point is, #import auto-generates operator& and you have no control over this.

> -----Original Message-----
> From: Peter Dimov [mailto:pdimov_at_[hidden]]
> Sent: Thursday, June 27, 2002 12:22 PM
> To: boost_at_[hidden]
> Subject: Re: [boost] On ownership policies and boost::raw_ptr
>
>
> From: "Joe Gottman" <jgottman_at_[hidden]>
> > >
> > > And I still like &*p better than p.get() or mumble_ptr(p).
> > >
> >
> > I don't. &*p has two disadvantages. The major one is that it is
> > undefined if p.get() happens to be null. Also, it fails if
> the class that
> p
> > points to has operator& overloaded.
>
> Programmers who overload unary operator& should be sentenced
> to writing
> libraries that need to operate properly when fed such classes.
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>


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