Boost logo

Boost :

From: Ric Parkin (ric.parkin_at_[hidden])
Date: 2003-04-16 12:27:16


James Curran wrote:
> Thomas Witt wrote:
>
>>Sorry for being so dumb, but the intent isn't clear to me. What kind
>>of ownership semantics should dumb_ptr imply?
>
>
> I believe he's looking for something along the lines up (modulo this
> particular syntax no being allowed yet)
>
> template <typename C>
> typedef C* dumb_ptr;

Wouldn't a ptr<> also need to *prevent* some things like

ptr< Blah > blah = get_blah_that_someone_else_owns();

blah->foo();

delete blah; // compile error!

ie, you can use it like a pointer, but the ownership policy is 'look but
don't touch'?

Ric


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