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 
61  {
62  friend class _Concurrent_unordered_map_traits<_Key_type, _Element_type, _Key_comparator, _Allocator_type, _Allow_multimapping>;
63 
64  public:
65  typedef value_type first_argument_type;
66  typedef value_type second_argument_type;
67  typedef bool result_type;
68 
69  bool operator()(const value_type& _Left, const value_type& _Right) const
70  {
71  return (_M_comparator(_Left.first, _Right.first));
72  }
73 
74  _Value_compare(const _Key_compare& _Traits) : _M_comparator(_Traits)
75  {
76  }
77 
78  protected:
79  _Key_compare _M_comparator; // the comparator predicate for keys
80  };
81 
82  template<class _Type1, class _Type2>
83  static const _Type1& _Key_function(const std::pair<_Type1, _Type2>& _Value)
84  {
85  return (_Value.first);
86  }
87  _Key_compare _M_comparator; // the comparator predicate for keys
88 };
89 } // namespace details;
90 
119 
120 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> > >
121 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> >
122 {
123 public:
124  // Base type definitions
128 
132 
133  typedef _Key_type key_type;
134 
138 
139  typedef typename _Mybase::value_type value_type;
140 
144 
145  typedef _Element_type mapped_type;
146 
150 
151  typedef _Hasher hasher;
152 
156 
157  typedef _Key_equality key_equal;
158 
162 
164 
168 
169  typedef typename _Mybase::pointer pointer;
170 
174 
176 
180 
181  typedef typename _Mybase::reference reference;
182 
186 
188 
192 
193  typedef typename _Mybase::size_type size_type;
194 
198 
200 
204 
205  typedef typename _Mybase::iterator iterator;
206 
210 
212 
216 
218 
222 
224 
249 
250  explicit concurrent_unordered_map(size_type _Number_of_buckets = 8, const hasher& _Hasher = hasher(), const key_equal& _Key_equality = key_equal(),
251  const allocator_type& _Allocator = allocator_type())
252  : _Mybase(_Number_of_buckets, _Key_compare(_Hasher, _Key_equality), _Allocator)
253  {
254  this->rehash(_Number_of_buckets);
255  }
256 
272 
273  concurrent_unordered_map(const allocator_type& _Allocator) : _Mybase(8, _Key_compare(), _Allocator)
274  {
275  }
276 
310 
311  template <typename _Iterator>
312  concurrent_unordered_map(_Iterator _Begin, _Iterator _End, size_type _Number_of_buckets = 8, const hasher& _Hasher = hasher(),
313  const key_equal& _Key_equality = key_equal(), const allocator_type& _Allocator = allocator_type())
314  : _Mybase(_Number_of_buckets, _Key_compare(), allocator_type())
315  {
316  this->rehash(_Number_of_buckets);
317  for (; _Begin != _End; ++_Begin)
318  {
319  this->_Insert(*_Begin);
320  }
321  }
322 
338 
339  concurrent_unordered_map(const concurrent_unordered_map& _Umap) : _Mybase(_Umap)
340  {
341  }
342 
361 
362  concurrent_unordered_map(const concurrent_unordered_map& _Umap, const allocator_type& _Allocator) : _Mybase(_Umap, _Allocator)
363  {
364  }
365 
381 
383  {
384  }
385 
399 
401  {
402  _Mybase::operator=(_Umap);
403  return (*this);
404  }
405 
419 
421  {
423  return (*this);
424  }
425 
447 
448  std::pair<iterator, bool> insert(const value_type& _Value)
449  {
450  return this->_Insert(_Value);
451  }
452 
478 
479  iterator insert(const_iterator _Where, const value_type& _Value)
480  {
481  // Current implementation ignores the hint. The method is provided for compatibility with unordered_map.
482  return this->_Insert(_Value).first;
483  }
484 
509 
510  template<class _Iterator>
511  void insert(_Iterator _First, _Iterator _Last)
512  {
513  this->_Insert(_First, _Last);
514  }
515 
540 
541  template<class _Valty>
542  std::pair<iterator, bool> insert(_Valty&& _Value)
543  {
544  return this->_Insert(std::forward<_Valty>(_Value));
545  }
546 
575 
576  template<class _Valty>
577  typename std::enable_if<!std::is_same<const_iterator,
578  typename std::remove_reference<_Valty>::type>::value, iterator>::type
579  insert(const_iterator _Where, _Valty&& _Value)
580  {
581  // Current implementation ignores the hint. The method is provided for compatibility with unordered_map.
582  return this->_Insert(std::forward<_Valty>(_Value)).first;
583  }
584 
602 
603  iterator unsafe_erase(const_iterator _Where)
604  {
605  return _Mybase::unsafe_erase(_Where);
606  }
607 
628 
629  iterator unsafe_erase(const_iterator _Begin, const_iterator _End)
630  {
631  return _Mybase::unsafe_erase(_Begin, _End);
632  }
633 
651 
652  size_type unsafe_erase(const key_type& _Keyval)
653  {
654  return _Mybase::unsafe_erase(_Keyval);
655  }
656 
663 
665  {
666  _Mybase::swap(_Umap);
667  }
668 
675 
676  hasher hash_function() const
677  {
678  return this->_M_comparator._M_hash_object;
679  }
680 
687 
688  key_equal key_eq() const
689  {
691  }
692 
711 
712  mapped_type& operator[](const key_type& _Keyval)
713  {
714  iterator _Where = this->find(_Keyval);
715 
716  if (_Where == this->end())
717  {
718  _Where = this->_Insert(std::make_pair(_Keyval, mapped_type())).first;
719  }
720 
721  return ((*_Where).second);
722  }
723 
742 
743  mapped_type& operator[](key_type && _Keyval)
744  {
745  iterator _Where = this->find(_Keyval);
746 
747  if (_Where == this->end())
748  {
749  _Where = this->_Insert(std::make_pair(std::forward<key_type>(_Keyval), mapped_type())).first;
750  }
751 
752  return ((*_Where).second);
753  }
754 
767 
768  mapped_type& at(const key_type& _Keyval)
769  {
770  iterator _Where = this->find(_Keyval);
771 
772  if (_Where == this->end())
773  {
774  throw std::out_of_range("invalid concurrent_unordered_map<K, T> key");
775  }
776 
777  return ((*_Where).second);
778  }
779 
792 
793  const mapped_type& at(const key_type& _Keyval) const
794  {
795  const_iterator _Where = this->find(_Keyval);
796 
797  if (_Where == this->end())
798  {
799  throw std::out_of_range("invalid concurrent_unordered_map<K, T> key");
800  }
801 
802  return ((*_Where).second);
803  }
804 };
805 
834 
835 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> > >
836 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> >
837 {
838 public:
839  // Base type definitions
843 
847 
848  typedef _Key_type key_type;
849 
853 
854  typedef typename _Mybase::value_type value_type;
855 
859 
860  typedef _Element_type mapped_type;
861 
865 
866  typedef _Hasher hasher;
867 
871 
872  typedef _Key_equality key_equal;
873 
877 
879 
883 
884  typedef typename _Mybase::pointer pointer;
885 
889 
891 
895 
896  typedef typename _Mybase::reference reference;
897 
901 
903 
907 
908  typedef typename _Mybase::size_type size_type;
909 
913 
915 
919 
920  typedef typename _Mybase::iterator iterator;
921 
925 
927 
931 
933 
937 
939 
964 
965  explicit concurrent_unordered_multimap(size_type _Number_of_buckets = 8, const hasher& _Hasher = hasher(), const key_equal& _Key_equality = key_equal(),
966  const allocator_type& _Allocator = allocator_type())
967  : _Mybase(_Number_of_buckets, _Key_compare(_Hasher, _Key_equality), _Allocator)
968  {
969  this->rehash(_Number_of_buckets);
970  }
971 
987 
988  concurrent_unordered_multimap(const allocator_type& _Allocator) : _Mybase(8, _Key_compare(), _Allocator)
989  {
990  }
991 
1025 
1026  template <typename _Iterator>
1027  concurrent_unordered_multimap(_Iterator _Begin, _Iterator _End, size_type _Number_of_buckets = 8, const hasher& _Hasher = hasher(),
1028  const key_equal& _Key_equality = key_equal(), const allocator_type& _Allocator = allocator_type())
1029  : _Mybase(_Number_of_buckets, _Key_compare(), allocator_type())
1030  {
1031  this->rehash(_Number_of_buckets);
1032  for (; _Begin != _End; ++_Begin)
1033  {
1034  this->_Insert(*_Begin);
1035  }
1036  }
1037 
1053 
1055  {
1056  }
1057 
1076 
1077  concurrent_unordered_multimap(const concurrent_unordered_multimap& _Umap, const allocator_type& _Allocator) : _Mybase(_Umap, _Allocator)
1078  {
1079  }
1080 
1096 
1098  {
1099  }
1100 
1114 
1116  {
1117  _Mybase::operator=(_Umap);
1118  return (*this);
1119  }
1120 
1134 
1136  {
1137  _Mybase::operator=(std::move(_Umap));
1138  return (*this);
1139  }
1140 
1160 
1161  iterator insert(const value_type& _Value)
1162  {
1163  return this->_Insert(_Value).first;
1164  }
1165 
1188 
1189  iterator insert(const_iterator _Where, const value_type& _Value)
1190  {
1191  // Current implementation ignores the hint. The method is provided for compatibility with unordered_multimap.
1192  return this->_Insert(_Value).first;
1193  }
1194 
1217 
1218  template<class _Iterator>
1219  void insert(_Iterator _First, _Iterator _Last)
1220  {
1221  this->_Insert(_First, _Last);
1222  }
1223 
1246 
1247  template<class _Valty>
1248  iterator insert(_Valty&& _Value)
1249  {
1250  return this->_Insert(std::forward<_Valty>(_Value)).first;
1251  }
1252 
1278 
1279  template<class _Valty>
1280  typename std::enable_if<!std::is_same<const_iterator, typename std::remove_reference<_Valty>::type>::value, iterator>::type
1281  insert(const_iterator _Where, _Valty&& _Value)
1282  {
1283  // Current implementation ignores the hint. The method is provided for compatibility with unordered_multimap.
1284  return this->_Insert(std::forward<_Valty>(_Value)).first;
1285  }
1286 
1304 
1305  iterator unsafe_erase(const_iterator _Where)
1306  {
1307  return _Mybase::unsafe_erase(_Where);
1308  }
1309 
1327 
1328  size_type unsafe_erase(const key_type& _Keyval)
1329  {
1330  return _Mybase::unsafe_erase(_Keyval);
1331  }
1332 
1353 
1354  iterator unsafe_erase(const_iterator _First, const_iterator _Last)
1355  {
1356  return _Mybase::unsafe_erase(_First, _Last);
1357  }
1358 
1365 
1367  {
1368  _Mybase::swap(_Umap);
1369  }
1370 
1377 
1378  hasher hash_function() const
1379  {
1380  return this->_M_comparator._M_hash_object;
1381  }
1382 
1389 
1390  key_equal key_eq() const
1391  {
1392  return this->_M_comparator._M_key_compare_object;
1393  }
1394 };
1395 } // namespace Concurrency
1396 
1397 namespace concurrency = ::Concurrency;
1398 
1399 #pragma warning(pop)
1400 #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:1077
_Mybase::const_iterator const_iterator
The type of a constant iterator for the controlled sequence.
Definition: concurrent_unordered_map.h:926
concurrent_unordered_map(const allocator_type &_Allocator)
Constructs a concurrent unordered map.
Definition: concurrent_unordered_map.h:273
concurrent_unordered_multimap(const allocator_type &_Allocator)
Constructs a concurrent unordered multimap.
Definition: concurrent_unordered_map.h:988
details::_Hash_compare< _Key_type, _Hasher, _Key_equality > _Key_compare
Definition: concurrent_unordered_map.h:126
constexpr const _Ty &() _Left
Definition: algorithm:3722
hasher hash_function() const
Returns the stored hash function object.
Definition: concurrent_unordered_map.h:1378
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:400
_Mybase::difference_type difference_type
The type of a signed distance between two elements.
Definition: concurrent_unordered_map.h:914
static const _Type1 & _Key_function(const std::pair< _Type1, _Type2 > &_Value)
Definition: concurrent_unordered_map.h:83
concurrent_unordered_multimap(const concurrent_unordered_multimap &_Umap)
Constructs a concurrent unordered multimap.
Definition: concurrent_unordered_map.h:1054
_Mybase::pointer pointer
The type of a pointer to an element.
Definition: concurrent_unordered_map.h:169
value_type second_argument_type
Definition: concurrent_unordered_map.h:66
_Mybase::difference_type difference_type
The type of a signed distance between two elements.
Definition: concurrent_unordered_map.h:199
iterator insert(const_iterator _Where, const value_type &_Value)
Adds elements to the concurrent_unordered_multimap object.
Definition: concurrent_unordered_map.h:1189
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:965
void insert(_Iterator _First, _Iterator _Last)
Adds elements to the concurrent_unordered_map object.
Definition: concurrent_unordered_map.h:511
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:250
_Mybase::size_type size_type
The type of an unsigned distance between two elements.
Definition: concurrent_unordered_map.h:193
_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:1219
_Mybase::const_iterator const_local_iterator
The type of a constant bucket iterator for the controlled sequence.
Definition: concurrent_unordered_map.h:938
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:181
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:1281
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:1354
_Key_equality key_equal
The type of the comparison function.
Definition: concurrent_unordered_map.h:872
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:793
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:842
_Mybase::const_iterator const_iterator
The type of a constant iterator for the controlled sequence.
Definition: concurrent_unordered_map.h:211
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:629
_Key_compare _M_comparator
Definition: concurrent_unordered_map.h:79
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:664
_Mybase::pointer pointer
The type of a pointer to an element.
Definition: concurrent_unordered_map.h:884
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:908
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:542
hasher hash_function() const
Gets the stored hash function object.
Definition: concurrent_unordered_map.h:676
_Container_base0 _Container_base
Definition: xutility:269
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:768
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:932
_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:1366
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:1115
iterator insert(const value_type &_Value)
Adds elements to the concurrent_unordered_multimap object.
Definition: concurrent_unordered_map.h:1161
_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:205
concurrent_unordered_multimap(concurrent_unordered_multimap &&_Umap)
Constructs a concurrent unordered multimap.
Definition: concurrent_unordered_map.h:1097
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:1305
details::_Hash_compare< _Key_type, _Hasher, _Key_equality > _Key_compare
Definition: concurrent_unordered_map.h:841
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:340
_Mybase::const_iterator const_local_iterator
The type of a constant bucket iterator for the controlled sequence.
Definition: concurrent_unordered_map.h:223
_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:920
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:125
concurrent_unordered_map(concurrent_unordered_map &&_Umap)
Constructs a concurrent unordered map.
Definition: concurrent_unordered_map.h:382
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:1328
iterator insert(_Valty &&_Value)
Adds elements to the concurrent_unordered_multimap object.
Definition: concurrent_unordered_map.h:1248
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:133
_Mybase::value_type value_type
The type of an element.
Definition: concurrent_unordered_map.h:139
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:652
_Key_equality key_equal
The type of the comparison function.
Definition: concurrent_unordered_map.h:157
_Value_compare(const _Key_compare &_Traits)
Definition: concurrent_unordered_map.h:74
_Key_type key_type
Definition: concurrent_unordered_map.h:42
_Hasher hasher
The type of the hash function.
Definition: concurrent_unordered_map.h:151
_Mybase::const_pointer const_pointer
The type of a constant pointer to an element.
Definition: concurrent_unordered_map.h:890
_Mybase::const_pointer const_pointer
The type of a constant pointer to an element.
Definition: concurrent_unordered_map.h:175
_In_ _Value
Definition: corecrt_wstdlib.h:65
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:312
key_equal key_eq() const
Returns the stored equality comparison function object.
Definition: concurrent_unordered_map.h:1390
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:896
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:712
_Element_type mapped_type
The type of a mapped value associated with each key.
Definition: concurrent_unordered_map.h:145
details::_Concurrent_hash< details::_Concurrent_unordered_map_traits< _Key_type, _Element_type, _Key_compare, _Allocator_type, false > > _Mybase
Definition: concurrent_unordered_map.h:127
The concurrent_unordered_multimap class is an concurrency-safe container that controls a varying-leng...
Definition: concurrent_unordered_map.h:836
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1349
_Element_type mapped_type
The type of a mapped value associated with each key.
Definition: concurrent_unordered_map.h:860
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:448
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:1027
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:603
value_type first_argument_type
Definition: concurrent_unordered_map.h:65
_Mybase::const_reference const_reference
The type of a constant reference to an element.
Definition: concurrent_unordered_map.h:187
_Key_compare _M_comparator
Definition: concurrent_unordered_map.h:87
_Mybase::const_reference const_reference
The type of a constant reference to an element.
Definition: concurrent_unordered_map.h:902
key_equal key_eq() const
Gets the stored equality comparison function object.
Definition: concurrent_unordered_map.h:688
_Mybase::value_type value_type
The type of an element.
Definition: concurrent_unordered_map.h:854
concurrent_unordered_multimap< _Key_type, _Element_type, _Hasher, _Key_equality, _Allocator_type > _Mytype
Definition: concurrent_unordered_map.h:840
concurrent_unordered_map(const concurrent_unordered_map &_Umap)
Constructs a concurrent unordered map.
Definition: concurrent_unordered_map.h:339
bool result_type
Definition: concurrent_unordered_map.h:67
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:1135
_Hasher hasher
The type of the hash function.
Definition: concurrent_unordered_map.h:866
_Key_type key_type
The type of an ordering key.
Definition: concurrent_unordered_map.h:848
_Mybase::allocator_type allocator_type
The type of an allocator for managing storage.
Definition: concurrent_unordered_map.h:163
_Concurrent_hash & operator=(const _Concurrent_hash &_Right)
Definition: internal_concurrent_hash.h:148
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:743
concurrent_unordered_map(const concurrent_unordered_map &_Umap, const allocator_type &_Allocator)
Constructs a concurrent unordered map.
Definition: concurrent_unordered_map.h:362
iterator insert(const_iterator _Where, const value_type &_Value)
Adds elements to the concurrent_unordered_map object.
Definition: concurrent_unordered_map.h:479
_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:878
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:579
_Mybase::iterator local_iterator
The type of a bucket iterator for the controlled sequence.
Definition: concurrent_unordered_map.h:217
constexpr const _Ty &() _Right
Definition: algorithm:3723
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:420
The concurrent_unordered_map class is a concurrency-safe container that controls a varying-length seq...
Definition: concurrent_unordered_map.h:121
bool operator()(const value_type &_Left, const value_type &_Right) const
Definition: concurrent_unordered_map.h:69