Post by DanielThe cppreference documentation doesn't identify any exceptions.
https://en.cppreference.com/w/cpp/container/map/contains
Hmm? Be constructive. How you suggest to define it then?
Let me try ...
bool contains( const Key& key ) const
noexcept(noexcept(key_comp()(key, key)));
That? Does that work?
Note that contains() is C++2020 map feature and C++2020 standard does
not exist yet. I don't even understand why to add it since it does
exactly same thing that std::map::count() already does. However
if it is possible to add such noexcept specifications then these
should perhaps be added to *lot* of other functions as well.