summaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-02-26 19:58:13 +0100
committerGitHub <noreply@github.com>2022-02-26 19:58:13 +0100
commit4b5b0e6471435c76d60339f274067e004010ea2a (patch)
tree5fc2536ed1ef5ed281a1e740b23532cf7e3cc12d /vespalib
parent30e64b4edbc50b51930d04200cb02ad66b5ff3f8 (diff)
parent1060bbee36edcefdd33af6bc36655d4163380ced (diff)
Merge pull request #21414 from vespa-engine/toregge/add-noexcept-specifiers-in-vespalib
Add noexcept specifiers (vespalib).
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/tests/stllike/hash_test.cpp4
-rw-r--r--vespalib/src/vespa/vespalib/datastore/unique_store_enumerator.hpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/vespalib/src/tests/stllike/hash_test.cpp b/vespalib/src/tests/stllike/hash_test.cpp
index 5cba6f73e10..c530bbdb14a 100644
--- a/vespalib/src/tests/stllike/hash_test.cpp
+++ b/vespalib/src/tests/stllike/hash_test.cpp
@@ -455,8 +455,8 @@ class WrappedKey
public:
WrappedKey() : _key() { }
WrappedKey(int key) : _key(std::make_unique<const int>(key)) { }
- size_t hash() const { return vespalib::hash<int>()(*_key); }
- bool operator==(const WrappedKey &rhs) const { return *_key == *rhs._key; }
+ size_t hash() const noexcept { return vespalib::hash<int>()(*_key); }
+ bool operator==(const WrappedKey &rhs) const noexcept { return *_key == *rhs._key; }
};
}
diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store_enumerator.hpp b/vespalib/src/vespa/vespalib/datastore/unique_store_enumerator.hpp
index 83e9b10c6d6..ec3b0c54bda 100644
--- a/vespalib/src/vespa/vespalib/datastore/unique_store_enumerator.hpp
+++ b/vespalib/src/vespa/vespalib/datastore/unique_store_enumerator.hpp
@@ -56,7 +56,7 @@ void
UniqueStoreEnumerator<RefT>::enumerateValues()
{
_next_enum_val = 1;
- _dict_snapshot->foreach_key([this](EntryRef ref) { enumerateValue(ref); });
+ _dict_snapshot->foreach_key([this](EntryRef ref) noexcept { enumerateValue(ref); });
}
template <typename RefT>