
11 Dec
2007
11 Dec
'07
8:26 p.m.
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, Ion