|
Boost : |
From: Greg Colvin (greg_at_[hidden])
Date: 2002-06-26 13:43:03
At 11:00 AM 06/26/2002, you wrote:
>From: "Greg Colvin" <greg_at_[hidden]>
>
>> >I think 'c_ptr' would be a very good choice.
>>
>> And I still like &*p better than p.get() or mumble_ptr(p).
>
>Causes undefined behavior if p is a null pointer, though. :(
Doesn't seem like it should have to, but no such luck.
Of course lots of code using pointers expects never to
encounter a null pointer anyway, and I'd expect to see
code that tests for null-ness to use p directly before
the conversion to a raw pointer. But I don't know what
the use cases are for mumble_ptr.
I've been traveling and am jumping in late, so mabye
this went by already, but I could see the point in
defining raw_ptr<T> as a wrapper class for a raw
pointer which, unlike shared_ptr and all, has a
conversion to T*.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk