|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-04-28 14:10:41
Howard Hinnant wrote:
> I've got 3 ownership policies on my mind:
>
> 1. shared
> 2. unique
> 3. cloned
>
> And if anything I'm leaning towards shallow const on all of them.
> However I also believe deep const versions of all of these would
> probably be valuable as well. And I'm especially looking at
> signatures like:
>
> template<class T, class U>
> bool operator==(const shared_ptr<T>& a, const shared_ptr<U>& b);
>
> shared_ptr today is a shallow const animal, and I think that is good.
> But the above signature assumes deep const. It would be nice to have
> a zero-overhead way to express and enforce that assumption.
I'm not sure I understand. Why does the above assume deep const? It's just
the shared_ptr equivalent of:
template<class T, class U>
bool operator==(T * const & a, U * const & b);
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk