44 #include <QtCore/qcontainertools_impl.h>
45 #include <QtCore/qhashfunctions.h>
46 #include <QtCore/qiterator.h>
47 #include <QtCore/qlist.h>
48 #include <QtCore/qmath.h>
49 #include <QtCore/qrefcount.h>
51 #include <initializer_list>
65 template <
typename T,
typename =
void>
70 std::is_convertible_v<decltype(qHash(std::declval<const T &>(), std::declval<size_t>())),
size_t>
73 template <
typename T,
typename =
void>
78 std::is_convertible_v<decltype(std::hash<T>()(std::declval<const T &>(), std::declval<size_t>())),
size_t>
81 template <
typename T,
typename =
void>
86 std::is_convertible_v<decltype(std::hash<T>()(std::declval<const T &>())),
size_t>
92 if constexpr (HasQHashOverload<T>) {
94 }
else if constexpr (HasStdHashSpecializationWithSeed<T>) {
95 return std::hash<T>()(
t, seed);
96 }
else if constexpr (HasStdHashSpecializationWithoutSeed<T>) {
98 return std::hash<T>()(
t);
100 static_assert(
sizeof(
T) == 0,
"The key type must have a qHash overload or a std::hash specialization");
105 template <
typename Key,
typename T>
113 template<
typename ...Args>
115 {
new (
n)
Node{ std::move(k),
T(std::forward<Args>(
args)...) }; }
116 template<
typename ...Args>
118 {
new (
n)
Node{ Key(k),
T(std::forward<Args>(
args)...) }; }
119 template<
typename ...Args>
126 return std::move(
value);
131 template <
typename Key>
137 template<
typename ...Args>
139 {
new (
n)
Node{ std::move(k) }; }
140 template<
typename ...Args>
142 {
new (
n)
Node{ k }; }
143 template<
typename ...Args>
151 template <
typename T>
183 template <
typename Key,
typename T>
193 template<
typename ...Args>
196 template<
typename ...Args>
238 template<
typename ...Args>
244 template<
typename ...Args>
247 value->value =
T(std::forward<Args>(
args)...);
251 template<
typename Node>
265 template<
typename Node>
377 void moveFromSpan(
Span &fromSpan,
size_t fromIndex,
size_t to) noexcept(std::is_nothrow_move_constructible_v<Node>)
390 size_t fromOffset = fromSpan.offsets[fromIndex];
392 Entry &fromEntry = fromSpan.entries[fromOffset];
394 if constexpr (isRelocatable<Node>()) {
395 memcpy(&toEntry, &fromEntry,
sizeof(
Entry));
397 new (&toEntry.
node())
Node(std::move(fromEntry.
node()));
398 fromEntry.
node().~Node();
400 fromEntry.
nextFree() = fromSpan.nextFree;
401 fromSpan.nextFree =
static_cast<unsigned char>(fromOffset);
418 if constexpr (isRelocatable<Node>()) {
437 namespace GrowthPolicy {
450 size_t max = (std::numeric_limits<ptrdiff_t>::max)();
455 if (requestedCapacity <= 8)
459 return qNextPowerOfTwo(QIntegerForSize<
sizeof(
size_t)>::Unsigned(2 * requestedCapacity - 1));
463 return hash & (nBuckets - 1);
467 template <
typename Node>
470 template <
typename Node>
496 for (
size_t s = 0;
s < nSpans; ++
s) {
505 new (newNode)
Node(
n);
583 for (
size_t s = 0;
s < oldNSpans; ++
s) {
592 new (newNode)
Node(std::move(
n));
673 return {
it,
false };
678 size_t bucket =
it.bucket;
686 size_t hole = bucket;
687 size_t next = bucket;
692 if (!
spans[nextSpan].hasNode(nextIndex))
697 if (newBucket ==
next) {
700 }
else if (newBucket == hole) {
704 if (nextSpan == holeSpan) {
729 template <
typename Node>
764 {
return !(*
this ==
other); }
771 template <
typename Key,
typename T>
806 static_assert(std::is_nothrow_destructible_v<Key>,
"Types with throwing destructors are not supported in Qt containers.");
807 static_assert(std::is_nothrow_destructible_v<T>,
"Types with throwing destructors are not supported in Qt containers.");
809 if (
d && !
d->ref.deref())
819 if (
d && !
d->ref.deref())
827 :
d(std::exchange(
other.d,
nullptr))
832 template <
typename InputIterator>
833 QHash(InputIterator
f, InputIterator
l);
835 template <
typename InputIterator, QtPrivate::IfAssociativeIteratorHasKeyAndValue<InputIterator> = true>
844 template <
typename InputIterator, QtPrivate::IfAssociativeIteratorHasFirstAndSecond<InputIterator> = true>
856 template <
typename AKey = Key,
typename AT = T>
866 if (
i ==
end() || !
i.i.node()->valuesEqual(
it.i.node()))
872 template <
typename AKey = Key,
typename AT = T>
874 {
return !(*
this ==
other); }
906 if (
d && !
d->ref.deref())
917 it =
d->detachedIterator(
it);
924 template <
typename Predicate>
935 it =
d->detachedIterator(
it);
948 return d->findNode(
key) !=
nullptr;
956 const Key *keyImpl(
const T &
value)
const noexcept
973 if (
auto *k = keyImpl(
value))
980 if (
auto *k = keyImpl(
value))
987 T *valueImpl(
const Key &
key)
const noexcept
999 if (
T *
v = valueImpl(
key))
1007 if (
T *
v = valueImpl(
key))
1010 return defaultValue;
1021 return result.it.node()->value;
1034 while (
i !=
end()) {
1036 res.append(
i.key());
1179 i.i =
d->erase(
i.i);
1186 auto second =
first;
1195 auto second =
first;
1210 it =
d->detachedIterator(
it);
1248 template <
typename ...Args>
1252 return emplace(std::move(copy), std::forward<Args>(
args)...);
1255 template <
typename ...Args>
1259 if (
d->shouldGrow())
1260 return emplace_helper(std::move(
key),
T(std::forward<Args>(
args)...));
1261 return emplace_helper(std::move(
key), std::forward<Args>(
args)...);
1264 const auto copy = *
this;
1266 return emplace_helper(std::move(
key), std::forward<Args>(
args)...);
1277 template <
typename ...Args>
1284 result.it.node()->emplaceValue(std::forward<Args>(
args)...);
1291 template <
typename Key,
typename T>
1318 template <
typename InputIterator>
1321 template <
typename InputIterator, QtPrivate::IfAssociativeIteratorHasKeyAndValue<InputIterator> = true>
1329 template <
typename InputIterator, QtPrivate::IfAssociativeIteratorHasFirstAndSecond<InputIterator> = true>
1345 static_assert(std::is_nothrow_destructible_v<Key>,
"Types with throwing destructors are not supported in Qt containers.");
1346 static_assert(std::is_nothrow_destructible_v<T>,
"Types with throwing destructors are not supported in Qt containers.");
1348 if (
d && !
d->ref.deref())
1358 if (
d && !
d->ref.deref())
1361 m_size =
other.m_size;
1366 :
d(qExchange(
other.d,
nullptr)),
1367 m_size(qExchange(
other.m_size, 0))
1392 #ifndef Q_CLANG_QDOC
1393 template <
typename AKey = Key,
typename AT = T>
1398 if (m_size !=
other.m_size)
1405 if (
d->size !=
other.d->size)
1408 auto *
n =
d->findNode(
it.node()->key);
1415 if (oe->
value ==
e->value)
1427 template <
typename AKey = Key,
typename AT = T>
1429 {
return !(*
this ==
other); }
1458 if (
d && !
d->ref.deref())
1470 it =
d->detachedIterator(
it);
1480 template <
typename Predicate>
1491 it =
d->detachedIterator(
it);
1497 T t = std::move(
e->value);
1499 it.node()->value =
e->next;
1514 return d->findNode(
key) !=
nullptr;
1518 const Key *keyImpl(
const T &
value)
const noexcept
1521 auto i =
d->begin();
1522 while (
i !=
d->end()) {
1523 Chain *
e =
i.node()->value;
1525 return &
i.node()->key;
1535 if (
auto *k = keyImpl(
value))
1542 if (
auto *k = keyImpl(
value))
1549 T *valueImpl(
const Key &
key)
const noexcept
1555 return &
n->value->value;
1563 if (
auto *
v = valueImpl(
key))
1570 if (
auto *
v = valueImpl(
key))
1573 return defaultValue;
1584 return result.it.node()->value->value;
1596 auto i =
d->begin();
1597 while (
i !=
d->end()) {
1598 res.append(
i.node()->key);
1610 while (
i !=
end()) {
1612 res.append(
i.key());
1645 if (!
it.atEnd() && !
e) {
1646 e = &
it.node()->value;
1697 if (!
it.atEnd() && !
e) {
1698 e = &
it.node()->value;
1788 if (
d->ref.isShared()) {
1799 i =
d->detachedIterator(
i);
1800 e = &
i.node()->value;
1820 if (
i.e == &
i.i.node()->value) {
1842 it =
d->detachedIterator(
it);
1866 template <
typename ...Args>
1872 template <
typename ...Args>
1876 if (
d->shouldGrow())
1877 return emplace_helper(std::move(
key),
T(std::forward<Args>(
args)...));
1878 return emplace_helper(std::move(
key), std::forward<Args>(
args)...);
1881 const auto copy = *
this;
1883 return emplace_helper(std::move(
key), std::forward<Args>(
args)...);
1899 template <
typename ...Args>
1905 template <
typename ...Args>
1909 if (
d->shouldGrow())
1910 return emplaceReplace_helper(std::move(
key),
T(std::forward<Args>(
args)...));
1911 return emplaceReplace_helper(std::move(
key), std::forward<Args>(
args)...);
1914 const auto copy = *
this;
1916 return emplaceReplace_helper(std::move(
key), std::forward<Args>(
args)...);
1920 { this->
unite(other);
return *
this; }
1928 auto n =
d->findNode(
key);
1931 return n->value->contains(
value);
1940 it =
d->detachedIterator(
it);
1956 if (!
it.node()->value)
2015 while (
i !=
end &&
i.key() ==
key) {
2027 }
else if (
other.isEmpty()) {
2032 for (
auto cit = copy.
cbegin(); cit != copy.
cend(); ++cit)
2040 for (
auto cit =
other.cbegin(); cit !=
other.cend(); ++cit)
2047 if (!
other.isDetached()) {
2053 emplace(std::move(
it.node()->key), std::move(
it.node()->takeValue()));
2062 auto pair = qAsConst(*this).equal_range(
key);
2080 void detach_helper()
2087 if (!
d->ref.deref())
2092 template<
typename...
Args>
2099 result.it.node()->insertMulti(std::forward<Args>(
args)...);
2104 template<
typename...
Args>
2108 if (!
result.initialized) {
2112 result.it.node()->emplaceValue(std::forward<Args>(
args)...);
2123 template <
class Key,
class T>
2130 size_t h = combine(seed,
it.key());
2132 hash += combine(
h,
it.value());
2137 template <
class Key,
class T>
2144 size_t h = combine(seed,
it.key());
2146 hash += combine(
h,
it.value());
2151 template <
typename Key,
typename T,
typename Predicate>
2157 template <
typename Key,
typename T,
typename Predicate>
small capitals from c petite p scientific i
[1]
template< typename Predicate > qsizetype erase_if(QByteArray &ba, Predicate pred)
template< typename Enum > size_t qHash(QFlags< Enum > flags, size_t seed=0) noexcept
The QHash::const_iterator class provides an STL-style const iterator for QHash.
const_iterator operator++(int) noexcept
bool operator==(const const_iterator &o) const noexcept
bool operator!=(const const_iterator &o) const noexcept
const T & value() const noexcept
const T & operator*() const noexcept
std::forward_iterator_tag iterator_category
constexpr const_iterator() noexcept=default
const_iterator & operator++() noexcept
const T * operator->() const noexcept
const Key & key() const noexcept
The QHash::iterator class provides an STL-style non-const iterator for QHash.
bool operator==(const const_iterator &o) const noexcept
bool operator!=(const const_iterator &o) const noexcept
T & value() const noexcept
constexpr iterator() noexcept=default
bool operator==(const iterator &o) const noexcept
std::forward_iterator_tag iterator_category
T * operator->() const noexcept
T & operator*() const noexcept
iterator & operator++() noexcept
iterator operator++(int) noexcept
bool operator!=(const iterator &o) const noexcept
The QHash::key_iterator class provides an STL-style const iterator for QHash keys.
key_iterator() noexcept=default
key_iterator & operator++() noexcept
const_iterator base() const noexcept
const Key * operator->() const noexcept
bool operator!=(key_iterator o) const noexcept
key_iterator operator++(int) noexcept
const_iterator::iterator_category iterator_category
bool operator==(key_iterator o) const noexcept
const Key & operator*() const noexcept
The QHash class is a template class that provides a hash-table-based dictionary.
key_iterator keyEnd() const noexcept
bool remove(const Key &key)
const_iterator cbegin() const noexcept
qsizetype size() const noexcept
T & operator[](const Key &key)
float load_factor() const noexcept
QHash(QHash &&other) noexcept
QHash(InputIterator f, InputIterator l)
const_iterator constFind(const Key &key) const noexcept
const_iterator begin() const noexcept
const_iterator constEnd() const noexcept
iterator find(const Key &key)
key_value_iterator keyValueEnd()
QList< T > values() const
key_value_iterator keyValueBegin()
void reserve(qsizetype size)
iterator emplace(const Key &key, Args &&... args)
T value(const Key &key, const T &defaultValue) const noexcept
const T operator[](const Key &key) const noexcept
const_iterator constBegin() const noexcept
const_key_value_iterator constKeyValueEnd() const noexcept
bool isDetached() const noexcept
QKeyValueIterator< const Key &, T &, iterator > key_value_iterator
The QHash::key_value_iterator typedef provides an STL-style iterator for QHash.
QKeyValueIterator< const Key &, const T &, const_iterator > const_key_value_iterator
The QHash::const_key_value_iterator typedef provides an STL-style const iterator for QHash.
Key key(const T &value, const Key &defaultKey) const noexcept
static float max_load_factor() noexcept
QList< Key > keys() const
iterator erase(const_iterator it)
qsizetype difference_type
bool contains(const Key &key) const noexcept
QTypeTraits::compare_eq_result_container< QHash, AKey, AT > operator==(const QHash &other) const noexcept
const_key_value_iterator keyValueEnd() const noexcept
key_iterator keyBegin() const noexcept
const_key_value_iterator keyValueBegin() const noexcept
qsizetype count() const noexcept
qsizetype removeIf(Predicate pred)
T value(const Key &key) const noexcept
void swap(QHash &other) noexcept
bool isSharedWith(const QHash &other) const noexcept
QHash & operator=(const QHash &other) noexcept(std::is_nothrow_destructible< Node >::value)
size_t bucket_count() const noexcept
void insert(const QHash &hash)
friend class const_iterator
const_iterator cend() const noexcept
QHash(InputIterator f, InputIterator l)
QPair< const_iterator, const_iterator > equal_range(const Key &key) const noexcept
const_iterator ConstIterator
static size_t max_bucket_count() noexcept
const_iterator find(const Key &key) const noexcept
Key key(const T &value) const noexcept
void clear() noexcept(std::is_nothrow_destructible< Node >::value)
QList< Key > keys(const T &value) const
QTypeTraits::compare_eq_result_container< QHash, AKey, AT > operator!=(const QHash &other) const noexcept
bool empty() const noexcept
qsizetype count(const Key &key) const noexcept
qsizetype capacity() const noexcept
QPair< iterator, iterator > equal_range(const Key &key)
bool isEmpty() const noexcept
const_iterator end() const noexcept
iterator emplace(Key &&key, Args &&... args)
QHash(const QHash &other) noexcept
const_key_value_iterator constKeyValueBegin() const noexcept
iterator insert(const Key &key, const T &value)
The QMultiHash::const_iterator class provides an STL-style const iterator for QMultiHash.
const_iterator & operator++() noexcept
T & value() const noexcept
const Key & key() const noexcept
std::forward_iterator_tag iterator_category
bool operator!=(const const_iterator &o) const noexcept
T * operator->() const noexcept
constexpr const_iterator() noexcept=default
T & operator*() const noexcept
const_iterator operator++(int) noexcept
bool operator==(const const_iterator &o) const noexcept
The QMultiHash::iterator class provides an STL-style non-const iterator for QMultiHash.
T & value() const noexcept
constexpr iterator() noexcept=default
bool operator==(const const_iterator &o) const noexcept
T * operator->() const noexcept
bool operator!=(const iterator &o) const noexcept
bool operator!=(const const_iterator &o) const noexcept
bool operator==(const iterator &o) const noexcept
T & operator*() const noexcept
iterator & operator++() noexcept
iterator operator++(int) noexcept
std::forward_iterator_tag iterator_category
The QMultiHash::key_iterator class provides an STL-style const iterator for QMultiHash keys.
const_iterator base() const noexcept
const_iterator::iterator_category iterator_category
key_iterator() noexcept=default
const Key * operator->() const noexcept
bool operator!=(key_iterator o) const noexcept
key_iterator operator++(int) noexcept
key_iterator & operator++() noexcept
bool operator==(key_iterator o) const noexcept
const Key & operator*() const noexcept
The QMultiHash class is a convenience QHash subclass that provides multi-valued hashes.
const_key_value_iterator constKeyValueEnd() const noexcept
const_iterator find(const Key &key) const noexcept
const_key_value_iterator keyValueBegin() const noexcept
const_iterator find(const Key &key, const T &value) const noexcept
const_key_value_iterator keyValueEnd() const noexcept
QMultiHash & unite(const QHash< Key, T > &other)
iterator find(const Key &key, const T &value)
QTypeTraits::compare_eq_result_container< QMultiHash, AKey, AT > operator==(const QMultiHash &other) const noexcept
QMultiHash(const QHash< Key, T > &other)
QMultiHash & operator=(const QMultiHash &other) noexcept(std::is_nothrow_destructible< Node >::value)
bool contains(const Key &key, const T &value) const noexcept
QList< Key > keys(const T &value) const
const_iterator constFind(const Key &key, const T &value) const noexcept
QMultiHash(QHash< Key, T > &&other)
iterator find(const Key &key)
float load_factor() const noexcept
bool isSharedWith(const QMultiHash &other) const noexcept
key_value_iterator keyValueBegin() noexcept
QMultiHash(const QMultiHash &other) noexcept
iterator detach(const_iterator it)
qsizetype count(const Key &key, const T &value) const noexcept
const_iterator cbegin() const noexcept
key_iterator keyBegin() const noexcept
const_iterator constBegin() const noexcept
iterator emplace(const Key &key, Args &&... args)
QMultiHash(QMultiHash &&other) noexcept
bool empty() const noexcept
const_iterator constEnd() const noexcept
static size_t max_bucket_count() noexcept
QMultiHash(InputIterator f, InputIterator l)
QKeyValueIterator< const Key &, const T &, const_iterator > const_key_value_iterator
The QMap::const_key_value_iterator typedef provides an STL-style const iterator for QMultiHash and QM...
bool isDetached() const noexcept
T value(const Key &key) const noexcept
QPair< iterator, iterator > equal_range(const Key &key)
QList< T > values(const Key &key) const
iterator emplace(Key &&key, Args &&... args)
const_iterator cend() const noexcept
qsizetype removeIf(Predicate pred)
iterator emplaceReplace(Key &&key, Args &&... args)
QMultiHash & unite(const QMultiHash &other)
QList< T > values() const
Key key(const T &value) const noexcept
QMultiHash(InputIterator f, InputIterator l)
qsizetype capacity() const noexcept
bool contains(const Key &key) const noexcept
qsizetype difference_type
QMultiHash & operator+=(const QMultiHash &other)
QMultiHash & operator=(QMultiHash &&other) noexcept(std::is_nothrow_destructible< Node >::value)
void swap(QMultiHash &other) noexcept
const_iterator begin() const noexcept
T & operator[](const Key &key)
qsizetype remove(const Key &key)
const_iterator ConstIterator
iterator insert(const Key &key, const T &value)
size_t bucket_count() const noexcept
void reserve(qsizetype size)
bool isEmpty() const noexcept
iterator emplaceReplace(const Key &key, Args &&... args)
QList< Key > keys() const
QMultiHash() noexcept=default
QList< Key > uniqueKeys() const
T value(const Key &key, const T &defaultValue) const noexcept
qsizetype size() const noexcept
key_value_iterator keyValueEnd() noexcept
iterator replace(const Key &key, const T &value)
const_iterator end() const noexcept
friend class const_iterator
qsizetype count(const Key &key) const noexcept
Key key(const T &value, const Key &defaultKey) const noexcept
const_key_value_iterator constKeyValueBegin() const noexcept
void clear() noexcept(std::is_nothrow_destructible< Node >::value)
iterator erase(const_iterator it)
qsizetype remove(const Key &key, const T &value)
key_iterator keyEnd() const noexcept
QTypeTraits::compare_eq_result_container< QMultiHash, AKey, AT > operator!=(const QMultiHash &other) const noexcept
qsizetype count() const noexcept
QKeyValueIterator< const Key &, T &, iterator > key_value_iterator
The QMap::key_value_iterator typedef provides an STL-style iterator for QMultiHash and QMultiHash.
const_iterator constFind(const Key &key) const noexcept
QMultiHash operator+(const QMultiHash &other) const
static float max_load_factor() noexcept
QPair< const_iterator, const_iterator > equal_range(const Key &key) const noexcept
const T operator[](const Key &key) const noexcept
QMultiHash & unite(QHash< Key, T > &&other)
QHash< int, QWidget * > hash
[35multi]
auto it unsigned count const
Generic::PredicateMatcher< T > Predicate(std::function< bool(T const &)> const &predicate, std::string const &description="")
typename C::iterator iterator
constexpr size_t maxNumBuckets() noexcept
constexpr size_t bucketForHash(size_t nBuckets, size_t hash) noexcept
constexpr size_t bucketsForCapacity(size_t requestedCapacity) noexcept
constexpr bool isRelocatable()
constexpr bool HasStdHashSpecializationWithoutSeed
size_t calculateHash(const T &t, size_t seed=0)
constexpr Q_DECL_CONST_FUNCTION size_t hash(size_t key, size_t seed) noexcept
constexpr bool HasQHashOverload
constexpr bool HasStdHashSpecializationWithSeed
std::enable_if_t< std::conjunction_v< QTypeTraits::has_operator_equal_container< Container, T >... >, bool > compare_eq_result_container
auto associative_erase_if(Container &c, Predicate &pred)
void reserveIfForwardIterator(Container *, InputIterator, InputIterator)
void swap(SimpleVector< T > &v1, SimpleVector< T > &v2)
std::pair< T1, T2 > QPair
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter * iter
EGLOutputLayerEXT EGLint EGLAttrib value
QT_BEGIN_INCLUDE_NAMESPACE typedef unsigned char uchar
#define QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(Class)
size_t qHash(const QHash< Key, T > &key, size_t seed=0) noexcept(noexcept(qHash(std::declval< Key & >())) &&noexcept(qHash(std::declval< T & >())))
bool qHashEquals(const T &a, const T &b)
#define Q_DECLARE_MUTABLE_ASSOCIATIVE_FORWARD_ITERATOR(C)
#define Q_DECLARE_ASSOCIATIVE_FORWARD_ITERATOR(C)
constexpr quint32 qNextPowerOfTwo(quint32 v)
GLenum GLsizei GLsizei GLint * values
[16]
GLsizei const GLfloat * v
[13]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLuint GLintptr offset
GLfloat GLfloat GLfloat GLfloat h
GLuint GLsizei const GLuint const GLintptr * offsets
GLenum GLenum GLsizei void GLsizei void void * span
constexpr decltype(auto) qMakePair(T1 &&value1, T2 &&value2) noexcept(noexcept(std::make_pair(std::forward< T1 >(value1), std::forward< T2 >(value2))))
QtConcurrent::task([]{ qDebug("Hello, world!");}).spawn(FutureResult void increment(QPromise< int > &promise, int i)
[10]
bool operator==(const QHashDummyValue &) const noexcept
void reallocationHelper(const Data &other, size_t nSpans, bool resized)
iterator begin() const noexcept
size_t nextBucket(size_t bucket) const noexcept
static Data * detached(Data *d)
iterator find(const Key &key) const noexcept
QHashPrivate::iterator< Node > iterator
iterator detachedIterator(iterator other) const noexcept
constexpr iterator end() const noexcept
iterator erase(iterator it) noexcept(std::is_nothrow_destructible< Node >::value)
bool shouldGrow() const noexcept
typename Node::KeyType Key
void rehash(size_t sizeHint=0)
InsertionResult findOrInsert(const Key &key) noexcept
Node * findNode(const Key &key) const noexcept
static Data * detached(Data *d, size_t size)
float loadFactor() const noexcept
Data(const Data &other, size_t reserved)
qsizetype free() noexcept(std::is_nothrow_destructible_v< T >)
bool contains(const T &val) const noexcept
static qsizetype freeChain(MultiNode *n) noexcept(std::is_nothrow_destructible_v< T >)
MultiNode(MultiNode &&other)
void insertMulti(Args &&... args)
MultiNode(const MultiNode &other)
static void createInPlace(MultiNode *n, const Key &k, Args &&... args)
MultiNode(const Key &k, Chain *c)
static void createInPlace(MultiNode *n, Key &&k, Args &&... args)
MultiNode(Key &&k, Chain *c) noexcept(std::is_nothrow_move_assignable_v< Key >)
void emplaceValue(Args &&... args)
static void createInPlace(Node *n, const Key &k, Args &&...)
void emplaceValue(Args &&...)
bool valuesEqual(const Node *) const
static void createInPlace(Node *n, Key &&k, Args &&...)
void emplaceValue(Args &&... args)
T && takeValue() noexcept(std::is_nothrow_move_assignable_v< T >)
bool valuesEqual(const Node *other) const
static void createInPlace(Node *n, const Key &k, Args &&... args)
static void createInPlace(Node *n, Key &&k, Args &&... args)
struct QHashPrivate::Span::Entry::@496 storage
unsigned char & nextFree()
const Node & atOffset(size_t o) const noexcept
void moveLocal(size_t from, size_t to) noexcept
void freeData() noexcept(std::is_nothrow_destructible< Node >::value)
void erase(size_t bucket) noexcept(std::is_nothrow_destructible< Node >::value)
Node & at(size_t i) noexcept
Node & atOffset(size_t o) noexcept
size_t offset(size_t i) const noexcept
bool hasNode(size_t i) const noexcept
void moveFromSpan(Span &fromSpan, size_t fromIndex, size_t to) noexcept(std::is_nothrow_move_constructible_v< Node >)
const Node & at(size_t i) const noexcept
Node * node() const noexcept
size_t span() const noexcept
iterator operator++() noexcept
size_t index() const noexcept
bool isUnused() const noexcept
bool operator!=(iterator other) const noexcept
bool atEnd() const noexcept
bool operator==(iterator other) const noexcept
static Q_CORE_EXPORT QHashSeed globalSeed() noexcept