Open 3D Engine AzCore API Reference  2205.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
Public Types | Public Member Functions | List of all members
AZStd::unordered_set< Key, Hasher, EqualKey, Allocator > Class Template Reference

#include <unordered_set.h>

Public Types

typedef base_type::traits_type traits_type
 
typedef base_type::key_type key_type
 
typedef base_type::key_eq key_eq
 
typedef base_type::hasher hasher
 
typedef base_type::allocator_type allocator_type
 
typedef base_type::size_type size_type
 
typedef base_type::difference_type difference_type
 
typedef base_type::pointer pointer
 
typedef base_type::const_pointer const_pointer
 
typedef base_type::reference reference
 
typedef base_type::const_reference const_reference
 
typedef base_type::iterator iterator
 
typedef base_type::const_iterator const_iterator
 
typedef base_type::value_type value_type
 
typedef base_type::local_iterator local_iterator
 
typedef base_type::const_local_iterator const_local_iterator
 
using node_type = set_node_handle< set_node_traits< value_type, allocator_type, typename base_type::list_node_type, typename base_type::node_deleter > >
 
using insert_return_type = AZStd::AssociativeInternal::insert_return_type< iterator, node_type >
 

Public Member Functions

 unordered_set (const allocator_type &alloc)
 
AZ_FORCE_INLINE unordered_set (const unordered_set &rhs)
 
AZ_FORCE_INLINE unordered_set (const hasher &hash, const key_eq &keyEqual, const allocator_type &allocator)
 This constructor is AZStd extension (so we don't rehash/allocate memory)
 
AZ_FORCE_INLINE unordered_set (size_type numBucketsHint)
 
AZ_FORCE_INLINE unordered_set (size_type numBucketsHint, const hasher &hash, const key_eq &keyEqual)
 
AZ_FORCE_INLINE unordered_set (size_type numBucketsHint, const hasher &hash, const key_eq &keyEqual, const allocator_type &allocator)
 
template<class Iterator >
AZ_FORCE_INLINE unordered_set (Iterator first, Iterator last)
 
template<class Iterator >
AZ_FORCE_INLINE unordered_set (Iterator first, Iterator last, size_type numBucketsHint)
 
template<class Iterator >
AZ_FORCE_INLINE unordered_set (Iterator first, Iterator last, size_type numBucketsHint, const hasher &hash, const key_eq &keyEqual)
 
template<class Iterator >
AZ_FORCE_INLINE unordered_set (Iterator first, Iterator last, size_type numBucketsHint, const hasher &hash, const key_eq &keyEqual, const allocator_type &allocator)
 
AZ_FORCE_INLINE unordered_set (const std::initializer_list< value_type > &list, const hasher &hash=hasher(), const key_eq &keyEqual=key_eq(), const allocator_type &allocator=allocator_type())
 
AZ_FORCE_INLINE unordered_set (this_type &&rhs)
 
this_typeoperator= (this_type &&rhs)
 
this_typeoperator= (const this_type &rhs)
 
insert_return_type insert (node_type &&nodeHandle)
 
iterator insert (const_iterator hint, node_type &&nodeHandle)
 
node_type extract (const key_type &key)
 
node_type extract (const_iterator it)
 
AZ_FORCE_INLINE pair_iter_bool insert (const value_type &value)
 
AZ_FORCE_INLINE iterator insert (const_iterator, const value_type &value)
 
AZ_FORCE_INLINE pair_iter_bool insert (value_type &&value)
 
AZ_FORCE_INLINE iterator insert (const_iterator, value_type &&value)
 
AZ_FORCE_INLINE void insert (std::initializer_list< value_type > list)
 
template<class Iterator >
void insert (Iterator first, Iterator last)
 

Detailed Description

template<class Key, class Hasher = AZStd::hash<Key>, class EqualKey = AZStd::equal_to<Key>, class Allocator = AZStd::allocator>
class AZStd::unordered_set< Key, Hasher, EqualKey, Allocator >

Unordered set container is complaint with CTR1 (6.2.4.3) This is an associative container, all Keys are unique. insert function will return false, if you try to add key that is in the set. It has the extensions in the hash_table class.

Check the unordered_set AZStdExamples.

Note
By default we don't have reverse iterators for unordered_xxx containers. This saves us 4 bytes per node and it's not used in the majority of cases. Reverse iterators are supported via the last template parameter.

The documentation for this class was generated from the following files: