Boost logo

Boost :

From: James Dennett (jdennett_at_[hidden])
Date: 2002-04-30 14:52:37


Andrei Alexandrescu wrote:
> "Beman Dawes" <bdawes_at_[hidden]> wrote in message
>>* There was a bit of discussion and show of hands on non-member versus
>
> member functions. No clear guidance resulted; the existing use of member
> functions in std::auto_ptr and the Boost smart pointers muddied the
> question.<
>
> I understand. For me, the argument came from the real world. I remember to
> this day the bug we had in a COM transaction server. The wizard generated
> wrong source code that used sp->Release() instead of sp.Release(). The code
> would sometimes crash on exit. Tons of code reviews did not make a
> difference. In the end, someone discovered the problem in some bug document.

I had a similar problem with a std::auto_ptr to a Qt widget,
which had a reset method IIRC. It didn't take long to find,
but this kind of problem would be eliminated if smart pointers
had non-member based interfaces.


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