[C++-sig] Re: Making Boost.Python understand DerivedSafe

David Abrahams dave at boost-consulting.com
Fri Jun 25 16:04:20 CEST 2004


Chad Austin <caustin at gmail.com> writes:

>> 
>> Bah!
>> 
>>         T* p = x.get();
>>         delete p;
>
> Of course you can work around it.  :P  The point is, it does help
> catch unintentional bugs, especially in code written by someone new to
> refcounting/smart pointers or when refactoring.

Just to be clear, I have no problem with that part; it's having the
implicit conversion at all that I take issue with... but I see below
you don't really care what I think about this ;-> (I can't blame you).

>> > . This techique is used in both ATL and nsCOMPtr in Mozilla).
>> 
>> That doesn't make it safe ;->
>
> We can go back and forth for eternity arguing about C++ style, but
> that doesn't get anywhere.  I really just wanted some help in getting
> this existing codebase connected nicely to Python.

I hope you got the help you needed.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com





More information about the Cplusplus-sig mailing list