aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/variant.h
diff options
context:
space:
mode:
authoreeight <eeight@yandex-team.ru>2022-02-10 16:46:19 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:19 +0300
commitbd085aee9b4f7a0bee302ce687964ffb7098f986 (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /util/generic/variant.h
parent475c0a46f28166e83fd263badc7546377cddcabe (diff)
downloadydb-bd085aee9b4f7a0bee302ce687964ffb7098f986.tar.gz
Restoring authorship annotation for <eeight@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic/variant.h')
-rw-r--r--util/generic/variant.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/util/generic/variant.h b/util/generic/variant.h
index 080f0a6e7e..749fc75090 100644
--- a/util/generic/variant.h
+++ b/util/generic/variant.h
@@ -1,23 +1,23 @@
#pragma once
-#include "hash.h"
+#include "hash.h"
-#include <variant>
+#include <variant>
template <class... Ts>
-struct THash<std::variant<Ts...>> {
+struct THash<std::variant<Ts...>> {
public:
- size_t operator()(const std::variant<Ts...>& v) const noexcept {
- return CombineHashes(
- IntHash(v.index()),
- v.valueless_by_exception() ? 0 : std::visit([](const auto& value) { return ComputeHash(value); }, v));
+ size_t operator()(const std::variant<Ts...>& v) const noexcept {
+ return CombineHashes(
+ IntHash(v.index()),
+ v.valueless_by_exception() ? 0 : std::visit([](const auto& value) { return ComputeHash(value); }, v));
}
};
template <>
-struct THash<std::monostate> {
+struct THash<std::monostate> {
public:
- constexpr size_t operator()(std::monostate) const noexcept {
+ constexpr size_t operator()(std::monostate) const noexcept {
return 1;
}
};