Boost logo

Boost :

From: Daniel Wallin (dalwan01_at_[hidden])
Date: 2004-01-19 09:36:53


Daryle Walker wrote:
> If you want a pointer whose "const" state matches that of the pointer-to
> object, you can make you own smart pointer for it. Just like using an
> "auto_ptr" as a class member to prevent forgetting of pointer-based
> deletion, this new smart pointer will allow a pointed-to (owned) object to
> have the same "const"-ness of the current member function, instead of having
> no qualifications (and be changed if the programmer accidentally uses the
> object in a non-const manner). Post it to Boost for inclusion when you're
> done!

FWIW, that is exactly what I did and what this thread was about from the
start. ;)

-- 
Daniel Wallin

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