diff options
author | trofimenkov <trofimenkov@yandex-team.ru> | 2022-02-10 16:49:31 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:31 +0300 |
commit | 7c6139b61ced2798d1134b68b8facf6925a36b8e (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /util/generic/hash.h | |
parent | 30cebc2cfa79af3b577760a113e203a79450e6b6 (diff) | |
download | ydb-7c6139b61ced2798d1134b68b8facf6925a36b8e.tar.gz |
Restoring authorship annotation for <trofimenkov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic/hash.h')
-rw-r--r-- | util/generic/hash.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/util/generic/hash.h b/util/generic/hash.h index e02b8aff18..e46db21fa9 100644 --- a/util/generic/hash.h +++ b/util/generic/hash.h @@ -1651,31 +1651,31 @@ public: const T& at(const TheKey& key) const { using namespace ::NPrivate; const_iterator it = find(key); - + if (Y_UNLIKELY(it == end())) { ::NPrivate::ThrowKeyNotFoundInHashTableException(MapKeyToString(key)); } return it->second; - } - + } + template <class TheKey> T& at(const TheKey& key) { using namespace ::NPrivate; iterator it = find(key); - + if (Y_UNLIKELY(it == end())) { ::NPrivate::ThrowKeyNotFoundInHashTableException(MapKeyToString(key)); } - + return it->second; - } - + } + template <class TKey> size_type count(const TKey& key) const { return rep.count(key); } - + template <class TKey> std::pair<iterator, iterator> equal_range(const TKey& key) { return rep.equal_range(key); |