Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-07-24 12:16:52


From: "Greg Colvin" <gcolvin_at_[hidden]>
> It could be exploited in generic code that didn't care whether
> it was operating on raw pointers or smart pointers?

In theory, yes, it could. But I can't think of an example.

template<class P> void generic(P p)
{
// P ~= T * (or smart_ptr<T>)
// need to downcast to Q = U * (or smart_ptr<U>)
// no can do, can't determine Q from P without rebind<>
}

Perhaps I lack imagination. :-)

--
Peter Dimov
Multi Media Ltd.

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