8#ifndef INCLUDED_BSLSTL_UNORDEREDMAP
9#define INCLUDED_BSLSTL_UNORDEREDMAP
1002#include <bslscm_version.h>
1045#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
1046# include <initializer_list>
1049#ifdef BSLS_COMPILERFEATURES_SUPPORT_TRAITS_HEADER
1050#include <type_traits>
1051 #ifndef BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES
1052 #error Rvalue references curiously absent despite native 'type_traits'.
1056#if BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
1060# define COMPILING_BSLSTL_UNORDEREDMAP_H
1062# undef COMPILING_BSLSTL_UNORDEREDMAP_H
1105 typedef BloombergLP::bslstl::UnorderedMapKeyConfiguration<
const KEY,
1111 typedef BloombergLP::bslstl::HashTable<ListConfiguration,
1114 ALLOCATOR> HashTable;
1118 typedef BloombergLP::bslalg::BidirectionalLink HashTableLink;
1122 typedef typename HashTable::NodeType HashTableNode;
1126 typedef BloombergLP::bslmf::MovableRefUtil MoveUtil;
1129 template <
class KEY2,
1157 typedef BloombergLP::bslstl::HashTableIterator<
1159 typedef BloombergLP::bslstl::HashTableIterator<
1161 typedef BloombergLP::bslstl::HashTableBucketIterator<
1163 typedef BloombergLP::bslstl::HashTableBucketIterator<
1175 const HASH& hashFunction = HASH(),
1176 const EQUAL& keyEqual = EQUAL(),
1177 const ALLOCATOR& basicAllocator = ALLOCATOR());
1179 const HASH& hashFunction,
1180 const ALLOCATOR& basicAllocator);
1182 const ALLOCATOR& basicAllocator);
1243 template <
class INPUT_ITERATOR>
1245 INPUT_ITERATOR last,
1247 const HASH& hashFunction = HASH(),
1248 const EQUAL& keyEqual = EQUAL(),
1249 const ALLOCATOR& basicAllocator = ALLOCATOR());
1250 template <
class INPUT_ITERATOR>
1252 INPUT_ITERATOR last,
1254 const HASH& hashFunction,
1255 const ALLOCATOR& basicAllocator);
1256 template <
class INPUT_ITERATOR>
1258 INPUT_ITERATOR last,
1260 const ALLOCATOR& basicAllocator);
1261 template <
class INPUT_ITERATOR>
1263 INPUT_ITERATOR last,
1264 const ALLOCATOR& basicAllocator);
1266#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
1267# ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
1269 class = bsl::enable_if_t<std::is_invocable_v<HASH, const KEY &>>,
1270 class = bsl::enable_if_t<
1271 std::is_invocable_v<EQUAL, const KEY &, const KEY &>>,
1272 class = bsl::enable_if_t< bsl::IsStdAllocator_v<ALLOCATOR>>
1276 std::initializer_list<value_type> values,
1277 size_type initialNumBuckets = 0,
1278 const HASH& hashFunction = HASH(),
1279 const EQUAL& keyEqual = EQUAL(),
1280 const ALLOCATOR& basicAllocator = ALLOCATOR());
1281# ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
1283 class = bsl::enable_if_t<std::is_invocable_v<HASH, const KEY &>>,
1284 class = bsl::enable_if_t< bsl::IsStdAllocator_v<ALLOCATOR>>
1288 size_type initialNumBuckets,
1289 const HASH& hashFunction,
1290 const ALLOCATOR& basicAllocator);
1291# ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
1293 class = bsl::enable_if_t< bsl::IsStdAllocator_v<ALLOCATOR>>
1297 size_type initialNumBuckets,
1298 const ALLOCATOR& basicAllocator);
1299# ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
1328 class = bsl::enable_if_t< bsl::IsStdAllocator_v<ALLOCATOR>>
1332 const ALLOCATOR& basicAllocator);
1350 const unordered_map& original,
1351 const typename type_identity<ALLOCATOR>::type& basicAllocator);
1362 BloombergLP::bslmf::MovableRef<unordered_map> original);
1373 BloombergLP::bslmf::MovableRef<unordered_map> original,
1374 const typename type_identity<ALLOCATOR>::type& basicAllocator);
1405 operator=(BloombergLP::bslmf::MovableRef<unordered_map> rhs)
1407 AllocatorTraits::is_always_equal::value &&
1408 std::is_nothrow_move_assignable<HASH>::value &&
1409 std::is_nothrow_move_assignable<EQUAL>::value);
1411#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
1416 unordered_map& operator=(std::initializer_list<value_type> rhs);
1438 BloombergLP::bslmf::MovableRef<key_type> key);
1477#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
1492 template <class... Args>
1511 template <class... Args>
1554 template <class LOOKUP_KEY>
1556 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
1557 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
1586#if defined(BSLS_PLATFORM_CMP_SUN) && BSLS_PLATFORM_CMP_VERSION < 0x5130
1587 template <
class ALT_VALUE_TYPE>
1589#elif !defined(BSLS_COMPILERFEATURES_SUPPORT_TRAITS_HEADER)
1590 template <
class ALT_VALUE_TYPE>
1609 template <
class ALT_VALUE_TYPE>
1611 ALT_VALUE_TYPE&&>::value,
1621 bool isInsertedFlag =
false;
1623 HashTableLink *result = d_impl.insertIfMissing(
1627 return ResultType(
iterator(result), isInsertedFlag);
1647#if defined(BSLS_PLATFORM_CMP_SUN) && BSLS_PLATFORM_CMP_VERSION < 0x5130
1648 template <
class ALT_VALUE_TYPE>
1650#elif !defined(BSLS_COMPILERFEATURES_SUPPORT_TRAITS_HEADER)
1651 template <
class ALT_VALUE_TYPE>
1672 template <
class ALT_VALUE_TYPE>
1674 ALT_VALUE_TYPE&&>::value,
1693 bool isInsertedFlag;
1695 HashTableLink *result = d_impl.insertIfMissing(
1714 template <
class INPUT_ITERATOR>
1715 void insert(INPUT_ITERATOR first, INPUT_ITERATOR last);
1717#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
1723 void insert(std::initializer_list<value_type> values);
1726#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
1735 template <
class BDE_OTHER_TYPE>
1737 BDE_OTHER_TYPE&& obj);
1747 template <
class BDE_OTHER_TYPE>
1749 BloombergLP::bslmf::MovableRef<KEY> key,
1750 BDE_OTHER_TYPE&& obj);
1762 template <
class BDE_OTHER_TYPE>
1765 BDE_OTHER_TYPE&& obj);
1776 template <
class BDE_OTHER_TYPE>
1778 BloombergLP::bslmf::MovableRef<KEY> key,
1779 BDE_OTHER_TYPE&& obj);
1795 template <
class LOOKUP_KEY>
1797 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
1798 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
1804 HashTableLink *first = d_impl.find(key);
1860 AllocatorTraits::is_always_equal::value &&
1861 bsl::is_nothrow_swappable<HASH>::value &&
1862 bsl::is_nothrow_swappable<EQUAL>::value);
1864#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
1874 template <
class... Args>
1886 template <
class... Args>
1888 BloombergLP::bslmf::MovableRef<KEY> key,
1903 template<
class LOOKUP_KEY,
class... Args>
1905 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
1906 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value
1913 bool isInsertedFlag =
false;
1914 HashTableLink *result = d_impl.tryEmplace(
1920 return ResultType(
iterator(result), isInsertedFlag);
1933 template<
class... Args>
1947 template <
class... Args>
1949 BloombergLP::bslmf::MovableRef<KEY> key,
1964 template<
class LOOKUP_KEY,
class... Args>
1966 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
1967 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
1971 bool isInsertedFlag =
false;
1972 HashTableLink *result = d_impl.tryEmplace(
2054 template <class LOOKUP_KEY>
2056 BloombergLP::
bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
2057 && BloombergLP::
bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
2059 count(const LOOKUP_KEY& key)
const
2061 return d_impl.find(key) != 0;
2078 template <
class LOOKUP_KEY>
2080 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value &&
2081 BloombergLP::bslmf::IsTransparentPredicate<EQUAL,
2105 template <class LOOKUP_KEY>
2107 BloombergLP::
bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
2108 && BloombergLP::
bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
2110 equal_range(const LOOKUP_KEY& key)
const
2114 HashTableLink *first = d_impl.find(key);
2138 template <
class LOOKUP_KEY>
2140 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
2141 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
2193#ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
2205 class INPUT_ITERATOR,
2206 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
2208 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
2212 class = bsl::enable_if_t<
std::is_invocable_v<HASH, const KEY &>>,
2213 class = bsl::enable_if_t<
2214 std::is_invocable_v<EQUAL, const KEY &, const KEY &>>,
2215 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
2219 typename bsl::allocator_traits<ALLOCATOR>::size_type = 0,
2222 ALLOCATOR = ALLOCATOR())
2232 class INPUT_ITERATOR,
2236 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
2238 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
2239 class DEFAULT_ALLOCATOR = bsl::allocator<pair<const KEY, VALUE>>,
2240 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
2244 typename bsl::allocator_traits<DEFAULT_ALLOCATOR>::size_type,
2258 class INPUT_ITERATOR,
2261 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
2263 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
2264 class = bsl::enable_if_t<std::is_invocable_v<HASH, const KEY &>>,
2265 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
2269 typename bsl::allocator_traits<ALLOCATOR>::size_type,
2272->
unordered_map<KEY, VALUE, HASH, bsl::equal_to<KEY>, ALLOCATOR>;
2281 class INPUT_ITERATOR,
2284 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
2286 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
2287 class DEFAULT_ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE>>,
2288 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
2292 typename bsl::allocator_traits<DEFAULT_ALLOCATOR>::size_type,
2304 class INPUT_ITERATOR,
2306 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
2308 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
2309 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
2313 typename bsl::allocator_traits<ALLOCATOR>::size_type,
2315->
unordered_map<KEY, VALUE, bsl::hash<KEY>, bsl::equal_to<KEY>, ALLOCATOR>;
2322 class INPUT_ITERATOR,
2324 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
2326 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
2327 class DEFAULT_ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE>>,
2328 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
2332 typename bsl::allocator_traits<DEFAULT_ALLOCATOR>::size_type,
2343 class INPUT_ITERATOR,
2345 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
2347 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
2348 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
2351->
unordered_map<KEY, VALUE, bsl::hash<KEY>, bsl::equal_to<KEY>, ALLOCATOR>;
2358 class INPUT_ITERATOR,
2360 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
2362 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
2363 class DEFAULT_ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE>>,
2364 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
2380 class HASH = bsl::hash<KEY>,
2381 class EQUAL = bsl::equal_to<KEY>,
2382 class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE>>,
2383 class = bsl::enable_if_t<std::is_invocable_v<HASH, const KEY &>>,
2384 class = bsl::enable_if_t<
2385 std::is_invocable_v<EQUAL, const KEY &, const KEY &>>,
2386 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
2388unordered_map(std::initializer_list<bsl::pair<const KEY, VALUE>>,
2389 typename bsl::allocator_traits<ALLOCATOR>::size_type = 0,
2392 ALLOCATOR = ALLOCATOR())
2407 class DEFAULT_ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE>>,
2408 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
2410unordered_map(std::initializer_list<bsl::pair<const KEY, VALUE>>,
2411 typename bsl::allocator_traits<DEFAULT_ALLOCATOR>::size_type,
2429 class = bsl::enable_if_t<std::is_invocable_v<HASH, const KEY &>>,
2430 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
2432unordered_map(std::initializer_list<bsl::pair<const KEY, VALUE>>,
2433 typename bsl::allocator_traits<ALLOCATOR>::size_type,
2436->
unordered_map<KEY, VALUE, HASH, bsl::equal_to<KEY>, ALLOCATOR>;
2449 class DEFAULT_ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE>>,
2450 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
2452unordered_map(std::initializer_list<bsl::pair<const KEY, VALUE>>,
2453 typename bsl::allocator_traits<DEFAULT_ALLOCATOR>::size_type,
2466 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
2468unordered_map(std::initializer_list<bsl::pair<const KEY, VALUE>>,
2469 typename bsl::allocator_traits<ALLOCATOR>::size_type,
2471->
unordered_map<KEY, VALUE, bsl::hash<KEY>, bsl::equal_to<KEY>, ALLOCATOR>;
2481 class DEFAULT_ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE>>,
2482 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
2484unordered_map(std::initializer_list<bsl::pair<const KEY, VALUE>>,
2485 typename bsl::allocator_traits<DEFAULT_ALLOCATOR>::size_type,
2499 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
2501unordered_map(std::initializer_list<bsl::pair<const KEY, VALUE>>, ALLOCATOR)
2502->
unordered_map<KEY, VALUE, bsl::hash<KEY>, bsl::equal_to<KEY>, ALLOCATOR>;
2512 class DEFAULT_ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE>>,
2513 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
2515unordered_map(std::initializer_list<bsl::pair<const KEY, VALUE>>, ALLOC *)
2529template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
2530bool operator==(const unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>& lhs,
2531 const unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>& rhs);
2533#ifndef BSLS_COMPILERFEATURES_SUPPORT_THREE_WAY_COMPARISON
2534template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
2535bool operator!=(const unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>& lhs,
2536 const unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>& rhs);
2559erase_if(unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>& m,
2560 PREDICATE predicate);
2574template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
2575void swap(unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>& a,
2576 unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>& b)
2591template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2595 const HASH& hashFunction,
2596 const EQUAL& keyEqual,
2597 const ALLOCATOR& basicAllocator)
2598: d_impl(hashFunction, keyEqual, initialNumBuckets, 1.0f, basicAllocator)
2602template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2606 const HASH& hashFunction,
2607 const ALLOCATOR& basicAllocator)
2608: d_impl(hashFunction, EQUAL(), initialNumBuckets, 1.0f, basicAllocator)
2612template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2616 const ALLOCATOR& basicAllocator)
2617: d_impl(HASH(), EQUAL(), initialNumBuckets, 1.0f, basicAllocator)
2621template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2624 const ALLOCATOR& basicAllocator)
2625: d_impl(basicAllocator)
2629template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2636template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2637template <
class INPUT_ITERATOR>
2640 INPUT_ITERATOR first,
2641 INPUT_ITERATOR last,
2643 const HASH& hashFunction,
2644 const EQUAL& keyEqual,
2645 const ALLOCATOR& basicAllocator)
2646: d_impl(hashFunction, keyEqual, initialNumBuckets, 1.0f, basicAllocator)
2648 this->
insert(first, last);
2651template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2652template <
class INPUT_ITERATOR>
2655 INPUT_ITERATOR first,
2656 INPUT_ITERATOR last,
2658 const HASH& hashFunction,
2659 const ALLOCATOR& basicAllocator)
2660: d_impl(hashFunction, EQUAL(), initialNumBuckets, 1.0f, basicAllocator)
2662 this->
insert(first, last);
2665template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2666template <
class INPUT_ITERATOR>
2669 INPUT_ITERATOR first,
2670 INPUT_ITERATOR last,
2672 const ALLOCATOR& basicAllocator)
2673: d_impl(HASH(), EQUAL(), initialNumBuckets, 1.0f, basicAllocator)
2675 this->
insert(first, last);
2678template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2679template <
class INPUT_ITERATOR>
2682 INPUT_ITERATOR first,
2683 INPUT_ITERATOR last,
2684 const ALLOCATOR& basicAllocator)
2685: d_impl(basicAllocator)
2687 this->
insert(first, last);
2690#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
2691template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2692# ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
2693template <
class,
class,
class>
2697 std::initializer_list<value_type> values,
2698 size_type initialNumBuckets,
2699 const HASH& hashFunction,
2700 const EQUAL& keyEqual,
2701 const ALLOCATOR& basicAllocator)
2702: d_impl(hashFunction, keyEqual, initialNumBuckets, 1.0f, basicAllocator)
2704 insert(values.begin(), values.end());
2707template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2708# ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
2709template <
class,
class>
2713 std::initializer_list<value_type> values,
2714 size_type initialNumBuckets,
2715 const HASH& hashFunction,
2716 const ALLOCATOR& basicAllocator)
2717: d_impl(hashFunction, EQUAL(), initialNumBuckets, 1.0f, basicAllocator)
2719 insert(values.begin(), values.end());
2722template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2723# ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
2728 std::initializer_list<value_type> values,
2729 size_type initialNumBuckets,
2730 const ALLOCATOR& basicAllocator)
2731: d_impl(HASH(), EQUAL(), initialNumBuckets, 1.0f, basicAllocator)
2733 insert(values.begin(), values.end());
2736template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2737# ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
2742 std::initializer_list<value_type> values,
2743 const ALLOCATOR& basicAllocator)
2744: d_impl(basicAllocator)
2746 insert(values.begin(), values.end());
2750template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2754: d_impl(original.d_impl,
2756 original.get_allocator()))
2760template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2765: d_impl(original.d_impl, basicAllocator)
2769template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2772 BloombergLP::bslmf::MovableRef<unordered_map> original)
2773: d_impl(MoveUtil::access(original).get_allocator())
2780template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2783 BloombergLP::bslmf::MovableRef<unordered_map> original,
2785: d_impl(MoveUtil::move(MoveUtil::access(original).d_impl), basicAllocator)
2789template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2797template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2806 d_impl = rhs.d_impl;
2811template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2815 BloombergLP::bslmf::MovableRef<unordered_map> rhs)
2817 AllocatorTraits::is_always_equal::value &&
2818 std::is_nothrow_move_assignable<HASH>::value &&
2819 std::is_nothrow_move_assignable<EQUAL>::value)
2826 d_impl = MoveUtil::move(lvalue.d_impl);
2831#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
2832template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2834unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>&
2836 std::initializer_list<value_type> rhs)
2838 unordered_map tmp(rhs.begin(), rhs.end(), d_impl.allocator());
2846template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2852 HashTableLink *node = d_impl.insertIfMissing(key);
2853 return static_cast<HashTableNode *
>(node)->value().second;
2856template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2860 BloombergLP::bslmf::MovableRef<key_type> key)
2862 HashTableLink *node = d_impl.insertIfMissing(
2863 MoveUtil::move(MoveUtil::access(key)));
2864 return static_cast<HashTableNode *
>(node)->value().second;
2867template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2872 HashTableLink *node = d_impl.
find(key);
2875 BloombergLP::bslstl::StdExceptUtil::throwOutOfRange(
2876 "unordered_map<...>::at(key_type): invalid key value");
2879 return static_cast<HashTableNode *
>(node)->value().second;
2882template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2888 return iterator(d_impl.elementListRoot());
2891template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2899template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2909template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2919template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2928#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
2929template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2930template <
class... Args>
2938 bool isInsertedFlag =
false;
2940 HashTableLink *result = d_impl.emplaceIfMissing(
2944 return ResultType(
iterator(result), isInsertedFlag);
2947template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2948template <
class... Args>
2961 bool isInsertedFlag =
false;
2963 HashTableLink *result = d_impl.emplaceIfMissing(
2971template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2979 return iterator(d_impl.remove(position.node()));
2982template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2990template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
2994 HashTableLink *target = d_impl.find(key);
2996 d_impl.remove(target);
3004template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3010#if defined BDE_BUILD_TARGET_SAFE_2
3011 if (first != last) {
3013 const iterator
end = this->
end();
3014 for (; it != first; ++it) {
3018 for (; it != last; ++it) {
3024 while (first != last) {
3025 first = this->
erase(first);
3031template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3036 return find(key) !=
end();
3039template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3047template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3056 bool isInsertedFlag =
false;
3058 HashTableLink *result = d_impl.insertIfMissing(&isInsertedFlag, value);
3060 return ResultType(
iterator(result), isInsertedFlag);
3063template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3070 bool isInsertedFlag;
3072 HashTableLink *result = d_impl.insertIfMissing(&isInsertedFlag, value);
3077template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3078template <
class INPUT_ITERATOR>
3080 INPUT_ITERATOR first,
3081 INPUT_ITERATOR last)
3084 ::BloombergLP::bslstl::IteratorUtil::insertDistance(first, last);
3085 if (0 < maxInsertions) {
3086 this->reserve(this->
size() + maxInsertions);
3092 bool isInsertedFlag;
3093 while (first != last) {
3094 d_impl.emplaceIfMissing(&isInsertedFlag, *first);
3099#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
3100template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3102 std::initializer_list<value_type> values)
3104 insert(values.begin(), values.end());
3108#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
3109template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3110template <
class BDE_OTHER_TYPE>
3115 BDE_OTHER_TYPE&& obj)
3118 bool isInsertedFlag =
false;
3119 HashTableLink *result = d_impl.insertOrAssign(
3124 return ResultType(
iterator(result), isInsertedFlag);
3127template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3128template <
class BDE_OTHER_TYPE>
3132 BloombergLP::bslmf::MovableRef<KEY> key,
3133 BDE_OTHER_TYPE&& obj)
3136 bool isInsertedFlag =
false;
3137 HashTableLink *result = d_impl.insertOrAssign(
3142 return ResultType(
iterator(result), isInsertedFlag);
3145template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3146template <
class BDE_OTHER_TYPE>
3151 BDE_OTHER_TYPE&& obj)
3153 bool isInsertedFlag =
false;
3154 HashTableLink *result = d_impl.insertOrAssign(
3162template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3163template <
class BDE_OTHER_TYPE>
3167 BloombergLP::bslmf::MovableRef<KEY> key,
3168 BDE_OTHER_TYPE&& obj)
3170 bool isInsertedFlag =
false;
3171 HashTableLink *result = d_impl.insertOrAssign(
3180template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3189 HashTableLink *first = d_impl.find(key);
3194template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3198 float newMaxLoadFactor)
3200 d_impl.setMaxLoadFactor(newMaxLoadFactor);
3203template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3209 d_impl.rehashForNumBuckets(numBuckets);
3212template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3218 d_impl.reserveForNumElements(numElements);
3221template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3226 AllocatorTraits::is_always_equal::value &&
3227 bsl::is_nothrow_swappable<HASH>::value &&
3228 bsl::is_nothrow_swappable<EQUAL>::value)
3230 d_impl.swap(other.d_impl);
3233#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
3234template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3235template <
class... Args>
3245 bool isInsertedFlag =
false;
3246 HashTableLink *result = d_impl.tryEmplace(
3252 return ResultType(
iterator(result), isInsertedFlag);
3255template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3256template <
class... Args>
3262 BloombergLP::bslmf::MovableRef<KEY> key,
3266 bool isInsertedFlag =
false;
3267 HashTableLink *result = d_impl.tryEmplace(
3273 return ResultType(
iterator(result), isInsertedFlag);
3276template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3277template <
class... Args>
3285 bool isInsertedFlag =
false;
3286 HashTableLink *result = d_impl.tryEmplace(
3295template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3296template <
class... Args>
3301 BloombergLP::bslmf::MovableRef<KEY> key,
3304 bool isInsertedFlag =
false;
3305 HashTableLink *result = d_impl.tryEmplace(
3316template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3321 HashTableLink *target = d_impl.find(key);
3323 BloombergLP::bslstl::StdExceptUtil::throwOutOfRange(
3324 "unordered_map<...>::at(key_type): invalid key value");
3326 return static_cast<HashTableNode *
>(target)->value().second;
3329template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3338template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3347template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3356template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3365template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3376template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3388template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3400template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3411template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3417 return d_impl.bucketIndexForKey(key);
3420template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3426 return d_impl.numBuckets();
3429template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3435 return d_impl.maxNumBuckets();
3438template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3446 return d_impl.countElementsInBucket(index);
3449template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3455 return d_impl.find(key) != 0;
3458template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3464 return 0 == d_impl.size();
3467template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3472 ALLOCATOR>::const_iterator,
3477 ALLOCATOR>::const_iterator>
3483 HashTableLink *first = d_impl.find(key);
3489template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3499template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3505 return d_impl.allocator();
3508template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3512 return d_impl.hasher();
3515template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3519 return d_impl.comparator();
3522template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3528 return d_impl.loadFactor();
3531template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3537 return d_impl.maxLoadFactor();
3541template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3547 return d_impl.size();
3550template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3556 return d_impl.maxSize();
3562template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3564bool bsl::operator==(
3568 return lhs.d_impl == rhs.d_impl;
3571#ifndef BSLS_COMPILERFEATURES_SUPPORT_THREE_WAY_COMPARISON
3572template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3578 return !(lhs == rhs);
3591bsl::erase_if(unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>& m,
3592 PREDICATE predicate)
3594 return BloombergLP::bslstl::AlgorithmUtil::containerEraseIf(m, predicate);
3597template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3622template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3631template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3644template <
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR>
3646 bsl::unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR> >
3647 : ::BloombergLP::bslmf::IsBitwiseMoveable<BloombergLP::bslstl::HashTable<
3648 ::BloombergLP::bslstl::
3649 UnorderedMapKeyConfiguration<KEY, bsl::pair<const KEY, VALUE> >,
Definition bslma_bslallocator.h:580
Definition bslstl_string.h:1281
Definition bslstl_pair.h:1210
Definition bslstl_unorderedmap.h:1089
unordered_map &operator=(BloombergLP::bslmf::MovableRef< unordered_map > rhs) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(AllocatorTraits add_lvalue_reference< VALUE >::type operator[](const key_type &key)
Definition bslstl_unorderedmap.h:2849
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_unorderedmap.h:1559
const_iterator cbegin() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmap.h:3350
pair< iterator, bool > insert_or_assign(const KEY &key, BDE_OTHER_TYPE &&obj)
bsl::enable_if< BloombergLP::bslmf::IsTransparentPredicate< HASH, LOOKUP_KEY >::value &&BloombergLP::bslmf::IsTransparentPredicate< EQUAL, LOOKUP_KEY >::value, iterator >::type try_emplace(const_iterator hint, LOOKUP_KEY &&key, Args &&... args)
Definition bslstl_unorderedmap.h:1969
size_type size() const BSLS_KEYWORD_NOEXCEPT
Return the number of elements in this unordered map.
Definition bslstl_unorderedmap.h:3544
unordered_map(INPUT_ITERATOR first, INPUT_ITERATOR last, size_type initialNumBuckets, const ALLOCATOR &basicAllocator)
Definition bslstl_unorderedmap.h:2668
~unordered_map()
Destroy this object and each of its elements.
Definition bslstl_unorderedmap.h:2791
iterator insert_or_assign(const_iterator hint, BloombergLP::bslmf::MovableRef< KEY > key, BDE_OTHER_TYPE &&obj)
Definition bslstl_unorderedmap.h:3165
enable_if< is_convertible< ALT_VALUE_TYPE, value_type >::value, iterator >::type insert(const_iterator hint, BSLS_COMPILERFEATURES_FORWARD_REF(ALT_VALUE_TYPE) value)
Definition bslstl_unorderedmap.h:1677
void insert(INPUT_ITERATOR first, INPUT_ITERATOR last)
Definition bslstl_unorderedmap.h:3079
AllocatorTraits::size_type size_type
Definition bslstl_unorderedmap.h:1152
float load_factor() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmap.h:3525
friend bool operator==(const unordered_map< KEY2, VALUE2, HASH2, EQUAL2, ALLOCATOR2 > &, const unordered_map< KEY2, VALUE2, HASH2, EQUAL2, ALLOCATOR2 > &)
pair< iterator, bool > try_emplace(BloombergLP::bslmf::MovableRef< KEY > key, Args &&... args)
iterator end() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmap.h:2894
unordered_map(size_type initialNumBuckets, const HASH &hashFunction=HASH(), const EQUAL &keyEqual=EQUAL(), const ALLOCATOR &basicAllocator=ALLOCATOR())
Definition bslstl_unorderedmap.h:2594
AllocatorTraits::pointer pointer
Definition bslstl_unorderedmap.h:1154
value_type & reference
Definition bslstl_unorderedmap.h:1149
const_iterator begin() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmap.h:3332
EQUAL key_equal
Definition bslstl_unorderedmap.h:1146
pair< iterator, iterator > equal_range(const key_type &key)
Definition bslstl_unorderedmap.h:3184
AllocatorTraits::const_pointer const_pointer
Definition bslstl_unorderedmap.h:1155
void max_load_factor(float newMaxLoadFactor)
Definition bslstl_unorderedmap.h:3197
pair< const_iterator, const_iterator > equal_range(const key_type &key) const
Definition bslstl_unorderedmap.h:3478
ALLOCATOR allocator_type
Definition bslstl_unorderedmap.h:1147
unordered_map(const ALLOCATOR &basicAllocator)
Definition bslstl_unorderedmap.h:2623
iterator emplace_hint(const_iterator hint, Args &&... args)
Definition bslstl_unorderedmap.h:2950
unordered_map(INPUT_ITERATOR first, INPUT_ITERATOR last, size_type initialNumBuckets, const HASH &hashFunction, const ALLOCATOR &basicAllocator)
Definition bslstl_unorderedmap.h:2654
size_type bucket(const key_type &key) const
Definition bslstl_unorderedmap.h:3414
unordered_map(size_type initialNumBuckets, const ALLOCATOR &basicAllocator)
Definition bslstl_unorderedmap.h:2614
void rehash(size_type numBuckets)
Definition bslstl_unorderedmap.h:3206
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_unorderedmap.h:1800
iterator find(const key_type &key)
Definition bslstl_unorderedmap.h:3042
HASH hash_function() const
Definition bslstl_unorderedmap.h:3510
enable_if< is_convertible< ALT_VALUE_TYPE, value_type >::value, pair< iterator, bool > >::type insert(BSLS_COMPILERFEATURES_FORWARD_REF(ALT_VALUE_TYPE) value)
Definition bslstl_unorderedmap.h:1614
iterator insert_or_assign(const_iterator hint, const KEY &key, BDE_OTHER_TYPE &&obj)
Definition bslstl_unorderedmap.h:3148
enable_if< BloombergLP::bslmf::IsTransparentPredicate< HASH, LOOKUP_KEY >::value &&BloombergLP::bslmf::IsTransparentPredicate< EQUAL, LOOKUP_KEY >::value, bool >::type contains(const LOOKUP_KEY &key) const
Definition bslstl_unorderedmap.h:2084
allocator_type get_allocator() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmap.h:3502
pair< iterator, bool > insert_or_assign(BloombergLP::bslmf::MovableRef< KEY > key, BDE_OTHER_TYPE &&obj)
HASH hasher
Definition bslstl_unorderedmap.h:1145
size_type count(const key_type &key) const
Definition bslstl_unorderedmap.h:3452
BloombergLP::bslstl::HashTableBucketIterator< value_type, difference_type > local_iterator
Definition bslstl_unorderedmap.h:1162
void reserve(size_type numElements)
Definition bslstl_unorderedmap.h:3215
iterator try_emplace(const_iterator hint, const KEY &key, Args &&... args)
unordered_map(size_type initialNumBuckets, const HASH &hashFunction, const ALLOCATOR &basicAllocator)
Definition bslstl_unorderedmap.h:2604
pair< iterator, bool > insert(const value_type &value)
Definition bslstl_unorderedmap.h:3051
iterator erase(const_iterator position)
Definition bslstl_unorderedmap.h:2974
EQUAL key_eq() const
Definition bslstl_unorderedmap.h:3517
pair< iterator, bool > emplace(Args &&... args)
const value_type & const_reference
Definition bslstl_unorderedmap.h:1150
const_iterator find(const key_type &key) const
Definition bslstl_unorderedmap.h:3493
unordered_map(INPUT_ITERATOR first, INPUT_ITERATOR last, size_type initialNumBuckets=0, const HASH &hashFunction=HASH(), const EQUAL &keyEqual=EQUAL(), const ALLOCATOR &basicAllocator=ALLOCATOR())
Definition bslstl_unorderedmap.h:2639
size_type max_size() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmap.h:3553
BloombergLP::bslstl::HashTableBucketIterator< const value_type, difference_type > const_local_iterator
Definition bslstl_unorderedmap.h:1164
const_iterator cend() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmap.h:3359
void clear() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmap.h:2922
unordered_map()
Definition bslstl_unorderedmap.h:2631
float max_load_factor() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmap.h:3534
unordered_map & operator=(const unordered_map &rhs)
Definition bslstl_unorderedmap.h:2800
BloombergLP::bslstl::HashTableIterator< value_type, difference_type > iterator
Definition bslstl_unorderedmap.h:1158
AllocatorTraits::difference_type difference_type
Definition bslstl_unorderedmap.h:1153
bsl::pair< const KEY, VALUE > value_type
Definition bslstl_unorderedmap.h:1144
size_type max_bucket_count() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmap.h:3432
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_unorderedmap.h:2059
iterator insert(const_iterator hint, const value_type &value)
Definition bslstl_unorderedmap.h:3066
bsl::enable_if< BloombergLP::bslmf::IsTransparentPredicate< HASH, LOOKUP_KEY >::value &&BloombergLP::bslmf::IsTransparentPredicate< EQUAL, LOOKUP_KEY >::value &&!bsl::is_convertible< LOOKUP_KEY &&, const_iterator >::value &&!bsl::is_convertible< LOOKUP_KEY &&, iterator >::value, pair< iterator, bool > >::type try_emplace(LOOKUP_KEY &&key, Args &&... args)
Definition bslstl_unorderedmap.h:1910
KEY key_type
Definition bslstl_unorderedmap.h:1142
add_lvalue_reference< VALUE >::type at(const key_type &key)
Definition bslstl_unorderedmap.h:2870
unordered_map(INPUT_ITERATOR first, INPUT_ITERATOR last, const ALLOCATOR &basicAllocator)
Definition bslstl_unorderedmap.h:2681
VALUE mapped_type
Definition bslstl_unorderedmap.h:1143
size_type bucket_count() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmap.h:3423
void swap(unordered_map &other) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(AllocatorTraits pair< iterator, bool > try_emplace(const KEY &key, Args &&... args)
Definition bslstl_unorderedmap.h:1875
enable_if< BloombergLP::bslmf::IsTransparentPredicate< HASH, LOOKUP_KEY >::value &&BloombergLP::bslmf::IsTransparentPredicate< EQUAL, LOOKUP_KEY >::value, const_iterator >::type find(const LOOKUP_KEY &key) const
Definition bslstl_unorderedmap.h:2143
bool contains(const key_type &key) const
Definition bslstl_unorderedmap.h:3033
add_lvalue_reference< constVALUE >::type at(const key_type &key) const
Definition bslstl_unorderedmap.h:3318
iterator try_emplace(const_iterator hint, BloombergLP::bslmf::MovableRef< KEY > key, Args &&... args)
iterator begin() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmap.h:2885
BloombergLP::bslstl::HashTableIterator< const value_type, difference_type > const_iterator
Definition bslstl_unorderedmap.h:1160
bool empty() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmap.h:3461
size_type bucket_size(size_type index) const
Definition bslstl_unorderedmap.h:3441
#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_IDENT(str)
Definition bsls_ident.h:195
#define BSLS_KEYWORD_NOEXCEPT
Definition bsls_keyword.h:632
#define BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(...)
Definition bsls_keyword.h:634
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
BSLS_KEYWORD_CONSTEXPR size_t size(const TYPE(&)[DIMENSION]) BSLS_KEYWORD_NOEXCEPT
Return the dimension of the specified array argument.
Definition bslstl_iterator.h:1331
T::iterator end(T &container)
Definition bslstl_iterator.h:1523
deque< VALUE_TYPE, ALLOCATOR >::size_type erase_if(deque< VALUE_TYPE, ALLOCATOR > &deq, PREDICATE predicate)
Definition bslstl_deque.h:4135
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 bslmf_addlvaluereference.h:126
t_TYPE & type
This typedef defines the return type of this meta function.
Definition bslmf_addlvaluereference.h:129
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 bslmf_enableif.h:525
Definition bslstl_equalto.h:311
Definition bslstl_hash.h:498
Definition bslmf_isconvertible.h:867
t_TYPE type
Definition bslmf_typeidentity.h:216
Definition bslalg_hasstliterators.h:99
Definition bslma_usesbslmaallocator.h:343
Definition bslmf_isbitwisemoveable.h:718