
on Tue Dec 11 2007, Ion GaztaƱaga <igaztanaga-AT-gmail.com> wrote:
David Abrahams wrote:
so the predicate for associative container should not throw, because erase(const key_type &k) can't throw.
They're unrelated.
So the exception specification for that erase version is missing. I thought that erase(const key_type &) was allowed to throw, but "no erase(), pop_back() or pop_front() function throws an exception" seems quite generic. If "erase()" means "erase(iterator)" I think it would be nice to clarify it and explicitly state if the Comparison function is allowed to throw.
Just my 2 cents,
I think you're right. This looks like a defect to me. Howard: my suggested resolution is to say, for erase(key_type const&), no exception is thrown other than by the comparison function. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com