STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
concurrent_unordered_map.h
Go to the documentation of this file.
1 /***
2 * ==++==
3 *
4 * Copyright (c) Microsoft Corporation. All rights reserved.
5 *
6 * ==--==
7 * =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
8 *
9 * concurrent_unordered_map.h
10 *
11 * =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
12 ****/
13 #pragma once
14 
15 #include <utility>
17 
18 #define _PPL_CONTAINER
19 
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.
22 #endif /* !(defined (_M_X64) || defined (_M_IX86) || defined (_M_ARM) || defined (_M_ARM64)) */
23 
24 #if defined (_M_CEE)
25  #error ERROR: Concurrency Runtime is not supported when compiling /clr.
26 #endif /* defined (_M_CEE) */
27 
28 #pragma pack(push,_CRT_PACKING)
29 #pragma warning(push)
30 #pragma warning(disable: 4100) // Unreferenced formal parameter - needed for document generation
31 
32 namespace Concurrency
33 {
34 namespace details
35 {
36 // Template class for hash map traits
37 template<typename _Key_type, typename _Element_type, typename _Key_comparator, typename _Allocator_type, bool _Allow_multimapping>
39 {
40 public:
41  typedef std::pair<const _Key_type, _Element_type> value_type;
42  typedef _Key_type key_type;
43  typedef _Key_comparator _Key_compare;
44 
45  typedef typename _Allocator_type::template rebind<value_type>::other allocator_type;
46 
47  enum
48  {
49  _M_allow_multimapping = _Allow_multimapping
50  };
51 
53  {
54  }
55 
56  _Concurrent_unordered_map_traits(const _Key_compare& _Traits) : _M_comparator(_Traits)
57  {
58  }
59 
60  class _Value_compare : public std::binary_function<value_type, value_type, bool>
61  {
62  friend class _Concurrent_unordered_map_traits<_Key_type, _Element_type, _Key_comparator, _Allocator_type, _Allow_multimapping>;
63 
64  public:
65  bool operator()(const value_type& _Left, const value_type& _Right) const
66  {
67  return (_M_comparator(_Left.first, _Right.first));
68  }
69 
70  _Value_compare(const _Key_compare& _Traits) : _M_comparator(_Traits)
71  {
72  }
73 
74  protected:
75  _Key_compare _M_comparator; // the comparator predicate for keys
76  };
77 
78  template<class _Type1, class _Type2>
79  static const _Type1& _Key_function(const std::pair<_Type1, _Type2>& _Value)
80  {
81  return (_Value.first);
82  }
83  _Key_compare _M_comparator; // the comparator predicate for keys
84 };
85 } // namespace details;
86 
115 
116 template <typename _Key_type, typename _Element_type, typename _Hasher = std::hash<_Key_type>, typename _Key_equality = std::equal_to<_Key_type>, typename _Allocator_type = std::allocator<std::pair<const _Key_type, _Element_type> > >
117 class concurrent_unordered_map : public details::_Concurrent_hash< details::_Concurrent_unordered_map_traits<_Key_type, _Element_type, details::_Hash_compare<_Key_type, _Hasher, _Key_equality>, _Allocator_type, false> >
118 {
119 public:
120  // Base type definitions
124 
128 
129  typedef _Key_type key_type;
130 
134 
135  typedef typename _Mybase::value_type value_type;
136 
140 
141  typedef _Element_type mapped_type;
142 
146 
147  typedef _Hasher hasher;
148 
152 
153  typedef _Key_equality key_equal;
154 
158 
160 
164 
165  typedef typename _Mybase::pointer pointer;
166 
170 
172 
176 
177  typedef typename _Mybase::reference reference;
178 
182 
184 
188 
189  typedef typename _Mybase::size_type size_type;
190 
194 
196 
200 
201  typedef typename _Mybase::iterator iterator;
202 
206 
208 
212 
214 
218 
220 
245 
246  explicit concurrent_unordered_map(size_type _Number_of_buckets = 8, const hasher& _Hasher = hasher(), const key_equal& _Key_equality = key_equal(),
247  const allocator_type& _Allocator = allocator_type())
248  : _Mybase(_Number_of_buckets, _Key_compare(_Hasher, _Key_equality), _Allocator)
249  {
250  this->rehash(_Number_of_buckets);
251  }
252 
268 
269  concurrent_unordered_map(const allocator_type& _Allocator) : _Mybase(8, _Key_compare(), _Allocator)
270  {
271  }
272 
306 
307  template <typename _Iterator>
308  concurrent_unordered_map(_Iterator _Begin, _Iterator _End, size_type _Number_of_buckets = 8, const hasher& _Hasher = hasher(),
309  const key_equal& _Key_equality = key_equal(), const allocator_type& _Allocator = allocator_type())
310  : _Mybase(_Number_of_buckets, _Key_compare(), allocator_type())
311  {
312  this->rehash(_Number_of_buckets);
313  for (; _Begin != _End; ++_Begin)
314  {
315  this->_Insert(*_Begin);
316  }
317  }
318 
334 
335  concurrent_unordered_map(const concurrent_unordered_map& _Umap) : _Mybase(_Umap)
336  {
337  }
338 
357 
358  concurrent_unordered_map(const concurrent_unordered_map& _Umap, const allocator_type& _Allocator) : _Mybase(_Umap, _Allocator)
359  {
360  }
361 
377 
379  {
380  }
381 
395 
397  {
398  _Mybase::operator=(_Umap);
399  return (*this);
400  }
401 
415 
417  {
419  return (*this);
420  }
421 
443 
444  std::pair<iterator, bool> insert(const value_type& _Value)
445  {
446  return this->_Insert(_Value);
447  }
448 
474 
475  iterator insert(const_iterator _Where, const value_type& _Value)
476  {
477  // Current implementation ignores the hint. The method is provided for compatibility with unordered_map.
478  return this->_Insert(_Value).first;
479  }
480 
505 
506  template<class _Iterator>
507  void insert(_Iterator _First, _Iterator _Last)
508  {
509  this->_Insert(_First, _Last);
510  }
511 
536 
537  template<class _Valty>
538  std::pair<iterator, bool> insert(_Valty&& _Value)
539  {
540  return this->_Insert(std::forward<_Valty>(_Value));
541  }
542 
571 
572  template<class _Valty>
573  typename std::enable_if<!std::is_same<const_iterator,
574  typename std::remove_reference<_Valty>::type>::value, iterator>::type
575  insert(const_iterator _Where, _Valty&& _Value)
576  {
577  // Current implementation ignores the hint. The method is provided for compatibility with unordered_map.
578  return this->_Insert(std::forward<_Valty>(_Value)).first;
579  }
580 
598 
599  iterator unsafe_erase(const_iterator _Where)
600  {
601  return _Mybase::unsafe_erase(_Where);
602  }
603 
624 
625  iterator unsafe_erase(const_iterator _Begin, const_iterator _End)
626  {
627  return _Mybase::unsafe_erase(_Begin, _End);
628  }
629 
647 
648  size_type unsafe_erase(const key_type& _Keyval)
649  {
650  return _Mybase::unsafe_erase(_Keyval);
651  }
652 
659 
661  {
662  _Mybase::swap(_Umap);
663  }
664 
671 
672  hasher hash_function() const
673  {
674  return this->_M_comparator._M_hash_object;
675  }
676 
683 
684  key_equal key_eq() const
685  {
687  }
688 
707 
708  mapped_type& operator[](const key_type& _Keyval)
709  {
710  iterator _Where = this->find(_Keyval);
711 
712  if (_Where == this->end())
713  {
714  _Where = this->_Insert(std::make_pair(_Keyval, mapped_type())).first;
715  }
716 
717  return ((*_Where).second);
718  }
719 
738 
739  mapped_type& operator[](key_type && _Keyval)
740  {
741  iterator _Where = this->find(_Keyval);
742 
743  if (_Where == this->end())
744  {
745  _Where = this->_Insert(std::make_pair(std::forward<key_type>(_Keyval), mapped_type())).first;
746  }
747 
748  return ((*_Where).second);
749  }
750 
763 
764  mapped_type& at(const key_type& _Keyval)
765  {
766  iterator _Where = this->find(_Keyval);
767 
768  if (_Where == this->end())
769  {
770  throw std::out_of_range("invalid concurrent_unordered_map<K, T> key");
771  }
772 
773  return ((*_Where).second);
774  }
775 
788 
789  const mapped_type& at(const key_type& _Keyval) const
790  {
791  const_iterator _Where = this->find(_Keyval);
792 
793  if (_Where == this->end())
794  {
795  throw std::out_of_range("invalid concurrent_unordered_map<K, T> key");
796  }
797 
798  return ((*_Where).second);
799  }
800 };
801 
830 
831 template <typename _Key_type, typename _Element_type, typename _Hasher = std::hash<_Key_type>, typename _Key_equality = std::equal_to<_Key_type>, typename _Allocator_type = std::allocator<std::pair<const _Key_type, _Element_type> > >
832 class concurrent_unordered_multimap : public details::_Concurrent_hash< details::_Concurrent_unordered_map_traits<_Key_type, _Element_type, details::_Hash_compare<_Key_type, _Hasher, _Key_equality>, _Allocator_type, true> >
833 {
834 public:
835  // Base type definitions
839 
843 
844  typedef _Key_type key_type;
845 
849 
850  typedef typename _Mybase::value_type value_type;
851 
855 
856  typedef _Element_type mapped_type;
857 
861 
862  typedef _Hasher hasher;
863 
867 
868  typedef _Key_equality key_equal;
869 
873 
875 
879 
880  typedef typename _Mybase::pointer pointer;
881 
885 
887 
891 
892  typedef typename _Mybase::reference reference;
893 
897 
899 
903 
904  typedef typename _Mybase::size_type size_type;
905 
909 
911 
915 
916  typedef typename _Mybase::iterator iterator;
917 
921 
923 
927 
929 
933 
935 
960 
961  explicit concurrent_unordered_multimap(size_type _Number_of_buckets = 8, const hasher& _Hasher = hasher(), const key_equal& _Key_equality = key_equal(),
962  const allocator_type& _Allocator = allocator_type())
963  : _Mybase(_Number_of_buckets, _Key_compare(_Hasher, _Key_equality), _Allocator)
964  {
965  this->rehash(_Number_of_buckets);
966  }
967 
983 
984  concurrent_unordered_multimap(const allocator_type& _Allocator) : _Mybase(8, _Key_compare(), _Allocator)
985  {
986  }
987 
1021 
1022  template <typename _Iterator>
1023  concurrent_unordered_multimap(_Iterator _Begin, _Iterator _End, size_type _Number_of_buckets = 8, const hasher& _Hasher = hasher(),
1024  const key_equal& _Key_equality = key_equal(), const allocator_type& _Allocator = allocator_type())
1025  : _Mybase(_Number_of_buckets, _Key_compare(), allocator_type())
1026  {
1027  this->rehash(_Number_of_buckets);
1028  for (; _Begin != _End; ++_Begin)
1029  {
1030  this->_Insert(*_Begin);
1031  }
1032  }
1033 
1049 
1051  {
1052  }
1053 
1072 
1073  concurrent_unordered_multimap(const concurrent_unordered_multimap& _Umap, const allocator_type& _Allocator) : _Mybase(_Umap, _Allocator)
1074  {
1075  }
1076 
1092 
1094  {
1095  }
1096 
1110 
1112  {
1113  _Mybase::operator=(_Umap);
1114  return (*this);
1115  }
1116 
1130 
1132  {
1133  _Mybase::operator=(std::move(_Umap));
1134  return (*this);
1135  }
1136 
1156 
1157  iterator insert(const value_type& _Value)
1158  {
1159  return this->_Insert(_Value).first;
1160  }
1161 
1184 
1185  iterator insert(const_iterator _Where, const value_type& _Value)
1186  {
1187  // Current implementation ignores the hint. The method is provided for compatibility with unordered_multimap.
1188  return this->_Insert(_Value).first;
1189  }
1190 
1213 
1214  template<class _Iterator>
1215  void insert(_Iterator _First, _Iterator _Last)
1216  {
1217  this->_Insert(_First, _Last);
1218  }
1219 
1242 
1243  template<class _Valty>
1244  iterator insert(_Valty&& _Value)
1245  {
1246  return this->_Insert(std::forward<_Valty>(_Value)).first;
1247  }
1248 
1274 
1275  template<class _Valty>
1276  typename std::enable_if<!std::is_same<const_iterator, typename std::remove_reference<_Valty>::type>::value, iterator>::type
1277  insert(const_iterator _Where, _Valty&& _Value)
1278  {
1279  // Current implementation ignores the hint. The method is provided for compatibility with unordered_multimap.
1280  return this->_Insert(std::forward<_Valty>(_Value)).first;
1281  }
1282 
1300 
1301  iterator unsafe_erase(const_iterator _Where)
1302  {
1303  return _Mybase::unsafe_erase(_Where);
1304  }
1305 
1323 
1324  size_type unsafe_erase(const key_type& _Keyval)
1325  {
1326  return _Mybase::unsafe_erase(_Keyval);
1327  }
1328 
1349 
1350  iterator unsafe_erase(const_iterator _First, const_iterator _Last)
1351  {
1352  return _Mybase::unsafe_erase(_First, _Last);
1353  }
1354 
1361 
1363  {
1364  _Mybase::swap(_Umap);
1365  }
1366 
1373 
1374  hasher hash_function() const
1375  {
1376  return this->_M_comparator._M_hash_object;
1377  }
1378 
1385 
1386  key_equal key_eq() const
1387  {
1388  return this->_M_comparator._M_key_compare_object;
1389  }
1390 };
1391 } // namespace Concurrency
1392 
1393 namespace concurrency = ::Concurrency;
1394 
1395 #pragma warning(pop)
1396 #pragma pack(pop)
concurrent_unordered_multimap(const concurrent_unordered_multimap &_Umap, const allocator_type &_Allocator)
Constructs a concurrent unordered multimap.
Definition: concurrent_unordered_map.h:1073
_Mybase::const_iterator const_iterator
The type of a constant iterator for the controlled sequence.
Definition: concurrent_unordered_map.h:922
concurrent_unordered_map(const allocator_type &_Allocator)
Constructs a concurrent unordered map.
Definition: concurrent_unordered_map.h:269
concurrent_unordered_multimap(const allocator_type &_Allocator)
Constructs a concurrent unordered multimap.
Definition: concurrent_unordered_map.h:984
details::_Hash_compare< _Key_type, _Hasher, _Key_equality > _Key_compare
Definition: concurrent_unordered_map.h:122
constexpr const _Ty &() _Left
Definition: algorithm:3590
hasher hash_function() const
Returns the stored hash function object.
Definition: concurrent_unordered_map.h:1374
concurrent_unordered_map & operator=(const concurrent_unordered_map &_Umap)
Assigns the contents of another concurrent_unordered_map object to this one. This method is not concu...
Definition: concurrent_unordered_map.h:396
_Mybase::difference_type difference_type
The type of a signed distance between two elements.
Definition: concurrent_unordered_map.h:910
static const _Type1 & _Key_function(const std::pair< _Type1, _Type2 > &_Value)
Definition: concurrent_unordered_map.h:79
concurrent_unordered_multimap(const concurrent_unordered_multimap &_Umap)
Constructs a concurrent unordered multimap.
Definition: concurrent_unordered_map.h:1050
_Mybase::pointer pointer
The type of a pointer to an element.
Definition: concurrent_unordered_map.h:165
_Mybase::difference_type difference_type
The type of a signed distance between two elements.
Definition: concurrent_unordered_map.h:195
iterator insert(const_iterator _Where, const value_type &_Value)
Adds elements to the concurrent_unordered_multimap object.
Definition: concurrent_unordered_map.h:1185
concurrent_unordered_multimap(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 multimap.
Definition: concurrent_unordered_map.h:961
void insert(_Iterator _First, _Iterator _Last)
Adds elements to the concurrent_unordered_map object.
Definition: concurrent_unordered_map.h:507
Definition: concurrent_unordered_map.h:38
concurrent_unordered_map(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 map.
Definition: concurrent_unordered_map.h:246
_Mybase::size_type size_type
The type of an unsigned distance between two elements.
Definition: concurrent_unordered_map.h:189
_Key_equality _M_key_compare_object
Definition: internal_concurrent_hash.h:55
Definition: internal_concurrent_hash.h:27
void insert(_Iterator _First, _Iterator _Last)
Adds elements to the concurrent_unordered_multimap object.
Definition: concurrent_unordered_map.h:1215
_Mybase::const_iterator const_local_iterator
The type of a constant bucket iterator for the controlled sequence.
Definition: concurrent_unordered_map.h:934
void swap(_Concurrent_hash &_Right)
Swaps the contents of two concurrent containers. This function is not concurrency safe...
Definition: internal_concurrent_hash.h:424
_Mybase::reference reference
The type of a reference to an element.
Definition: concurrent_unordered_map.h:177
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_multimap object.
Definition: concurrent_unordered_map.h:1277
iterator unsafe_erase(const_iterator _First, const_iterator _Last)
Removes elements from the concurrent_unordered_multimap at specified positions. This method is not co...
Definition: concurrent_unordered_map.h:1350
_Key_equality key_equal
The type of the comparison function.
Definition: concurrent_unordered_map.h:868
hasher _M_hash_object
Definition: internal_concurrent_hash.h:54
STL namespace.
const mapped_type & at(const key_type &_Keyval) const
Finds an element in a concurrent_unordered_map with a specified key value.. This method is concurrenc...
Definition: concurrent_unordered_map.h:789
The Concurrency namespace provides classes and functions that provide access to the Concurrency Runti...
Definition: agents.h:43
details::_Concurrent_hash< details::_Concurrent_unordered_map_traits< _Key_type, _Element_type, _Key_compare, _Allocator_type, true > > _Mybase
Definition: concurrent_unordered_map.h:838
_Mybase::const_iterator const_iterator
The type of a constant iterator for the controlled sequence.
Definition: concurrent_unordered_map.h:207
allocator_type::const_pointer const_pointer
Definition: internal_concurrent_hash.h:101
iterator unsafe_erase(const_iterator _Begin, const_iterator _End)
Removes elements from the concurrent_unordered_map at specified positions. This method is not concurr...
Definition: concurrent_unordered_map.h:625
_Key_compare _M_comparator
Definition: concurrent_unordered_map.h:75
void swap(concurrent_unordered_map &_Umap)
Swaps the contents of two concurrent_unordered_map objects. This method is not concurrency-safe.
Definition: concurrent_unordered_map.h:660
_Mybase::pointer pointer
The type of a pointer to an element.
Definition: concurrent_unordered_map.h:880
Definition: internal_concurrent_hash.h:88
_Mybase::size_type size_type
The type of an unsigned distance between two elements.
Definition: concurrent_unordered_map.h:904
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
iterator end()
Returns an iterator pointing to the location succeeding the last element in the concurrent container...
Definition: internal_concurrent_hash.h:292
std::pair< iterator, bool > insert(_Valty &&_Value)
Adds elements to the concurrent_unordered_map object.
Definition: concurrent_unordered_map.h:538
hasher hash_function() const
Gets the stored hash function object.
Definition: concurrent_unordered_map.h:672
_Container_base0 _Container_base
Definition: xutility:246
mapped_type & at(const key_type &_Keyval)
Finds an element in a concurrent_unordered_map with a specified key value.. This method is concurrenc...
Definition: concurrent_unordered_map.h:764
std::pair< const _Key_type, _Element_type > value_type
Definition: concurrent_unordered_map.h:41
_Mybase::iterator local_iterator
The type of a bucket iterator for the controlled sequence.
Definition: concurrent_unordered_map.h:928
_Concurrent_unordered_map_traits(const _Key_compare &_Traits)
Definition: concurrent_unordered_map.h:56
void swap(concurrent_unordered_multimap &_Umap)
Swaps the contents of two concurrent_unordered_multimap objects. This method is not concurrency-safe...
Definition: concurrent_unordered_map.h:1362
Definition: internal_split_ordered_list.h:30
concurrent_unordered_multimap & operator=(const concurrent_unordered_multimap &_Umap)
Assigns the contents of another concurrent_unordered_multimap object to this one. This method is not ...
Definition: concurrent_unordered_map.h:1111
iterator insert(const value_type &_Value)
Adds elements to the concurrent_unordered_multimap object.
Definition: concurrent_unordered_map.h:1157
_Allocator_type::template rebind< value_type >::other allocator_type
Definition: concurrent_unordered_map.h:45
_Mybase::iterator iterator
The type of an iterator for the controlled sequence.
Definition: concurrent_unordered_map.h:201
concurrent_unordered_multimap(concurrent_unordered_multimap &&_Umap)
Constructs a concurrent unordered multimap.
Definition: concurrent_unordered_map.h:1093
iterator unsafe_erase(const_iterator _Where)
Removes elements from the concurrent_unordered_multimap at specified positions. This method is not co...
Definition: concurrent_unordered_map.h:1301
details::_Hash_compare< _Key_type, _Hasher, _Key_equality > _Key_compare
Definition: concurrent_unordered_map.h:837
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
constexpr pair< typename _Unrefwrap< _Ty1 >::type, typename _Unrefwrap< _Ty2 >::type > make_pair(_Ty1 &&_Val1, _Ty2 &&_Val2)
Definition: utility:323
_Mybase::const_iterator const_local_iterator
The type of a constant bucket iterator for the controlled sequence.
Definition: concurrent_unordered_map.h:219
_Key_comparator _Key_compare
Definition: concurrent_unordered_map.h:43
_Traits::value_type value_type
Definition: internal_concurrent_hash.h:97
_Mybase::iterator iterator
The type of an iterator for the controlled sequence.
Definition: concurrent_unordered_map.h:916
allocator_type::reference reference
Definition: internal_concurrent_hash.h:102
concurrent_unordered_map< _Key_type, _Element_type, _Hasher, _Key_equality, _Allocator_type > _Mytype
Definition: concurrent_unordered_map.h:121
concurrent_unordered_map(concurrent_unordered_map &&_Umap)
Constructs a concurrent unordered map.
Definition: concurrent_unordered_map.h:378
size_type unsafe_erase(const key_type &_Keyval)
Removes elements from the concurrent_unordered_multimap at specified positions. This method is not co...
Definition: concurrent_unordered_map.h:1324
iterator insert(_Valty &&_Value)
Adds elements to the concurrent_unordered_multimap object.
Definition: concurrent_unordered_map.h:1244
iterator find(const key_type &_Keyval)
Finds an element that matches a specified key. This function is concurrency safe. ...
Definition: internal_concurrent_hash.h:474
allocator_type::pointer pointer
Definition: internal_concurrent_hash.h:100
_Key_type key_type
The type of an ordering key.
Definition: concurrent_unordered_map.h:129
_Mybase::value_type value_type
The type of an element.
Definition: concurrent_unordered_map.h:135
size_type unsafe_erase(const key_type &_Keyval)
Removes elements from the concurrent_unordered_map at specified positions. This method is not concurr...
Definition: concurrent_unordered_map.h:648
_Key_equality key_equal
The type of the comparison function.
Definition: concurrent_unordered_map.h:153
_Value_compare(const _Key_compare &_Traits)
Definition: concurrent_unordered_map.h:70
_Key_type key_type
Definition: concurrent_unordered_map.h:42
_Hasher hasher
The type of the hash function.
Definition: concurrent_unordered_map.h:147
_Mybase::const_pointer const_pointer
The type of a constant pointer to an element.
Definition: concurrent_unordered_map.h:886
_Mybase::const_pointer const_pointer
The type of a constant pointer to an element.
Definition: concurrent_unordered_map.h:171
concurrent_unordered_map(_Iterator _Begin, _Iterator _End, 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 map.
Definition: concurrent_unordered_map.h:308
key_equal key_eq() const
Returns the stored equality comparison function object.
Definition: concurrent_unordered_map.h:1386
allocator_type::difference_type difference_type
Definition: internal_concurrent_hash.h:106
_Concurrent_unordered_map_traits()
Definition: concurrent_unordered_map.h:52
allocator_type::const_reference const_reference
Definition: internal_concurrent_hash.h:103
_Mybase::reference reference
The type of a reference to an element.
Definition: concurrent_unordered_map.h:892
mapped_type & operator[](const key_type &_Keyval)
Finds or inserts an element with the specified key. This method is concurrency-safe.
Definition: concurrent_unordered_map.h:708
_Element_type mapped_type
The type of a mapped value associated with each key.
Definition: concurrent_unordered_map.h:141
details::_Concurrent_hash< details::_Concurrent_unordered_map_traits< _Key_type, _Element_type, _Key_compare, _Allocator_type, false > > _Mybase
Definition: concurrent_unordered_map.h:123
The concurrent_unordered_multimap class is an concurrency-safe container that controls a varying-leng...
Definition: concurrent_unordered_map.h:832
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1290
_Element_type mapped_type
The type of a mapped value associated with each key.
Definition: concurrent_unordered_map.h:856
allocator_type::size_type size_type
Definition: internal_concurrent_hash.h:105
std::pair< iterator, bool > insert(const value_type &_Value)
Adds elements to the concurrent_unordered_map object.
Definition: concurrent_unordered_map.h:444
concurrent_unordered_multimap(_Iterator _Begin, _Iterator _End, 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 multimap.
Definition: concurrent_unordered_map.h:1023
iterator unsafe_erase(const_iterator _Where)
Removes elements from the concurrent_unordered_map at specified positions. This method is not concurr...
Definition: concurrent_unordered_map.h:599
_Mybase::const_reference const_reference
The type of a constant reference to an element.
Definition: concurrent_unordered_map.h:183
_Key_compare _M_comparator
Definition: concurrent_unordered_map.h:83
_Mybase::const_reference const_reference
The type of a constant reference to an element.
Definition: concurrent_unordered_map.h:898
key_equal key_eq() const
Gets the stored equality comparison function object.
Definition: concurrent_unordered_map.h:684
_Mybase::value_type value_type
The type of an element.
Definition: concurrent_unordered_map.h:850
concurrent_unordered_multimap< _Key_type, _Element_type, _Hasher, _Key_equality, _Allocator_type > _Mytype
Definition: concurrent_unordered_map.h:836
concurrent_unordered_map(const concurrent_unordered_map &_Umap)
Constructs a concurrent unordered map.
Definition: concurrent_unordered_map.h:335
concurrent_unordered_multimap & operator=(concurrent_unordered_multimap &&_Umap)
Assigns the contents of another concurrent_unordered_multimap object to this one. This method is not ...
Definition: concurrent_unordered_map.h:1131
_Hasher hasher
The type of the hash function.
Definition: concurrent_unordered_map.h:862
_Key_type key_type
The type of an ordering key.
Definition: concurrent_unordered_map.h:844
_Mybase::allocator_type allocator_type
The type of an allocator for managing storage.
Definition: concurrent_unordered_map.h:159
_Concurrent_hash & operator=(const _Concurrent_hash &_Right)
Definition: internal_concurrent_hash.h:148
_In_ int _Value
Definition: setjmp.h:173
mapped_type & operator[](key_type &&_Keyval)
Finds or inserts an element with the specified key. This method is concurrency-safe.
Definition: concurrent_unordered_map.h:739
concurrent_unordered_map(const concurrent_unordered_map &_Umap, const allocator_type &_Allocator)
Constructs a concurrent unordered map.
Definition: concurrent_unordered_map.h:358
iterator insert(const_iterator _Where, const value_type &_Value)
Adds elements to the concurrent_unordered_map object.
Definition: concurrent_unordered_map.h:475
_Traits::allocator_type allocator_type
Definition: internal_concurrent_hash.h:99
_FwdIt _Last
Definition: algorithm:1936
_Mybase::allocator_type allocator_type
The type of an allocator for managing storage.
Definition: concurrent_unordered_map.h:874
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_map object.
Definition: concurrent_unordered_map.h:575
_Mybase::iterator local_iterator
The type of a bucket iterator for the controlled sequence.
Definition: concurrent_unordered_map.h:213
constexpr const _Ty &() _Right
Definition: algorithm:3591
concurrent_unordered_map & operator=(concurrent_unordered_map &&_Umap)
Assigns the contents of another concurrent_unordered_map object to this one. This method is not concu...
Definition: concurrent_unordered_map.h:416
The concurrent_unordered_map class is a concurrency-safe container that controls a varying-length seq...
Definition: concurrent_unordered_map.h:117
bool operator()(const value_type &_Left, const value_type &_Right) const
Definition: concurrent_unordered_map.h:65