aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/hash_set.h
diff options
context:
space:
mode:
authorVlad Yaroslavlev <vladon@vladon.com>2022-02-10 16:46:25 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:25 +0300
commit344ea37b4a345701ab0e67de2266a1c1bd7baf2d (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /util/generic/hash_set.h
parent706b83ed7de5a473436620367af31fc0ceecde07 (diff)
downloadydb-344ea37b4a345701ab0e67de2266a1c1bd7baf2d.tar.gz
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 2 of 2.
Diffstat (limited to 'util/generic/hash_set.h')
-rw-r--r--util/generic/hash_set.h72
1 files changed, 36 insertions, 36 deletions
diff --git a/util/generic/hash_set.h b/util/generic/hash_set.h
index 7890b7ab07..e8088cf23b 100644
--- a/util/generic/hash_set.h
+++ b/util/generic/hash_set.h
@@ -9,9 +9,9 @@
#undef value_type
template <class Value, class HashFcn, class EqualKey, class Alloc>
-class THashSet {
+class THashSet {
private:
- using ht = THashTable<Value, Value, HashFcn, ::TIdentity, EqualKey, Alloc>;
+ using ht = THashTable<Value, Value, HashFcn, ::TIdentity, EqualKey, Alloc>;
ht rep;
using mutable_iterator = typename ht::iterator;
@@ -43,76 +43,76 @@ public:
}
public:
- THashSet() {
+ THashSet() {
}
template <class TT>
- explicit THashSet(TT* allocParam, size_type n = 0)
+ explicit THashSet(TT* allocParam, size_type n = 0)
: rep(n, hasher(), key_equal(), allocParam)
{
}
- explicit THashSet(size_type n)
+ explicit THashSet(size_type n)
: rep(n, hasher(), key_equal())
{
}
- THashSet(size_type n, const hasher& hf)
+ THashSet(size_type n, const hasher& hf)
: rep(n, hf, key_equal())
{
}
- THashSet(size_type n, const hasher& hf, const key_equal& eql)
+ THashSet(size_type n, const hasher& hf, const key_equal& eql)
: rep(n, hf, eql)
{
}
- THashSet(std::initializer_list<value_type> list)
+ THashSet(std::initializer_list<value_type> list)
: rep(list.size(), hasher(), key_equal())
{
rep.insert_unique(list.begin(), list.end());
}
- THashSet(std::initializer_list<value_type> list, size_type n)
+ THashSet(std::initializer_list<value_type> list, size_type n)
: rep(n, hasher(), key_equal())
{
rep.insert_unique(list.begin(), list.end());
}
- THashSet(std::initializer_list<value_type> list, size_type n, const hasher& hf)
+ THashSet(std::initializer_list<value_type> list, size_type n, const hasher& hf)
: rep(n, hf, key_equal())
{
rep.insert_unique(list.begin(), list.end());
}
- THashSet(std::initializer_list<value_type> list, size_type n, const hasher& hf, const key_equal& eql)
+ THashSet(std::initializer_list<value_type> list, size_type n, const hasher& hf, const key_equal& eql)
: rep(n, hf, eql)
{
rep.insert_unique(list.begin(), list.end());
}
template <class InputIterator>
- THashSet(InputIterator f, InputIterator l)
+ THashSet(InputIterator f, InputIterator l)
: rep(0, hasher(), key_equal())
{
rep.insert_unique(f, l);
}
template <class InputIterator>
- THashSet(InputIterator f, InputIterator l, size_type n)
+ THashSet(InputIterator f, InputIterator l, size_type n)
: rep(n, hasher(), key_equal())
{
rep.insert_unique(f, l);
}
template <class InputIterator>
- THashSet(InputIterator f, InputIterator l, size_type n,
+ THashSet(InputIterator f, InputIterator l, size_type n,
const hasher& hf)
: rep(n, hf, key_equal())
{
rep.insert_unique(f, l);
}
template <class InputIterator>
- THashSet(InputIterator f, InputIterator l, size_type n,
+ THashSet(InputIterator f, InputIterator l, size_type n,
const hasher& hf, const key_equal& eql)
: rep(n, hf, eql)
{
rep.insert_unique(f, l);
}
- // THashSet has implicit copy/move constructors and copy-/move-assignment operators
- // because its implementation is backed by THashTable.
+ // THashSet has implicit copy/move constructors and copy-/move-assignment operators
+ // because its implementation is backed by THashTable.
// See hash_ut.cpp
public:
@@ -129,7 +129,7 @@ public:
explicit operator bool() const noexcept {
return !empty();
}
- void swap(THashSet& hs) {
+ void swap(THashSet& hs) {
rep.swap(hs.rep);
}
@@ -261,7 +261,7 @@ public:
};
template <class Value, class HashFcn, class EqualKey, class Alloc>
-inline bool operator==(const THashSet<Value, HashFcn, EqualKey, Alloc>& hs1, const THashSet<Value, HashFcn, EqualKey, Alloc>& hs2) {
+inline bool operator==(const THashSet<Value, HashFcn, EqualKey, Alloc>& hs1, const THashSet<Value, HashFcn, EqualKey, Alloc>& hs2) {
if (hs1.size() != hs2.size()) {
return false;
}
@@ -274,14 +274,14 @@ inline bool operator==(const THashSet<Value, HashFcn, EqualKey, Alloc>& hs1, con
}
template <class Value, class HashFcn, class EqualKey, class Alloc>
-inline bool operator!=(const THashSet<Value, HashFcn, EqualKey, Alloc>& hs1, const THashSet<Value, HashFcn, EqualKey, Alloc>& hs2) {
+inline bool operator!=(const THashSet<Value, HashFcn, EqualKey, Alloc>& hs1, const THashSet<Value, HashFcn, EqualKey, Alloc>& hs2) {
return !(hs1 == hs2);
}
template <class Value, class HashFcn, class EqualKey, class Alloc>
-class THashMultiSet {
+class THashMultiSet {
private:
- using ht = THashTable<Value, Value, HashFcn, ::TIdentity, EqualKey, Alloc>;
+ using ht = THashTable<Value, Value, HashFcn, ::TIdentity, EqualKey, Alloc>;
ht rep;
public:
@@ -310,58 +310,58 @@ public:
}
public:
- THashMultiSet()
+ THashMultiSet()
: rep(0, hasher(), key_equal())
{
}
- explicit THashMultiSet(size_type n)
+ explicit THashMultiSet(size_type n)
: rep(n, hasher(), key_equal())
{
}
- THashMultiSet(size_type n, const hasher& hf)
+ THashMultiSet(size_type n, const hasher& hf)
: rep(n, hf, key_equal())
{
}
- THashMultiSet(size_type n, const hasher& hf, const key_equal& eql)
+ THashMultiSet(size_type n, const hasher& hf, const key_equal& eql)
: rep(n, hf, eql)
{
}
template <class InputIterator>
- THashMultiSet(InputIterator f, InputIterator l)
+ THashMultiSet(InputIterator f, InputIterator l)
: rep(0, hasher(), key_equal())
{
rep.insert_equal(f, l);
}
template <class InputIterator>
- THashMultiSet(InputIterator f, InputIterator l, size_type n)
+ THashMultiSet(InputIterator f, InputIterator l, size_type n)
: rep(n, hasher(), key_equal())
{
rep.insert_equal(f, l);
}
template <class InputIterator>
- THashMultiSet(InputIterator f, InputIterator l, size_type n,
+ THashMultiSet(InputIterator f, InputIterator l, size_type n,
const hasher& hf)
: rep(n, hf, key_equal())
{
rep.insert_equal(f, l);
}
template <class InputIterator>
- THashMultiSet(InputIterator f, InputIterator l, size_type n,
+ THashMultiSet(InputIterator f, InputIterator l, size_type n,
const hasher& hf, const key_equal& eql)
: rep(n, hf, eql)
{
rep.insert_equal(f, l);
}
- THashMultiSet(std::initializer_list<value_type> list)
+ THashMultiSet(std::initializer_list<value_type> list)
: rep(list.size(), hasher(), key_equal())
{
rep.insert_equal(list.begin(), list.end());
}
- // THashMultiSet has implicit copy/move constructors and copy-/move-assignment operators
- // because its implementation is backed by THashTable.
+ // THashMultiSet has implicit copy/move constructors and copy-/move-assignment operators
+ // because its implementation is backed by THashTable.
// See hash_ut.cpp
public:
@@ -378,7 +378,7 @@ public:
explicit operator bool() const noexcept {
return !empty();
}
- void swap(THashMultiSet& hs) {
+ void swap(THashMultiSet& hs) {
rep.swap(hs.rep);
}
@@ -464,7 +464,7 @@ public:
};
template <class Val, class HashFcn, class EqualKey, class Alloc>
-inline bool operator==(const THashMultiSet<Val, HashFcn, EqualKey, Alloc>& hs1, const THashMultiSet<Val, HashFcn, EqualKey, Alloc>& hs2) {
+inline bool operator==(const THashMultiSet<Val, HashFcn, EqualKey, Alloc>& hs1, const THashMultiSet<Val, HashFcn, EqualKey, Alloc>& hs2) {
if (hs1.size() != hs2.size()) {
return false;
}
@@ -483,6 +483,6 @@ inline bool operator==(const THashMultiSet<Val, HashFcn, EqualKey, Alloc>& hs1,
}
template <class Val, class HashFcn, class EqualKey, class Alloc>
-inline bool operator!=(const THashMultiSet<Val, HashFcn, EqualKey, Alloc>& hs1, const THashMultiSet<Val, HashFcn, EqualKey, Alloc>& hs2) {
+inline bool operator!=(const THashMultiSet<Val, HashFcn, EqualKey, Alloc>& hs1, const THashMultiSet<Val, HashFcn, EqualKey, Alloc>& hs2) {
return !(hs1 == hs2);
}