#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_WTF_KEY_VALUE_PAIR_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_WTF_KEY_VALUE_PAIR_H_
#include <utility>
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/type_traits.h"
namespace WTF {
template <typename KeyTypeArg, typename ValueTypeArg>
struct KeyValuePair { … };
IsWeak<KeyValuePair<K, V>>;
IsTraceable<KeyValuePair<K, V>>;
template <typename KeyTraitsArg,
typename ValueTraitsArg,
typename P = KeyValuePair<typename KeyTraitsArg::TraitType,
typename ValueTraitsArg::TraitType>>
struct KeyValuePairHashTraits
: TwoFieldsHashTraits<P, &P::key, &P::value, KeyTraitsArg, ValueTraitsArg> {
using TraitType = P;
using KeyTraits = KeyTraitsArg;
using ValueTraits = ValueTraitsArg;
static constexpr bool kCanTraceConcurrently =
KeyTraits::kCanTraceConcurrently &&
(ValueTraits::kCanTraceConcurrently ||
!IsTraceable<typename ValueTraits::TraitType>::value);
};
HashTraits<KeyValuePair<Key, Value>>;
namespace internal {
template <typename T, bool NeedsStackCheck = IsTraceable<T>::value>
class IteratorAdapterBase { … };
IteratorAdapterBase<T, true>;
}
template <typename HashTableType,
typename KeyType,
typename MappedType,
typename Enable = void>
struct HashTableConstKeysIterator;
template <typename HashTableType,
typename KeyType,
typename MappedType,
typename Enable = void>
struct HashTableConstValuesIterator;
template <typename HashTableType,
typename KeyType,
typename MappedType,
typename Enable = void>
struct HashTableKeysIterator;
template <typename HashTableType,
typename KeyType,
typename MappedType,
typename Enable = void>
struct HashTableValuesIterator;
HashTableConstIteratorAdapter<HashTableType, KeyValuePair<KeyType, MappedType>>;
HashTableIteratorAdapter<HashTableType, KeyValuePair<KeyType, MappedType>>;
HashTableConstKeysIterator<HashTableType, KeyType, MappedType>;
HashTableConstValuesIterator<HashTableType, KeyType, MappedType>;
HashTableKeysIterator<HashTableType, KeyType, MappedType>;
HashTableValuesIterator<HashTableType, KeyType, MappedType>;
template <typename T, typename U, typename V>
inline bool operator==(const HashTableConstKeysIterator<T, U, V>& a,
const HashTableConstKeysIterator<T, U, V>& b) { … }
template <typename T, typename U, typename V>
inline bool operator!=(const HashTableConstKeysIterator<T, U, V>& a,
const HashTableConstKeysIterator<T, U, V>& b) { … }
template <typename T, typename U, typename V>
inline bool operator==(const HashTableConstValuesIterator<T, U, V>& a,
const HashTableConstValuesIterator<T, U, V>& b) { … }
template <typename T, typename U, typename V>
inline bool operator!=(const HashTableConstValuesIterator<T, U, V>& a,
const HashTableConstValuesIterator<T, U, V>& b) { … }
template <typename T, typename U, typename V>
inline bool operator==(const HashTableKeysIterator<T, U, V>& a,
const HashTableKeysIterator<T, U, V>& b) { … }
template <typename T, typename U, typename V>
inline bool operator!=(const HashTableKeysIterator<T, U, V>& a,
const HashTableKeysIterator<T, U, V>& b) { … }
template <typename T, typename U, typename V>
inline bool operator==(const HashTableValuesIterator<T, U, V>& a,
const HashTableValuesIterator<T, U, V>& b) { … }
template <typename T, typename U, typename V>
inline bool operator!=(const HashTableValuesIterator<T, U, V>& a,
const HashTableValuesIterator<T, U, V>& b) { … }
}
#endif