The C++ standard sometimes uses the phrase "shall not throw exceptions", for instance in 17.6.3.4 when enumerating the Hash requirements. Does this imply that a standard-conforming implementation must mark the call operator of std::hash as noexcept or does this just implies that throwing from within a hash functor incurs in undefined or implementation-defined behaviour?
I checked that both libstdc++ and libc++ mark std::hash's call operator as noexcept, but I would like to understand if this is a required behaviour or not.
Aucun commentaire:
Enregistrer un commentaire