
5 May
2011
5 May
'11
3:52 p.m.
On 05/05/2011 09:34 AM, Thorsten Ottosen wrote:
Maybe we need a specialization boost::optional<T*> that does not store a boolean flag (and otherwise behave like optional<T&>?
That would change the semantics of the existing type.
Or a new dummy smart pointer to signify that the held ptr object is owned by another object. E.g. boost::ptr<T> ?
I like it! boost::dumb_and_weak_pointer<T> ? You could do it today with shared_ptr and a custom no-op deleter, or more efficiently with intrusive_ptr and no-op implementations of intrusive_ptr_(add_ref|release). - Marsh