From: David Abrahams (dave_at_[hidden])
Date: 2004-01-03 09:24:52
Howard Hinnant <hinnant_at_[hidden]> writes:
> On Jan 2, 2004, at 7:48 PM, Jeremy Maitin-Shepard wrote:
>>> Why is that better? It seems overconstrained to me.
>> I have a hard time seeing what a user would do with the remaining
>> elements other than erase them.
> Perhaps a hash container contains expensive-to-compute elements. And
> if the hash function throws and some of the elements are then lost,
> the program may decide to catch the exception, correct the problem,
> and then rebuild the lost elements. It could examine the container
> and discover what needs to be recomputed. Why force it to start over
> from an empty container?
Actually, this scenario is fairly realistic. The container might be
acting as a cache, and the loss of some, but not all, of the elements
might be harmless.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk