chromium/third_party/blink/renderer/platform/wtf/hash_set.h

/*
 * Copyright (C) 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public License
 * along with this library; see the file COPYING.LIB.  If not, write to
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 *
 */

#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_WTF_HASH_SET_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_WTF_HASH_SET_H_

#include <initializer_list>

#include "base/numerics/safe_conversions.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/allocator/partition_allocator.h"
#include "third_party/blink/renderer/platform/wtf/hash_table.h"
#include "third_party/blink/renderer/platform/wtf/type_traits.h"
#include "third_party/blink/renderer/platform/wtf/wtf_size_t.h"

namespace WTF {

struct IdentityExtractor;

// Note: empty or deleted values are not allowed, using them may lead to
// undefined behavior. For pointer keys this means that null pointers are not
// allowed; for integer keys 0 or -1 can't be used as a key. This restriction
// can be lifted if you supply custom key traits.
// See hash_traits.h for how to define hash traits.
template <typename ValueArg,
          typename TraitsArg = HashTraits<ValueArg>,
          typename Allocator = PartitionAllocator>
class HashSet {};

struct IdentityExtractor {};

template <typename Translator>
struct HashSetTranslatorAdapter {};

template <typename Value, typename Traits, typename Allocator>
HashSet<Value, Traits, Allocator>::HashSet(
    std::initializer_list<ValueType> elements) {}

template <typename Value, typename Traits, typename Allocator>
auto HashSet<Value, Traits, Allocator>::operator=(
    std::initializer_list<ValueType> elements) -> HashSet& {}

template <typename T, typename U, typename V>
bool operator==(const HashSet<T, U, V>& a, const HashSet<T, U, V>& b) {}

template <typename T, typename U, typename V>
inline bool operator!=(const HashSet<T, U, V>& a, const HashSet<T, U, V>& b) {}

template <typename T, typename U, typename V>
inline unsigned HashSet<T, U, V>::size() const {}

template <typename T, typename U, typename V>
inline unsigned HashSet<T, U, V>::Capacity() const {}

template <typename T, typename U, typename V>
inline bool HashSet<T, U, V>::empty() const {}

template <typename T, typename U, typename V>
inline typename HashSet<T, U, V>::iterator HashSet<T, U, V>::begin() const {}

template <typename T, typename U, typename V>
inline typename HashSet<T, U, V>::iterator HashSet<T, U, V>::end() const {}

template <typename T, typename U, typename V>
inline typename HashSet<T, U, V>::iterator HashSet<T, U, V>::find(
    ValuePeekInType value) const {}

template <typename Value, typename Traits, typename Allocator>
inline bool HashSet<Value, Traits, Allocator>::Contains(
    ValuePeekInType value) const {}

template <typename Value, typename Traits, typename Allocator>
template <typename HashTranslator, typename T>
typename HashSet<Value, Traits, Allocator>::
    iterator inline HashSet<Value, Traits, Allocator>::Find(
        const T& value) const {}

template <typename Value, typename Traits, typename Allocator>
template <typename HashTranslator, typename T>
inline bool HashSet<Value, Traits, Allocator>::Contains(const T& value) const {}

template <typename T, typename U, typename V>
template <typename IncomingValueType>
inline typename HashSet<T, U, V>::AddResult HashSet<T, U, V>::insert(
    IncomingValueType&& value) {}

template <typename Value, typename Traits, typename Allocator>
template <typename HashTranslator, typename T>
inline typename HashSet<Value, Traits, Allocator>::AddResult
HashSet<Value, Traits, Allocator>::AddWithTranslator(T&& value) {}

template <typename T, typename U, typename V>
inline void HashSet<T, U, V>::erase(iterator it) {}

template <typename T, typename U, typename V>
inline void HashSet<T, U, V>::erase(ValuePeekInType value) {}

template <typename T, typename U, typename V>
inline void HashSet<T, U, V>::clear() {}

template <typename T, typename U, typename V>
inline auto HashSet<T, U, V>::Take(iterator it) -> ValueType {}

template <typename T, typename U, typename V>
inline auto HashSet<T, U, V>::Take(ValuePeekInType value) -> ValueType {}

template <typename T, typename U, typename V>
inline auto HashSet<T, U, V>::TakeAny() -> ValueType {}

}  // namespace WTF

HashSet;

#endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_WTF_HASH_SET_H_