std::set<T>::erase(key). What if key isn't there?

Posted by Armen Tsirunyan on Stack Overflow See other posts from Stack Overflow or by Armen Tsirunyan
Published on 2010-12-24T10:40:00Z Indexed on 2010/12/24 10:54 UTC
Read the original article Hit count: 213

Filed under:
|
|

if I erase an element from an std::set and pass the key, not the iterator, and the key isn't in the set right now, will an exception be thrown? The thing is every second sentence in the MSDN documentation says: "this does blah blah, but it doesn't conform to the standard". So I need to know the standard behaviour. I just couldn't find it in the standard. Redirecting to the relevant clause will do as well. Thanks.

© Stack Overflow or respective owner

Related posts about c++

Related posts about stl