
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:
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
Thorsten Ottosen wrote: 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