Boost logo

Boost :

From: Dave Harris (brangdon_at_[hidden])
Date: 2005-03-08 16:22:12


In-Reply-To: <422D79A6.4050502_at_[hidden]>
aaronrabiddog51_at_[hidden] (Aaron W. LaFramboise) wrote (abridged):
> > I have always thought that concrete implementations of portable
> > libraries should supply users a way to get at the OS-specific data so
> > they can use platform-specific facilities on them if neccessary.
> [...]
> It seems to me that, by doing this, we are throwing away so many
> correctness guarantees. To me, this seems sort of like taking
> shared_ptr, and making it implicitly convertable to a pointer.

Surely it's more like taking shared_ptr and giving it an explicit get()
function? You can break invariants by doing stuff like:
    delete p.get();

but people are unlikely to do that by accident. Access to the underlying
raw pointer is essential for inter-operating with software which isn't
smart-pointer aware. So it is with OS handles.

-- Dave Harris, Nottingham, UK


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