18 #define _PPL_CONTAINER
20 #if !(defined (_M_X64) || defined (_M_IX86) || defined (_M_ARM) || defined (_M_ARM64))
21 #error ERROR: Concurrency Runtime is supported only on X64, X86, ARM, and ARM64 architectures.
25 #error ERROR: Concurrency Runtime is not supported when compiling /clr.
28 #pragma pack(push,_CRT_PACKING)
30 #pragma warning(disable: 4100) // Unreferenced formal parameter - needed for document generation
37 template<
typename _Key_type,
typename _Key_comparator,
typename _Allocator_type,
bool _Allow_multimapping>
45 typedef typename _Allocator_type::template rebind<value_type>::other
allocator_type;
97 template <
typename _Key_type,
typename _Hasher = std::hash<_Key_type>,
typename _Key_equality = std::equal_to<_Key_type>,
typename _Allocator_type = std::allocator<_Key_type> >
223 : _Mybase(_Number_of_buckets, _Key_compare(_Hasher, _Key_equality), _Allocator)
225 this->
rehash(_Number_of_buckets);
282 template <
typename _Iterator>
285 : _Mybase(_Number_of_buckets, _Key_compare(), allocator_type())
287 this->
rehash(_Number_of_buckets);
288 for (; _First !=
_Last; ++_First)
453 return this->
_Insert(_Value).first;
481 template<
class _Iterator>
482 void insert(_Iterator _First, _Iterator _Last)
512 template<
class _Valty>
547 template<
class _Valty>
549 typename std::remove_reference<_Valty>::type>::value, iterator>::type
691 template <
typename _Key_type,
typename _Hasher = std::hash<_Key_type>,
typename _Key_equality = std::equal_to<_Key_type>,
typename _Allocator_type = std::allocator<_Key_type> >
817 : _Mybase(_Number_of_buckets, _Key_compare(_Hasher, _Key_equality), _Allocator)
819 this->
rehash(_Number_of_buckets);
876 template <
typename _Iterator>
879 : _Mybase(_Number_of_buckets, _Key_compare(), allocator_type())
881 this->
rehash(_Number_of_buckets);
882 for (; _First !=
_Last; ++_First)
1013 return this->
_Insert(_Value).first;
1042 return this->
_Insert(_Value).first;
1068 template<
class _Iterator>
1069 void insert(_Iterator _First, _Iterator _Last)
1097 template<
class _Valty>
1129 template<
class _Valty>
1131 typename std::remove_reference<_Valty>::type>::value, iterator>::type
1251 #pragma warning(pop)
hasher hash_function() const
Returns the stored hash function object.
Definition: concurrent_unordered_set.h:647
concurrent_unordered_multiset(const concurrent_unordered_multiset &_Uset, const allocator_type &_Allocator)
Constructs a concurrent unordered multiset.
Definition: concurrent_unordered_set.h:927
_Mybase::difference_type difference_type
The type of a signed distance between two elements.
Definition: concurrent_unordered_set.h:764
_Mybase::const_reference const_reference
The type of a constant reference to an element.
Definition: concurrent_unordered_set.h:752
_Mybase::const_reference const_reference
The type of a constant reference to an element.
Definition: concurrent_unordered_set.h:158
_Concurrent_unordered_set_traits(const _Key_comparator &_Traits)
Definition: concurrent_unordered_set.h:56
Definition: concurrent_unordered_set.h:49
void rehash(size_type _Buckets)
Rebuilds the hash table.
Definition: internal_concurrent_hash.h:842
std::enable_if<!std::is_same< const_iterator, typename std::remove_reference< _Valty >::type >::value, iterator >::type insert(const_iterator _Where, _Valty &&_Value)
Adds elements to the concurrent_unordered_multiset object.
Definition: concurrent_unordered_set.h:1132
_Key_type value_type
Definition: concurrent_unordered_set.h:41
_Key_equality key_equal
The type of the comparison function.
Definition: concurrent_unordered_set.h:722
void insert(_Iterator _First, _Iterator _Last)
Adds elements to the concurrent_unordered_multiset object.
Definition: concurrent_unordered_set.h:1069
std::pair< iterator, bool > insert(const value_type &_Value)
Adds elements to the concurrent_unordered_set object.
Definition: concurrent_unordered_set.h:419
concurrent_unordered_multiset & operator=(concurrent_unordered_multiset &&_Uset)
Assigns the contents of another concurrent_unordered_multiset object to this one. This method is not ...
Definition: concurrent_unordered_set.h:985
Definition: internal_concurrent_hash.h:27
_Key_comparator _Key_compare
Definition: concurrent_unordered_set.h:43
void insert(_Iterator _First, _Iterator _Last)
Adds elements to the concurrent_unordered_set object.
Definition: concurrent_unordered_set.h:482
void swap(_Concurrent_hash &_Right)
Swaps the contents of two concurrent containers. This function is not concurrency safe...
Definition: internal_concurrent_hash.h:424
hasher hash_function() const
Returns the stored hash function object.
Definition: concurrent_unordered_set.h:1230
_Mybase::iterator local_iterator
The type of a bucket iterator for the controlled sequence.
Definition: concurrent_unordered_set.h:782
concurrent_unordered_set(const allocator_type &_Allocator)
Constructs a concurrent unordered set.
Definition: concurrent_unordered_set.h:244
_Mybase::const_iterator const_iterator
The type of a constant iterator for the controlled sequence.
Definition: concurrent_unordered_set.h:182
_Mybase::value_type value_type
The type of an element.
Definition: concurrent_unordered_set.h:710
_Mybase::const_pointer const_pointer
The type of a constant pointer to an element.
Definition: concurrent_unordered_set.h:740
details::_Concurrent_hash< details::_Concurrent_unordered_set_traits< _Key_type, _Key_compare, _Allocator_type, false > > _Mybase
Definition: concurrent_unordered_set.h:104
The Concurrency namespace provides classes and functions that provide access to the Concurrency Runti...
Definition: agents.h:43
_Mybase::difference_type difference_type
The type of a signed distance between two elements.
Definition: concurrent_unordered_set.h:170
_Concurrent_unordered_set_traits()
Definition: concurrent_unordered_set.h:52
_Mybase::reference reference
The type of a reference to an element.
Definition: concurrent_unordered_set.h:152
size_type unsafe_erase(const key_type &_Keyval)
Removes elements from the concurrent_unordered_set at specified positions. This method is not concurr...
Definition: concurrent_unordered_set.h:597
allocator_type::const_pointer const_pointer
Definition: internal_concurrent_hash.h:101
void swap(concurrent_unordered_multiset &_Uset)
Swaps the contents of two concurrent_unordered_multiset objects. This method is not concurrency-safe...
Definition: concurrent_unordered_set.h:1218
details::_Hash_compare< _Key_type, _Hasher, _Key_equality > _Key_compare
Definition: concurrent_unordered_set.h:697
Definition: internal_concurrent_hash.h:88
_Mybase::allocator_type allocator_type
The type of an allocator for managing storage.
Definition: concurrent_unordered_set.h:728
_Mybase::iterator iterator
The type of an iterator for the controlled sequence.
Definition: concurrent_unordered_set.h:770
_Key_equality key_equal
The type of the comparison function.
Definition: concurrent_unordered_set.h:128
std::conditional< std::is_same< key_type, value_type >::value, typename _Mylist::const_iterator, typename _Mylist::iterator >::type iterator
Definition: internal_concurrent_hash.h:108
_Mybase::size_type size_type
The type of an unsigned distance between two elements.
Definition: concurrent_unordered_set.h:164
Definition: concurrent_unordered_set.h:38
_Mybase::reference reference
The type of a reference to an element.
Definition: concurrent_unordered_set.h:746
_Allocator_type::template rebind< value_type >::other allocator_type
Definition: concurrent_unordered_set.h:45
_Container_base0 _Container_base
Definition: xutility:246
_Key_comparator _M_comparator
Definition: concurrent_unordered_set.h:67
concurrent_unordered_set(concurrent_unordered_set &&_Uset)
Constructs a concurrent unordered set.
Definition: concurrent_unordered_set.h:353
concurrent_unordered_set(_Iterator _First, _Iterator _Last, size_type _Number_of_buckets=8, const hasher &_Hasher=hasher(), const key_equal &_Key_equality=key_equal(), const allocator_type &_Allocator=allocator_type())
Constructs a concurrent unordered set.
Definition: concurrent_unordered_set.h:283
details::_Hash_compare< _Key_type, _Hasher, _Key_equality > _Key_compare
Definition: concurrent_unordered_set.h:103
_Mybase::size_type size_type
The type of an unsigned distance between two elements.
Definition: concurrent_unordered_set.h:758
iterator insert(const_iterator _Where, const value_type &_Value)
Adds elements to the concurrent_unordered_multiset object.
Definition: concurrent_unordered_set.h:1039
Definition: internal_split_ordered_list.h:30
concurrent_unordered_multiset(const concurrent_unordered_multiset &_Uset)
Constructs a concurrent unordered multiset.
Definition: concurrent_unordered_set.h:904
concurrent_unordered_multiset(concurrent_unordered_multiset &&_Uset)
Constructs a concurrent unordered multiset.
Definition: concurrent_unordered_set.h:947
iterator unsafe_erase(const_iterator _Where)
Removes elements from the container at specified positions. This method is not concurrency-safe.
Definition: internal_concurrent_hash.h:350
The concurrent_unordered_multiset class is an concurrency-safe container that controls a varying-leng...
Definition: concurrent_unordered_set.h:692
_Mybase::iterator iterator
The type of an iterator for the controlled sequence.
Definition: concurrent_unordered_set.h:176
iterator unsafe_erase(const_iterator _First, const_iterator _Last)
Removes elements from the concurrent_unordered_multiset at specified positions. This method is not co...
Definition: concurrent_unordered_set.h:1182
concurrent_unordered_set & operator=(concurrent_unordered_set &&_Uset)
Assigns the contents of another concurrent_unordered_set object to this one. This method is not concu...
Definition: concurrent_unordered_set.h:391
_Key_type key_type
The type of an ordering key.
Definition: concurrent_unordered_set.h:110
concurrent_unordered_set(size_type _Number_of_buckets=8, const hasher &_Hasher=hasher(), const key_equal &_Key_equality=key_equal(), const allocator_type &_Allocator=allocator_type())
Constructs a concurrent unordered set.
Definition: concurrent_unordered_set.h:221
iterator insert(const value_type &_Value)
Adds elements to the concurrent_unordered_multiset object.
Definition: concurrent_unordered_set.h:1011
concurrent_unordered_set< _Key_type, _Hasher, _Key_equality, _Allocator_type > _Mytype
Definition: concurrent_unordered_set.h:102
_Traits::value_type value_type
Definition: internal_concurrent_hash.h:97
iterator insert(_Valty &&_Value)
Adds elements to the concurrent_unordered_multiset object.
Definition: concurrent_unordered_set.h:1098
std::pair< iterator, bool > _Insert(_ValTy &&_Value)
Definition: internal_concurrent_hash.h:861
allocator_type::reference reference
Definition: internal_concurrent_hash.h:102
_Key_type key_type
Definition: concurrent_unordered_set.h:42
iterator unsafe_erase(const_iterator _Where)
Removes elements from the concurrent_unordered_set at specified positions. This method is not concurr...
Definition: concurrent_unordered_set.h:574
_Mybase::const_iterator const_local_iterator
The type of a constant bucket iterator for the controlled sequence.
Definition: concurrent_unordered_set.h:194
allocator_type::pointer pointer
Definition: internal_concurrent_hash.h:100
details::_Concurrent_hash< details::_Concurrent_unordered_set_traits< _Key_type, _Key_compare, _Allocator_type, true > > _Mybase
Definition: concurrent_unordered_set.h:698
concurrent_unordered_multiset< _Key_type, _Hasher, _Key_equality, _Allocator_type > _Mytype
Definition: concurrent_unordered_set.h:696
std::pair< iterator, bool > insert(_Valty &&_Value)
Adds elements to the concurrent_unordered_set object.
Definition: concurrent_unordered_set.h:513
concurrent_unordered_multiset(_Iterator _First, _Iterator _Last, size_type _Number_of_buckets=8, const hasher &_Hasher=hasher(), const key_equal &_Key_equality=key_equal(), const allocator_type &_Allocator=allocator_type())
Constructs a concurrent unordered multiset.
Definition: concurrent_unordered_set.h:877
iterator unsafe_erase(const_iterator _Where)
Removes elements from the concurrent_unordered_multiset at specified positions. This method is not co...
Definition: concurrent_unordered_set.h:1156
concurrent_unordered_set(const concurrent_unordered_set &_Uset, const allocator_type &_Allocator)
Constructs a concurrent unordered set.
Definition: concurrent_unordered_set.h:333
concurrent_unordered_set & operator=(const concurrent_unordered_set &_Uset)
Assigns the contents of another concurrent_unordered_set object to this one. This method is not concu...
Definition: concurrent_unordered_set.h:371
_Mybase::allocator_type allocator_type
The type of an allocator for managing storage.
Definition: concurrent_unordered_set.h:134
size_type unsafe_erase(const key_type &_Keyval)
Removes elements from the concurrent_unordered_multiset at specified positions. This method is not co...
Definition: concurrent_unordered_set.h:1206
std::enable_if<!std::is_same< const_iterator, typename std::remove_reference< _Valty >::type >::value, iterator >::type insert(const_iterator _Where, _Valty &&_Value)
Adds elements to the concurrent_unordered_set object.
Definition: concurrent_unordered_set.h:550
concurrent_unordered_set(const concurrent_unordered_set &_Uset)
Constructs a concurrent unordered set.
Definition: concurrent_unordered_set.h:310
allocator_type::difference_type difference_type
Definition: internal_concurrent_hash.h:106
_Hasher hasher
The type of the hash function.
Definition: concurrent_unordered_set.h:716
_Mybase::pointer pointer
The type of a pointer to an element.
Definition: concurrent_unordered_set.h:140
_Mybase::pointer pointer
The type of a pointer to an element.
Definition: concurrent_unordered_set.h:734
allocator_type::const_reference const_reference
Definition: internal_concurrent_hash.h:103
_Key_type key_type
The type of an ordering key.
Definition: concurrent_unordered_set.h:704
iterator insert(const_iterator _Where, const value_type &_Value)
Adds elements to the concurrent_unordered_set object.
Definition: concurrent_unordered_set.h:450
_Mybase::const_iterator const_iterator
The type of a constant iterator for the controlled sequence.
Definition: concurrent_unordered_set.h:776
void swap(concurrent_unordered_set &_Uset)
Swaps the contents of two concurrent_unordered_set objects. This method is not concurrency-safe.
Definition: concurrent_unordered_set.h:635
concurrent_unordered_multiset & operator=(const concurrent_unordered_multiset &_Uset)
Assigns the contents of another concurrent_unordered_multiset object to this one. This method is not ...
Definition: concurrent_unordered_set.h:965
static const _Key_type & _Key_function(const value_type &_Value)
Definition: concurrent_unordered_set.h:62
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1290
allocator_type::size_type size_type
Definition: internal_concurrent_hash.h:105
iterator unsafe_erase(const_iterator _First, const_iterator _Last)
Removes elements from the concurrent_unordered_set at specified positions. This method is not concurr...
Definition: concurrent_unordered_set.h:623
_Mybase::value_type value_type
The type of an element.
Definition: concurrent_unordered_set.h:116
concurrent_unordered_multiset(const allocator_type &_Allocator)
Constructs a concurrent unordered multiset.
Definition: concurrent_unordered_set.h:838
_Hasher hasher
The type of the hash function.
Definition: concurrent_unordered_set.h:122
key_equal key_eq() const
Returns the stored equality comparison function object.
Definition: concurrent_unordered_set.h:659
_Mybase::iterator local_iterator
The type of a bucket iterator for the controlled sequence.
Definition: concurrent_unordered_set.h:188
key_equal key_eq() const
The stored equality comparison function object.
Definition: concurrent_unordered_set.h:1242
_Concurrent_hash & operator=(const _Concurrent_hash &_Right)
Definition: internal_concurrent_hash.h:148
_In_ int _Value
Definition: setjmp.h:173
_Key_compare _Value_compare
Definition: concurrent_unordered_set.h:60
_Mybase::const_pointer const_pointer
The type of a constant pointer to an element.
Definition: concurrent_unordered_set.h:146
_Traits::allocator_type allocator_type
Definition: internal_concurrent_hash.h:99
_FwdIt _Last
Definition: algorithm:1936
_Mybase::const_iterator const_local_iterator
The type of a constant bucket iterator for the controlled sequence.
Definition: concurrent_unordered_set.h:788
concurrent_unordered_multiset(size_type _Number_of_buckets=8, const hasher &_Hasher=hasher(), const key_equal &_Key_equality=key_equal(), const allocator_type &_Allocator=allocator_type())
Constructs a concurrent unordered multiset.
Definition: concurrent_unordered_set.h:815
The concurrent_unordered_set class is an concurrency-safe container that controls a varying-length se...
Definition: concurrent_unordered_set.h:98