11#ifndef INCLUDED_BSLSTL_UNORDEREDMULTIMAP_CPP03
12#define INCLUDED_BSLSTL_UNORDEREDMULTIMAP_CPP03
63#ifdef COMPILING_BSLSTL_UNORDEREDMULTIMAP_H
86class unordered_multimap {
97 typedef pair<const KEY, VALUE> ValueType;
102 typedef ::BloombergLP::bslstl::UnorderedMapKeyConfiguration<
const KEY,
109 typedef ::BloombergLP::bslstl::HashTable<ListConfiguration,
116 typedef ::BloombergLP::bslalg::BidirectionalLink HashTableLink;
120 typedef BloombergLP::bslmf::MovableRefUtil MoveUtil;
123 template <
class KEY2,
129 const unordered_multimap<KEY2, VALUE2, HASH2, EQUAL2, ALLOCATOR2>&,
130 const unordered_multimap<KEY2, VALUE2, HASH2, EQUAL2, ALLOCATOR2>&);
149 typedef ::BloombergLP::bslstl::HashTableIterator<
152 typedef ::BloombergLP::bslstl::HashTableIterator<
155 typedef ::BloombergLP::bslstl::HashTableBucketIterator<
158 typedef ::BloombergLP::bslstl::HashTableBucketIterator<
170 const HASH& hashFunction = HASH(),
171 const EQUAL& keyEqual = EQUAL(),
172 const ALLOCATOR& basicAllocator = ALLOCATOR());
174 const HASH& hashFunction,
175 const ALLOCATOR& basicAllocator);
177 const ALLOCATOR& basicAllocator);
220 BloombergLP::bslmf::MovableRef<unordered_multimap> original);
253 BloombergLP::bslmf::MovableRef<unordered_multimap> original,
286 template <
class INPUT_ITERATOR>
290 const HASH& hashFunction = HASH(),
291 const EQUAL& keyEqual = EQUAL(),
292 const ALLOCATOR& basicAllocator = ALLOCATOR());
293 template <
class INPUT_ITERATOR>
297 const HASH& hashFunction,
298 const ALLOCATOR& basicAllocator);
299 template <
class INPUT_ITERATOR>
303 const ALLOCATOR& basicAllocator);
304 template <
class INPUT_ITERATOR>
307 const ALLOCATOR& basicAllocator);
309#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
310# ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
312 class = bsl::enable_if_t<std::is_invocable_v<HASH, const KEY &>>,
313 class = bsl::enable_if_t<
314 std::is_invocable_v<EQUAL, const KEY &, const KEY &>>,
315 class = bsl::enable_if_t< bsl::IsStdAllocator_v<ALLOCATOR>>
319 std::initializer_list<value_type> values,
320 size_type initialNumBuckets = 0,
321 const HASH& hashFunction = HASH(),
322 const EQUAL& keyEqual = EQUAL(),
323 const ALLOCATOR& basicAllocator = ALLOCATOR());
324# ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
326 class = bsl::enable_if_t<std::is_invocable_v<HASH, const KEY &>>,
327 class = bsl::enable_if_t< bsl::IsStdAllocator_v<ALLOCATOR>>
331 size_type initialNumBuckets,
332 const HASH& hashFunction,
333 const ALLOCATOR& basicAllocator);
334# ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
336 class = bsl::enable_if_t< bsl::IsStdAllocator_v<ALLOCATOR>>
340 size_type initialNumBuckets,
341 const ALLOCATOR& basicAllocator);
342# ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
367 class = bsl::enable_if_t< bsl::IsStdAllocator_v<ALLOCATOR>>
371 const ALLOCATOR& basicAllocator);
407 operator=(BloombergLP::bslmf::MovableRef<unordered_multimap> rhs)
409 AllocatorTraits::is_always_equal::value &&
410 std::is_nothrow_move_assignable<HASH>::value &&
411 std::is_nothrow_move_assignable<EQUAL>::value);
413#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
465 template <class LOOKUP_KEY>
467 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
468 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
469 pair<iterator, iterator> >::type
474 HashTableLink *first;
476 d_impl.findRange(&first, &last, key);
477 return ResultType(iterator(first), iterator(last));
531 template <
class LOOKUP_KEY>
533 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
534 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
536 find(
const LOOKUP_KEY& key)
556#if defined(BSLS_PLATFORM_CMP_SUN) && BSLS_PLATFORM_CMP_VERSION < 0x5130
557 template <
class ALT_VALUE_TYPE>
559#elif !defined(BSLS_COMPILERFEATURES_SUPPORT_TRAITS_HEADER)
560 template <
class ALT_VALUE_TYPE>
561 typename enable_if<is_convertible<ALT_VALUE_TYPE, value_type>::value,
571 template <
class ALT_VALUE_TYPE>
572 typename enable_if<std::is_constructible<
value_type,
573 ALT_VALUE_TYPE&&>::value,
599#if defined(BSLS_PLATFORM_CMP_SUN) && BSLS_PLATFORM_CMP_VERSION < 0x5130
600 template <
class ALT_VALUE_TYPE>
602#elif !defined(BSLS_COMPILERFEATURES_SUPPORT_TRAITS_HEADER)
603 template <
class ALT_VALUE_TYPE>
604 typename enable_if<is_convertible<ALT_VALUE_TYPE, value_type>::value,
622 template <
class ALT_VALUE_TYPE>
623 typename enable_if<std::is_constructible<
value_type,
624 ALT_VALUE_TYPE&&>::value,
649 template <
class INPUT_ITERATOR>
650 void insert(INPUT_ITERATOR first, INPUT_ITERATOR last);
652#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
658 void insert(std::initializer_list<value_type> values);
661#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
664#ifndef BSLSTL_UNORDEREDMULTIMAP_VARIADIC_LIMIT
665#define BSLSTL_UNORDEREDMULTIMAP_VARIADIC_LIMIT 2
667#ifndef BSLSTL_UNORDEREDMULTIMAP_VARIADIC_LIMIT_A
668#define BSLSTL_UNORDEREDMULTIMAP_VARIADIC_LIMIT_A BSLSTL_UNORDEREDMULTIMAP_VARIADIC_LIMIT
671#if BSLSTL_UNORDEREDMULTIMAP_VARIADIC_LIMIT_A >= 0
675#if BSLSTL_UNORDEREDMULTIMAP_VARIADIC_LIMIT_A >= 1
676 template <
class Args_1>
680#if BSLSTL_UNORDEREDMULTIMAP_VARIADIC_LIMIT_A >= 2
681 template <
class Args_1,
688#if BSLSTL_UNORDEREDMULTIMAP_VARIADIC_LIMIT_A >= 0
692#if BSLSTL_UNORDEREDMULTIMAP_VARIADIC_LIMIT_A >= 1
693 template <
class Args_1>
698#if BSLSTL_UNORDEREDMULTIMAP_VARIADIC_LIMIT_A >= 2
699 template <
class Args_1,
710 template <
class... Args>
713 template <
class... Args>
756 AllocatorTraits::is_always_equal::value &&
757 bsl::is_nothrow_swappable<HASH>::value &&
758 bsl::is_nothrow_swappable<EQUAL>::value);
787 template <class LOOKUP_KEY>
789 BloombergLP::
bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value &&
790 BloombergLP::
bslmf::IsTransparentPredicate<EQUAL,
793 contains(const LOOKUP_KEY& key)
const
829 template <class LOOKUP_KEY>
831 BloombergLP::
bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
832 && BloombergLP::
bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
834 find(const LOOKUP_KEY& key)
const
850 template <
class LOOKUP_KEY>
852 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
853 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
855 count(
const LOOKUP_KEY& key)
const
858 typedef ::BloombergLP::bslalg::BidirectionalNode<value_type> BNode;
861 for (HashTableLink *cursor = d_impl.find(key);
863 ++result, cursor = cursor->nextLink())
865 BNode *cursorNode =
static_cast<BNode *
>(cursor);
868 ListConfiguration::extractKey(cursorNode->value()))) {
890 template <
class LOOKUP_KEY>
892 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
893 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
894 pair<const_iterator, const_iterator> >::type
899 HashTableLink *first;
901 d_impl.findRange(&first, &last, key);
971#ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
981 class INPUT_ITERATOR,
982 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
984 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
988 class = bsl::enable_if_t<
std::is_invocable_v<HASH, const KEY &>>,
989 class = bsl::enable_if_t<
990 std::is_invocable_v<EQUAL, const KEY &, const KEY &>>,
991 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
995 typename bsl::allocator_traits<ALLOCATOR>::size_type = 0,
998 ALLOCATOR = ALLOCATOR())
1008 class INPUT_ITERATOR,
1012 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
1014 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
1015 class DEFAULT_ALLOCATOR = bsl::allocator<pair<const KEY, VALUE>>,
1016 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
1021 typename bsl::allocator_traits<DEFAULT_ALLOCATOR>::size_type,
1035 class INPUT_ITERATOR,
1038 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
1040 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
1041 class = bsl::enable_if_t<std::is_invocable_v<HASH, const KEY &>>,
1042 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
1046 typename bsl::allocator_traits<ALLOCATOR>::size_type,
1058 class INPUT_ITERATOR,
1061 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
1063 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
1064 class DEFAULT_ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE>>,
1065 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
1070 typename bsl::allocator_traits<DEFAULT_ALLOCATOR>::size_type,
1080 class INPUT_ITERATOR,
1082 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
1084 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
1085 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
1089 typename bsl::allocator_traits<ALLOCATOR>::size_type,
1103 class INPUT_ITERATOR,
1105 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
1107 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
1108 class DEFAULT_ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE>>,
1109 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
1114 typename bsl::allocator_traits<DEFAULT_ALLOCATOR>::size_type,
1125 class INPUT_ITERATOR,
1127 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
1129 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
1130 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
1144 class INPUT_ITERATOR,
1146 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
1148 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
1149 class DEFAULT_ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE>>,
1150 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
1166 class HASH = bsl::hash<KEY>,
1167 class EQUAL = bsl::equal_to<KEY>,
1168 class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE>>,
1169 class = bsl::enable_if_t<std::is_invocable_v<HASH, const KEY &>>,
1170 class = bsl::enable_if_t<
1171 std::is_invocable_v<EQUAL, const KEY &, const KEY &>>,
1172 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
1175 typename bsl::allocator_traits<ALLOCATOR>::size_type = 0,
1178 ALLOCATOR = ALLOCATOR())
1194 class DEFAULT_ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE>>,
1195 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
1198 std::initializer_list<bsl::pair<const KEY, VALUE>>,
1199 typename bsl::allocator_traits<DEFAULT_ALLOCATOR>::size_type,
1217 class = bsl::enable_if_t<std::is_invocable_v<HASH, const KEY &>>,
1218 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
1221 typename bsl::allocator_traits<ALLOCATOR>::size_type,
1237 class DEFAULT_ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE>>,
1238 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
1241 std::initializer_list<bsl::pair<const KEY, VALUE>>,
1242 typename bsl::allocator_traits<DEFAULT_ALLOCATOR>::size_type,
1255 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
1258 typename bsl::allocator_traits<ALLOCATOR>::size_type,
1275 class DEFAULT_ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE>>,
1276 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
1279 std::initializer_list<bsl::pair<const KEY, VALUE>>,
1280 typename bsl::allocator_traits<DEFAULT_ALLOCATOR>::size_type,
1294 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
1313 class DEFAULT_ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE>>,
1314 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
1329template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
1331 const unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>& lhs,
1332 const unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>& rhs);
1334#ifndef BSLS_COMPILERFEATURES_SUPPORT_THREE_WAY_COMPARISON
1335template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
1337 const unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>& lhs,
1338 const unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>& rhs);
1362template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
1363void
swap(unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>& a,
1364 unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>& b)
1376template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
1379: d_impl(HASH(), EQUAL(), 0, 1.0f, ALLOCATOR())
1383template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1387 const HASH& hashFunction,
1388 const EQUAL& keyEqual,
1389 const ALLOCATOR& basicAllocator)
1390: d_impl(hashFunction, keyEqual, initialNumBuckets, 1.0f, basicAllocator)
1394template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1396unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_multimap(
1397 size_type initialNumBuckets,
1398 const HASH& hashFunction,
1399 const ALLOCATOR& basicAllocator)
1400: d_impl(hashFunction, EQUAL(), initialNumBuckets, 1.0f, basicAllocator)
1404template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1406unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_multimap(
1407 size_type initialNumBuckets,
1408 const ALLOCATOR& basicAllocator)
1409: d_impl(HASH(), EQUAL(), initialNumBuckets, 1.0f, basicAllocator)
1413template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1415unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_multimap(
1416 const ALLOCATOR& basicAllocator)
1417: d_impl(basicAllocator)
1421template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1423unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_multimap(
1424 const unordered_multimap& original)
1425: d_impl(original.d_impl,
1426 AllocatorTraits::select_on_container_copy_construction(
1427 original.get_allocator()))
1431template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1433unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_multimap(
1434 BloombergLP::bslmf::MovableRef<unordered_multimap> original)
1435: d_impl(MoveUtil::move(MoveUtil::access(original).d_impl))
1439template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1441unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_multimap(
1442 const unordered_multimap& original,
1443 const typename type_identity<ALLOCATOR>::type& basicAllocator)
1444: d_impl(original.d_impl, basicAllocator)
1448template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1450unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_multimap(
1451 BloombergLP::bslmf::MovableRef<unordered_multimap> original,
1452 const typename type_identity<ALLOCATOR>::type& basicAllocator)
1453: d_impl(MoveUtil::move(MoveUtil::access(original).d_impl), basicAllocator)
1457template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1458template <
class INPUT_ITERATOR>
1460unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_multimap(
1461 INPUT_ITERATOR first,
1462 INPUT_ITERATOR last,
1463 size_type initialNumBuckets,
1464 const HASH& hashFunction,
1465 const EQUAL& keyEqual,
1466 const ALLOCATOR& basicAllocator)
1467: d_impl(hashFunction, keyEqual, initialNumBuckets, 1.0f, basicAllocator)
1469 this->insert(first, last);
1472template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1473template <
class INPUT_ITERATOR>
1475unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_multimap(
1476 INPUT_ITERATOR first,
1477 INPUT_ITERATOR last,
1478 size_type initialNumBuckets,
1479 const HASH& hashFunction,
1480 const ALLOCATOR& basicAllocator)
1481: d_impl(hashFunction, EQUAL(), initialNumBuckets, 1.0f, basicAllocator)
1483 this->insert(first, last);
1486template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1487template <
class INPUT_ITERATOR>
1489unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_multimap(
1490 INPUT_ITERATOR first,
1491 INPUT_ITERATOR last,
1492 size_type initialNumBuckets,
1493 const ALLOCATOR& basicAllocator)
1494: d_impl(HASH(), EQUAL(), initialNumBuckets, 1.0f, basicAllocator)
1496 this->insert(first, last);
1499template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1500template <
class INPUT_ITERATOR>
1502unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_multimap(
1503 INPUT_ITERATOR first,
1504 INPUT_ITERATOR last,
1505 const ALLOCATOR& basicAllocator)
1506: d_impl(HASH(), EQUAL(), 0, 1.0f, basicAllocator)
1508 this->insert(first, last);
1511#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
1512template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1513# ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
1514template <
class,
class,
class>
1517unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_multimap(
1518 std::initializer_list<value_type> values,
1519 size_type initialNumBuckets,
1520 const HASH& hashFunction,
1521 const EQUAL& keyEqual,
1522 const ALLOCATOR& basicAllocator)
1523: unordered_multimap(values.
begin(),
1532template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1533# ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
1534template <
class,
class>
1537unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_multimap(
1538 std::initializer_list<value_type> values,
1539 size_type initialNumBuckets,
1540 const HASH& hashFunction,
1541 const ALLOCATOR& basicAllocator)
1542: unordered_multimap(values.
begin(),
1551template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1552# ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
1556unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_multimap(
1557 std::initializer_list<value_type> values,
1558 size_type initialNumBuckets,
1559 const ALLOCATOR& basicAllocator)
1560: unordered_multimap(values.
begin(),
1569template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1570# ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
1574unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_multimap(
1575 std::initializer_list<value_type> values,
1576 const ALLOCATOR& basicAllocator)
1577: unordered_multimap(values.
begin(),
1587template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1588unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::~unordered_multimap()
1594template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1595unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>&
1596unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::operator=(
1597 const unordered_multimap& rhs)
1602 d_impl = rhs.d_impl;
1607template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1609unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>&
1610unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::operator=(
1611 BloombergLP::bslmf::MovableRef<unordered_multimap> rhs)
1613 AllocatorTraits::is_always_equal::value &&
1614 std::is_nothrow_move_assignable<HASH>::value &&
1615 std::is_nothrow_move_assignable<EQUAL>::value)
1620 unordered_multimap& lvalue = rhs;
1622 d_impl = MoveUtil::move(lvalue.d_impl);
1627#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
1628template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1630unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>&
1631unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::operator=(
1632 std::initializer_list<value_type> values)
1634 unordered_multimap tmp(values.begin(), values.end(), d_impl.allocator());
1636 d_impl.swap(tmp.d_impl);
1642#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
1645#ifndef BSLSTL_UNORDEREDMULTIMAP_VARIADIC_LIMIT
1646#define BSLSTL_UNORDEREDMULTIMAP_VARIADIC_LIMIT 2
1648#ifndef BSLSTL_UNORDEREDMULTIMAP_VARIADIC_LIMIT_B
1649#define BSLSTL_UNORDEREDMULTIMAP_VARIADIC_LIMIT_B BSLSTL_UNORDEREDMULTIMAP_VARIADIC_LIMIT
1651#if BSLSTL_UNORDEREDMULTIMAP_VARIADIC_LIMIT_B >= 0
1652template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1654typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
1655unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace(
1658 return iterator(d_impl.emplace(
1664#if BSLSTL_UNORDEREDMULTIMAP_VARIADIC_LIMIT_B >= 1
1665template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1666template <
class Args_1>
1668typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
1669unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace(
1672 return iterator(d_impl.emplace(
1678#if BSLSTL_UNORDEREDMULTIMAP_VARIADIC_LIMIT_B >= 2
1679template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1680template <
class Args_1,
1683typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
1684unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace(
1688 return iterator(d_impl.emplace(
1696#if BSLSTL_UNORDEREDMULTIMAP_VARIADIC_LIMIT_B >= 0
1697template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1699typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
1700unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace_hint(
1701 const_iterator hint)
1703 return iterator(d_impl.emplaceWithHint(hint.node()));
1707#if BSLSTL_UNORDEREDMULTIMAP_VARIADIC_LIMIT_B >= 1
1708template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1709template <
class Args_1>
1711typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
1712unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace_hint(
1713 const_iterator hint,
1716 return iterator(d_impl.emplaceWithHint(hint.node(),
1721#if BSLSTL_UNORDEREDMULTIMAP_VARIADIC_LIMIT_B >= 2
1722template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1723template <
class Args_1,
1726typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
1727unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace_hint(
1728 const_iterator hint,
1732 return iterator(d_impl.emplaceWithHint(hint.node(),
1741template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1742template <
class... Args>
1744typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
1745unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace(
1748 return iterator(d_impl.emplace(
1753template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1754template <
class... Args>
1756typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
1757unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace_hint(
1758 const_iterator hint,
1761 return iterator(d_impl.emplaceWithHint(hint.node(),
1767template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1769typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
1770unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::begin()
1773 return iterator(d_impl.elementListRoot());
1776template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1778typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
1779unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::end()
1785template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1787typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::local_iterator
1788unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::begin(size_type index)
1792 return local_iterator(&d_impl.bucketAtIndex(index));
1795template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1797typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::local_iterator
1798unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::end(size_type index)
1802 return local_iterator(0, &d_impl.bucketAtIndex(index));
1806template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1808void unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::clear()
1814template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1816bool unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::contains(
1817 const key_type& key)
const
1819 return find(key) !=
end();
1822template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1824typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
1825unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::find(
1826 const key_type& key)
1828 return iterator(d_impl.find(key));
1831template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1833 typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator,
1834 typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator>
1835unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::equal_range(
1836 const key_type& key)
1838 HashTableLink *first;
1839 HashTableLink *last;
1840 d_impl.findRange(&first, &last, key);
1844template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1846typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
1847unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::erase(
1848 const_iterator position)
1852 return iterator(d_impl.remove(position.node()));
1855template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1857typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
1858unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::erase(
1861 return erase(const_iterator(position));
1864template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1865typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::size_type
1866unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::erase(
1867 const key_type& key)
1873 typedef ::BloombergLP::bslalg::BidirectionalNode<value_type> BNode;
1875 if (HashTableLink *target = d_impl.find(key)) {
1876 target = d_impl.remove(target);
1877 size_type result = 1;
1879 this->key_eq()(key, ListConfiguration::extractKey(
1880 static_cast<BNode *
>(target)->value()))) {
1881 target = d_impl.remove(target);
1890template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1891typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
1892unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::erase(
1893 const_iterator first,
1894 const_iterator last)
1896#if defined BDE_BUILD_TARGET_SAFE_2
1897 if (first != last) {
1898 iterator it = this->
begin();
1899 const iterator
end = this->end();
1900 for (; it != first; ++it) {
1904 for (; it != last; ++it) {
1910 while (first != last) {
1911 first = this->
erase(first);
1914 return iterator(first.node());
1917template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1919typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
1920unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::insert(
1921 const value_type& value)
1923 return iterator(d_impl.insert(value));
1926template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1928typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
1929unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::insert(
1930 const_iterator hint,
1931 const value_type& value)
1933 return iterator(d_impl.insert(value, hint.node()));
1936template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1937template <
class INPUT_ITERATOR>
1938void unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::insert(
1939 INPUT_ITERATOR first,
1940 INPUT_ITERATOR last)
1942 difference_type maxInsertions =
1943 ::BloombergLP::bslstl::IteratorUtil::insertDistance(first, last);
1944 if (0 < maxInsertions) {
1945 this->reserve(this->
size() + maxInsertions);
1951 while (first != last) {
1952 d_impl.emplace(*first);
1957#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
1958template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1960void unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::insert(
1961 std::initializer_list<value_type> values)
1963 insert(values.begin(), values.end());
1967template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1969void unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::max_load_factor(
1970 float newLoadFactor)
1972 d_impl.setMaxLoadFactor(newLoadFactor);
1975template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1977void unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::rehash(
1978 size_type numBuckets)
1980 d_impl.rehashForNumBuckets(numBuckets);
1983template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1985void unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::reserve(
1986 size_type numElements)
1988 d_impl.reserveForNumElements(numElements);
1991template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
1993void unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::swap(
1994 unordered_multimap& other)
1996 AllocatorTraits::is_always_equal::value &&
1997 bsl::is_nothrow_swappable<HASH>::value &&
1998 bsl::is_nothrow_swappable<EQUAL>::value)
2000 d_impl.swap(other.d_impl);
2004template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2007unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::get_allocator() const
2010 return d_impl.allocator();
2013template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2014typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::const_iterator
2015unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::begin() const
2018 return const_iterator(d_impl.elementListRoot());
2021template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2023typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::const_iterator
2024unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::end() const
2027 return const_iterator();
2030template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2031typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::const_iterator
2032unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::cbegin() const
2035 return const_iterator(d_impl.elementListRoot());
2038template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2040typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::const_iterator
2041unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::cend() const
2044 return const_iterator();
2047template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2049typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::
2050 const_local_iterator
2051unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::begin(
2052 size_type index)
const
2056 return const_local_iterator(&d_impl.bucketAtIndex(index));
2059template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2062unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::const_local_iterator
2063unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::end(
2064 size_type index)
const
2068 return const_local_iterator(0, &d_impl.bucketAtIndex(index));
2071template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2074unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::const_local_iterator
2075unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::cbegin(
2076 size_type index)
const
2080 return const_local_iterator(&d_impl.bucketAtIndex(index));
2083template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2085typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::
2086 const_local_iterator
2087unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::cend(
2088 size_type index)
const
2092 return const_local_iterator(0, &d_impl.bucketAtIndex(index));
2095template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2097typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::size_type
2098unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::bucket(
2099 const key_type& key)
const
2101 return d_impl.bucketIndexForKey(key);
2104template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2106typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::size_type
2107unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::bucket_count() const
2110 return d_impl.numBuckets();
2113template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2115typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::size_type
2116unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::bucket_size(
2117 size_type index)
const
2121 return d_impl.countElementsInBucket(index);
2124template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2125typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>:: size_type
2126unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::count(
2127 const key_type& key)
const
2129 typedef ::BloombergLP::bslalg::BidirectionalNode<value_type> BNode;
2131 size_type result = 0;
2132 for (HashTableLink *cursor = d_impl.find(key);
2134 ++result, cursor = cursor->nextLink())
2136 BNode *cursorNode =
static_cast<BNode *
>(cursor);
2137 if (!this->key_eq()(key,
2138 ListConfiguration::extractKey(cursorNode->value()))) {
2146template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2148typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::const_iterator
2149unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::find(
2150 const key_type& key)
const
2152 return const_iterator(d_impl.find(key));
2156template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2158bool unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::empty() const
2161 return 0 == d_impl.size();
2164template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2166typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::size_type
2167unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::size() const
2170 return d_impl.size();
2173template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2175typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::size_type
2176unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::max_size() const
2179 return AllocatorTraits::max_size(get_allocator());
2182template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2184typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::hasher
2185unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::hash_function()
const
2187 return d_impl.hasher();
2190template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2192typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::key_equal
2193unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::key_eq()
const
2195 return d_impl.comparator();
2198template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2199bsl::pair<
typename unordered_multimap<KEY,
2203 ALLOCATOR>::const_iterator,
2204 typename unordered_multimap<KEY,
2208 ALLOCATOR>::const_iterator>
2209unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::equal_range(
2210 const key_type& key)
const
2212 HashTableLink *first;
2213 HashTableLink *last;
2214 d_impl.findRange(&first, &last, key);
2216 const_iterator(last));
2219template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2221typename unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::size_type
2222unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>:: max_bucket_count()
2226 return d_impl.maxNumBuckets();
2229template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2231float unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::load_factor()
2235 return d_impl.loadFactor();
2238template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2240float unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::max_load_factor()
2244 return d_impl.maxLoadFactor();
2250template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2256 return lhs.d_impl == rhs.d_impl;
2259#ifndef BSLS_COMPILERFEATURES_SUPPORT_THREE_WAY_COMPARISON
2260template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2266 return !(lhs == rhs);
2271template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2296template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2297struct HasStlIterators<
bsl::unordered_multimap<KEY,
2309template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2310struct UsesBslmaAllocator<
bsl::unordered_multimap<KEY,
2322template <
class KEY,
class MAPPED,
class HASH,
class EQUAL,
class ALLOCATOR>
2323struct IsBitwiseMoveable<
2324 bsl::unordered_multimap<KEY, MAPPED, HASH, EQUAL, ALLOCATOR> >
2325 : ::BloombergLP::bslmf::IsBitwiseMoveable<BloombergLP::bslstl::HashTable<
2326 ::BloombergLP::bslstl::
2327 UnorderedMapKeyConfiguration<KEY, bsl::pair<const KEY, MAPPED> >,
2337# error Not valid except when included from bslstl_unorderedmultimap.h
Definition bslma_bslallocator.h:580
Definition bslstl_pair.h:1210
Definition bslstl_unorderedmultimap.h:707
float max_load_factor() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmultimap.h:2736
friend bool operator==(const unordered_multimap< KEY2, VALUE2, HASH2, EQUAL2, ALLOCATOR2 > &, const unordered_multimap< KEY2, VALUE2, HASH2, EQUAL2, ALLOCATOR2 > &)
enable_if< BloombergLP::bslmf::IsTransparentPredicate< HASH, LOOKUP_KEY >::value &&BloombergLP::bslmf::IsTransparentPredicate< EQUAL, LOOKUP_KEY >::value, pair< iterator, iterator > >::type equal_range(const LOOKUP_KEY &key)
Definition bslstl_unorderedmultimap.h:1091
unordered_multimap()
Definition bslstl_unorderedmultimap.h:1974
bool empty() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmultimap.h:2654
const value_type & const_reference
Definition bslstl_unorderedmultimap.h:763
EQUAL key_eq() const
Definition bslstl_unorderedmultimap.h:2689
float load_factor() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmultimap.h:2727
KEY key_type
Definition bslstl_unorderedmultimap.h:755
ALLOCATOR allocator_type
Definition bslstl_unorderedmultimap.h:760
AllocatorTraits::const_pointer const_pointer
Definition bslstl_unorderedmultimap.h:768
iterator end() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmultimap.h:2275
size_type max_size() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmultimap.h:2672
void reserve(size_type numElements)
Definition bslstl_unorderedmultimap.h:2481
HASH hash_function() const
Definition bslstl_unorderedmultimap.h:2681
::BloombergLP::bslstl::HashTableIterator< value_type, difference_type > iterator
Definition bslstl_unorderedmultimap.h:771
enable_if< BloombergLP::bslmf::IsTransparentPredicate< HASH, LOOKUP_KEY >::value &&BloombergLP::bslmf::IsTransparentPredicate< EQUAL, LOOKUP_KEY >::value, iterator >::type find(const LOOKUP_KEY &key)
Definition bslstl_unorderedmultimap.h:1157
unordered_multimap &operator=(BloombergLP::bslmf::MovableRef< unordered_multimap > rhs) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(AllocatorTraits iterator begin() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmultimap.h:2266
size_type bucket(const key_type &key) const
Definition bslstl_unorderedmultimap.h:2594
value_type & reference
Definition bslstl_unorderedmultimap.h:762
HASH hasher
Definition bslstl_unorderedmultimap.h:758
const_iterator cbegin() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmultimap.h:2528
void swap(unordered_multimap &other) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(AllocatorTraits allocator_type get_allocator() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmultimap.h:1360
const_iterator cend() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmultimap.h:2537
enable_if< BloombergLP::bslmf::IsTransparentPredicate< HASH, LOOKUP_KEY >::value &&BloombergLP::bslmf::IsTransparentPredicate< EQUAL, LOOKUP_KEY >::value, size_type >::type count(const LOOKUP_KEY &key) const
Definition bslstl_unorderedmultimap.h:1451
::BloombergLP::bslstl::HashTableIterator< const value_type, difference_type > const_iterator
Definition bslstl_unorderedmultimap.h:774
EQUAL key_equal
Definition bslstl_unorderedmultimap.h:759
size_type max_bucket_count() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmultimap.h:2718
size_type bucket_count() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmultimap.h:2603
iterator insert(const value_type &value)
Definition bslstl_unorderedmultimap.h:2416
size_type size() const BSLS_KEYWORD_NOEXCEPT
Return the number of elements in this unordered multimap.
Definition bslstl_unorderedmultimap.h:2663
size_type erase(const key_type &key)
Definition bslstl_unorderedmultimap.h:2362
bool contains(const key_type &key) const
Definition bslstl_unorderedmultimap.h:2312
::BloombergLP::bslstl::HashTableBucketIterator< const value_type, difference_type > const_local_iterator
Definition bslstl_unorderedmultimap.h:780
AllocatorTraits::difference_type difference_type
Definition bslstl_unorderedmultimap.h:766
iterator emplace_hint(const_iterator hint, Args &&... args)
Definition bslstl_unorderedmultimap.h:2254
::BloombergLP::bslstl::HashTableBucketIterator< value_type, difference_type > local_iterator
Definition bslstl_unorderedmultimap.h:777
AllocatorTraits::pointer pointer
Definition bslstl_unorderedmultimap.h:767
bsl::pair< const KEY, VALUE > value_type
Definition bslstl_unorderedmultimap.h:757
AllocatorTraits::size_type size_type
Definition bslstl_unorderedmultimap.h:765
void rehash(size_type numBuckets)
Definition bslstl_unorderedmultimap.h:2473
iterator emplace(Args &&... args)
Definition bslstl_unorderedmultimap.h:2243
size_type bucket_size(size_type index) const
Definition bslstl_unorderedmultimap.h:2612
void clear() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmultimap.h:2304
VALUE mapped_type
Definition bslstl_unorderedmultimap.h:756
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1804
#define BSLS_ASSERT_SAFE(X)
Definition bsls_assert.h:1762
#define BSLS_COMPILERFEATURES_FORWARD_REF(T)
Definition bsls_compilerfeatures.h:2012
#define BSLS_COMPILERFEATURES_FORWARD(T, V)
Definition bsls_compilerfeatures.h:2018
#define BSLS_KEYWORD_NOEXCEPT
Definition bsls_keyword.h:632
#define BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(...)
Definition bsls_keyword.h:634
void swap(OptionValue &a, OptionValue &b)
bsl::size_t size(const TYPE &array)
Return the number of elements in the specified array.
Definition bdlb_printmethods.h:283
void swap(array< VALUE_TYPE, SIZE > &lhs, array< VALUE_TYPE, SIZE > &rhs)
deque< VALUE_TYPE, ALLOCATOR >::size_type erase(deque< VALUE_TYPE, ALLOCATOR > &deq, const BDE_OTHER_TYPE &value)
Definition bslstl_deque.h:4126
T::iterator begin(T &container)
Definition bslstl_iterator.h:1495
bool operator==(const memory_resource &a, const memory_resource &b)
T::iterator end(T &container)
Definition bslstl_iterator.h:1523
bool operator!=(const memory_resource &a, const memory_resource &b)
Definition bdlc_flathashmap.h:1805
Definition balxml_encoderoptions.h:68
Definition bdlbb_blob.h:576
Definition bdldfp_decimal.h:5188
Definition bslma_allocatortraits.h:1061
BloombergLP::bslma::AllocatorTraits_ConstPointerType< ALLOCATOR >::type const_pointer
Definition bslma_allocatortraits.h:1152
BloombergLP::bslma::AllocatorTraits_SizeType< ALLOCATOR >::type size_type
Definition bslma_allocatortraits.h:1165
BloombergLP::bslma::AllocatorTraits_PointerType< ALLOCATOR >::type pointer
Definition bslma_allocatortraits.h:1149
BloombergLP::bslma::AllocatorTraits_DifferenceType< ALLOCATOR >::type difference_type
Definition bslma_allocatortraits.h:1162
Definition bslstl_equalto.h:311
Definition bslstl_hash.h:498
Definition bslmf_isconvertible.h:867
t_TYPE type
Definition bslmf_typeidentity.h:216