Template Class Table

Nested Relationships

Nested Types

Inheritance Relationships

Base Types

Class Documentation

template<bool IsFlat, size_t MaxLoadFactor100, typename Key, typename T, typename Hash, typename KeyEqual>
class Table : public robin_hood::detail::WrapHash<Hash>, public robin_hood::detail::WrapKeyEqual<KeyEqual>, private robin_hood::detail::NodeAllocator<std::conditional<std::is_void<T>::value, Key, robin_hood::pair<std::conditional<IsFlat, Key, Key const>::type, T>>::type, 4, 16384, IsFlat>

Public Types

using key_type = Key
using mapped_type = T
using value_type = typename std::conditional<is_set, Key, robin_hood::pair<typename std::conditional<is_flat, Key, Key const>::type, T>>::type
using size_type = size_t
using hasher = Hash
using key_equal = KeyEqual
using Self = Table<IsFlat, MaxLoadFactor100, key_type, mapped_type, hasher, key_equal>
using iterator = Iter<false>
using const_iterator = Iter<true>

Public Functions

inline Table() noexcept(noexcept(Hash()) && noexcept(KeyEqual()))
inline explicit Table(size_t ROBIN_HOOD_UNUSED(bucket_count), const Hash &h = Hash{}, const KeyEqual &equal = KeyEqual{}) noexcept(noexcept(Hash(h)) && noexcept(KeyEqual(equal)))
template<typename Iter>
inline Table(Iter first, Iter last, size_t ROBIN_HOOD_UNUSED(bucket_count) = 0, const Hash &h = Hash{}, const KeyEqual &equal = KeyEqual{})
inline Table(std::initializer_list<value_type> initlist, size_t ROBIN_HOOD_UNUSED(bucket_count) = 0, const Hash &h = Hash{}, const KeyEqual &equal = KeyEqual{})
inline Table(Table &&o) noexcept
inline Table &operator=(Table &&o) noexcept
inline Table(const Table &o)
inline Table &operator=(Table const &o)
inline void swap(Table &o)
inline void clear()
inline ~Table()
inline bool operator==(const Table &other) const
inline bool operator!=(const Table &other) const
template<typename Q = mapped_type>
inline std::enable_if<!std::is_void<Q>::value, Q&>::type operator[](const key_type &key)
template<typename Q = mapped_type>
inline std::enable_if<!std::is_void<Q>::value, Q&>::type operator[](key_type &&key)
template<typename Iter>
inline void insert(Iter first, Iter last)
inline void insert(std::initializer_list<value_type> ilist)
template<typename ...Args>
inline std::pair<iterator, bool> emplace(Args&&... args)
template<typename ...Args>
inline iterator emplace_hint(const_iterator position, Args&&... args)
template<typename ...Args>
inline std::pair<iterator, bool> try_emplace(const key_type &key, Args&&... args)
template<typename ...Args>
inline std::pair<iterator, bool> try_emplace(key_type &&key, Args&&... args)
template<typename ...Args>
inline iterator try_emplace(const_iterator hint, const key_type &key, Args&&... args)
template<typename ...Args>
inline iterator try_emplace(const_iterator hint, key_type &&key, Args&&... args)
template<typename Mapped>
inline std::pair<iterator, bool> insert_or_assign(const key_type &key, Mapped &&obj)
template<typename Mapped>
inline std::pair<iterator, bool> insert_or_assign(key_type &&key, Mapped &&obj)
template<typename Mapped>
inline iterator insert_or_assign(const_iterator hint, const key_type &key, Mapped &&obj)
template<typename Mapped>
inline iterator insert_or_assign(const_iterator hint, key_type &&key, Mapped &&obj)
inline std::pair<iterator, bool> insert(const value_type &keyval)
inline iterator insert(const_iterator hint, const value_type &keyval)
inline std::pair<iterator, bool> insert(value_type &&keyval)
inline iterator insert(const_iterator hint, value_type &&keyval)
inline size_t count(const key_type &key) const
template<typename OtherKey, typename Self_ = Self>
inline std::enable_if<Self_::is_transparent, size_t>::type count(const OtherKey &key) const
inline bool contains(const key_type &key) const
template<typename OtherKey, typename Self_ = Self>
inline std::enable_if<Self_::is_transparent, bool>::type contains(const OtherKey &key) const
template<typename Q = mapped_type>
inline std::enable_if<!std::is_void<Q>::value, Q&>::type at(key_type const &key)
template<typename Q = mapped_type>
inline std::enable_if<!std::is_void<Q>::value, Q const&>::type at(key_type const &key) const
inline const_iterator find(const key_type &key) const
template<typename OtherKey>
inline const_iterator find(const OtherKey &key, is_transparent_tag) const
template<typename OtherKey, typename Self_ = Self>
inline std::enable_if<Self_::is_transparent, const_iterator>::type find(const OtherKey &key) const
inline iterator find(const key_type &key)
template<typename OtherKey>
inline iterator find(const OtherKey &key, is_transparent_tag)
template<typename OtherKey, typename Self_ = Self>
inline std::enable_if<Self_::is_transparent, iterator>::type find(const OtherKey &key)
inline iterator begin()
inline const_iterator begin() const
inline const_iterator cbegin() const
inline iterator end()
inline const_iterator end() const
inline const_iterator cend() const
inline iterator erase(const_iterator pos)
inline iterator erase(iterator pos)
inline size_t erase(const key_type &key)
inline void rehash(size_t c)
inline void reserve(size_t c)
inline void compact()
inline size_type size() const noexcept
inline size_type max_size() const noexcept
inline  ROBIN_HOOD (NODISCARD) bool empty() const noexcept
inline float max_load_factor() const noexcept
inline float load_factor() const noexcept
inline  ROBIN_HOOD (NODISCARD) size_t mask() const noexcept
inline  ROBIN_HOOD (NODISCARD) size_t calcMaxNumElementsAllowed(size_t maxElements) const noexcept
inline  ROBIN_HOOD (NODISCARD) size_t calcNumBytesInfo(size_t numElements) const noexcept
inline size_t calcNumElementsWithBuffer(size_t numElements) const noexcept
inline  ROBIN_HOOD (NODISCARD) size_t calcNumBytesTotal(size_t numElements) const

Public Static Attributes

static constexpr bool is_flat = IsFlat
static constexpr bool is_map = !std::is_void<T>::value
static constexpr bool is_set = !is_map
static constexpr bool is_transparent = has_is_transparent<Hash>::value && has_is_transparent<KeyEqual>::value