|
Boost : |
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2007-12-12 09:47:07
David Abrahams skrev:
> on Tue Dec 11 2007, Thorsten Ottosen <thorsten.ottosen-AT-dezide.com> wrote:
>
>> David Abrahams skrev:
>>> on Fri Dec 07 2007, Ion Gaztañaga <igaztanaga-AT-gmail.com> wrote:
>>>
>>>> Thorsten Ottosen wrote:
>>>>> One thing puzzled me though:
>>>>> (see http://igaztanaga.drivehq.com/unordered/unordered/comparison.html)
>>>>>
>>>>> "The containers hash or predicate function can throw exceptions from erase"
>>>> Certainly, Daniel has tried to achieve strong exception guarantees and
>>>> the implementation becomes quite complicated if comparison/hash throws.
>>>> Double buffering and other tricks are needed. I think this is a very
>>>> good question both for boosters and people from the LWG.
>>> When specifying requirements in the standard, we (the LWG) don't like
>>> to constrain implementations or users if possible. I don't see any
>>> reason to forbid a throwing comparison or hash.
>> Right, but this is often a double-edged sword. Think of problems with
>> allowing std::list<T>::size() to be O(n).
>
> Or allowing ptr_container<T> to not be assignable and
> copy-constructible?
yes. FWIW, they are in 1.35.
-Thorsten
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk