|
Boost : |
From: Angus Leeming (angus.leeming_at_[hidden])
Date: 2004-01-09 07:19:44
Peter Dimov wrote:
>> Will your code work just as well if unique changed to:
>>
>> bool unique() const // nothrow
>> {
>> return weak_count() == 1;
>> }
>>
>> ??
>
> In this case weak pointers should not prevent remove() from removing
> the item from the cache. Presumably, whoever has the weak pointer
> does not want it to keep the cache line alive (otherwise he would
> have used a shared_ptr.)
Good point.
Angus
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk