File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -191,7 +191,7 @@ inline bool same_type(const std::type_info &lhs, const std::type_info &rhs) {
191191}
192192
193193struct type_hash {
194- size_t operator ()(const std::type_index &t) const {
194+ size_t operator ()(const std::type_index &t) const noexcept {
195195 size_t hash = 5381 ;
196196 const char *ptr = t.name ();
197197 while (auto c = static_cast <unsigned char >(*ptr++)) {
@@ -202,7 +202,7 @@ struct type_hash {
202202};
203203
204204struct type_equal_to {
205- bool operator ()(const std::type_index &lhs, const std::type_index &rhs) const {
205+ bool operator ()(const std::type_index &lhs, const std::type_index &rhs) const noexcept {
206206 return lhs.name () == rhs.name () || std::strcmp (lhs.name (), rhs.name ()) == 0 ;
207207 }
208208};
@@ -218,7 +218,7 @@ template <typename value_type>
218218using type_map = std::unordered_map<std::type_index, value_type, type_hash, type_equal_to>;
219219
220220struct override_hash {
221- size_t operator ()(const std::pair<const PyObject *, const char *> &v) const {
221+ size_t operator ()(const std::pair<const PyObject *, const char *> &v) const noexcept {
222222 size_t value = std::hash<const void *>()(v.first );
223223 value ^= std::hash<const void *>()(v.second ) + 0x9e3779b9 + (value << 6 ) + (value >> 2 );
224224 return value;
You can’t perform that action at this time.
0 commit comments