8#ifndef INCLUDED_BSLSTL_MULTIMAP
9#define INCLUDED_BSLSTL_MULTIMAP
587#include <bslscm_version.h>
629#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
630# include <initializer_list>
633#ifndef BDE_DONT_ALLOW_TRANSITIVE_INCLUDES
637#ifdef BSLS_COMPILERFEATURES_SUPPORT_TRAITS_HEADER
638#include <type_traits>
639 #ifndef BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES
640 #error Rvalue references curiously absent despite native 'type_traits'.
644#if defined(BSLS_LIBRARYFEATURES_HAS_CPP20_CONCEPTS) \
645 && defined(BSLS_LIBRARYFEATURES_HAS_CPP20_RANGES)
646# define BSLSTL_MULTIMAP_REQUIRES_CONTAINER_COMPATIBLE_RANGE(R, T) \
647 requires ::BloombergLP::bslmf::ContainerCompatibleRange<R, T>
649# define BSLSTL_MULTIMAP_REQUIRES_CONTAINER_COMPATIBLE_RANGE(R, T)
652#if BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
658# define COMPILING_BSLSTL_MULTIMAP_H
660# undef COMPILING_BSLSTL_MULTIMAP_H
688 class COMPARATOR = std::less<KEY>,
689 class ALLOCATOR = allocator<pair<const KEY, VALUE> > >
700 typedef BloombergLP::bslstl::MapComparator<KEY, VALUE, COMPARATOR>
705 typedef BloombergLP::bslstl::TreeNode<ValueType> Node;
709 typedef BloombergLP::bslstl::TreeNodePool<ValueType, ALLOCATOR>
718 typedef BloombergLP::bslmf::MovableRefUtil MoveUtil;
729 class DataWrapper :
public Comparator {
736 DataWrapper(
const DataWrapper&);
737 DataWrapper& operator=(
const DataWrapper&);
745 DataWrapper(
const COMPARATOR& comparator,
746 const ALLOCATOR& basicAllocator);
754 BloombergLP::bslmf::MovableRef<DataWrapper> original);
760 NodeFactory& nodeFactory();
766 const NodeFactory& nodeFactory()
const;
770 DataWrapper d_compAndAlloc;
774 BloombergLP::bslalg::RbTreeAnchor d_tree;
792 typedef BloombergLP::bslstl::TreeIterator<
value_type,
796 typedef BloombergLP::bslstl::TreeIterator<
const value_type,
875 static Node *toNode(BloombergLP::bslalg::RbTreeNode *node);
881 static const Node *toNode(
const BloombergLP::bslalg::RbTreeNode *node);
887 Comparator& comparator();
891 NodeFactory& nodeFactory();
898 void quickSwapExchangeAllocators(
multimap& other);
907 void quickSwapRetainAllocators(
multimap& other);
913 template <
class INPUT_ITERATOR,
class SENTINEL>
914 void constructFromRange(INPUT_ITERATOR first, SENTINEL last);
916#if defined(BSLS_LIBRARYFEATURES_HAS_CPP20_CONCEPTS) \
917 && defined(BSLS_LIBRARYFEATURES_HAS_CPP20_RANGES)
927 template <
class INPUT_ITERATOR,
class SENTINEL>
928 void constructFromRange(INPUT_ITERATOR first,
934 template <
class INPUT_ITERATOR,
class SENTINEL>
935 void insertFromRange(INPUT_ITERATOR first,
938#if defined(BSLS_LIBRARYFEATURES_HAS_CPP20_CONCEPTS) \
939 && defined(BSLS_LIBRARYFEATURES_HAS_CPP20_RANGES)
947 template <
class INPUT_ITERATOR,
class SENTINEL>
948 void insertFromRange(INPUT_ITERATOR first,
957 const Comparator& comparator()
const;
961 const NodeFactory& nodeFactory()
const;
979 const ALLOCATOR& basicAllocator = ALLOCATOR())
980 : d_compAndAlloc(comparator, basicAllocator)
997 explicit multimap(
const ALLOCATOR& basicAllocator);
1016 multimap(BloombergLP::bslmf::MovableRef<multimap> original);
1028 const typename type_identity<ALLOCATOR>::type& basicAllocator);
1043 multimap(BloombergLP::bslmf::MovableRef<multimap> original,
1044 const typename type_identity<ALLOCATOR>::type& basicAllocator);
1073 template <
class INPUT_ITERATOR>
1075 INPUT_ITERATOR last,
1076 const COMPARATOR& comparator = COMPARATOR(),
1077 const ALLOCATOR& basicAllocator = ALLOCATOR());
1078 template <
class INPUT_ITERATOR>
1080 INPUT_ITERATOR last,
1081 const ALLOCATOR& basicAllocator);
1101 template <
class RANGE>
1106 const COMPARATOR& comparator = COMPARATOR(),
1107 const ALLOCATOR& basicAllocator = ALLOCATOR())
1108 : d_compAndAlloc(comparator, basicAllocator)
1113#if defined(BSLS_LIBRARYFEATURES_HAS_CPP20_CONCEPTS) \
1114 && defined(BSLS_LIBRARYFEATURES_HAS_CPP20_RANGES)
1115 if constexpr (std::ranges::sized_range<RANGE>) {
1116 constructFromRange(bsl::ranges::begin(range),
1117 bsl::ranges::end (range),
1118 bsl::ranges::size (range));
1122 constructFromRange(bsl::ranges::begin(range),
1123 bsl::ranges::end (range));
1127 template <
class RANGE>
1131 const ALLOCATOR& basicAllocator)
1132 : d_compAndAlloc(COMPARATOR(), basicAllocator)
1141 quickSwapRetainAllocators(other);
1144#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
1163 multimap(std::initializer_list<value_type> values,
1164 const COMPARATOR& comparator = COMPARATOR(),
1165 const ALLOCATOR& basicAllocator = ALLOCATOR());
1166 multimap(std::initializer_list<value_type> values,
1167 const ALLOCATOR& basicAllocator);
1188 AllocatorTraits::is_always_equal::value &&
1189 std::is_nothrow_move_assignable<COMPARATOR>::value);
1205#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
1246#if defined(BSLS_PLATFORM_CMP_SUN) && BSLS_PLATFORM_CMP_VERSION < 0x5130
1247 template <
class ALT_VALUE_TYPE>
1249#elif !defined(BSLS_COMPILERFEATURES_SUPPORT_TRAITS_HEADER)
1250 template <
class ALT_VALUE_TYPE>
1263 template <
class ALT_VALUE_TYPE>
1265 ALT_VALUE_TYPE&&>::value,
1290#if defined(BSLS_PLATFORM_CMP_SUN) && BSLS_PLATFORM_CMP_VERSION < 0x5130
1291 template <
class ALT_VALUE_TYPE>
1293#elif !defined(BSLS_COMPILERFEATURES_SUPPORT_TRAITS_HEADER)
1294 template <
class ALT_VALUE_TYPE>
1312 template <
class ALT_VALUE_TYPE>
1314 ALT_VALUE_TYPE&&>::value,
1339 template <
class INPUT_ITERATOR>
1340 void insert(INPUT_ITERATOR first, INPUT_ITERATOR last);
1351 template <
class RANGE>
1357#if defined(BSLS_LIBRARYFEATURES_HAS_CPP20_CONCEPTS) \
1358 && defined(BSLS_LIBRARYFEATURES_HAS_CPP20_RANGES)
1359 if constexpr (std::ranges::sized_range<RANGE>) {
1360 insertFromRange(bsl::ranges::begin(range),
1361 bsl::ranges::end (range),
1362 bsl::ranges::size (range));
1366 insertFromRange(bsl::ranges::begin(range),
1367 bsl::ranges::end (range));
1371#if defined(BSLS_PLATFORM_CMP_SUN) && BSLS_PLATFORM_CMP_VERSION < 0x5130
1386#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
1392 void insert(std::initializer_list<value_type> values);
1395#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
1405 template <
class... Args>
1423 template <
class... Args>
1446 template <
class t_KEY>
1448 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1459 while (it !=
end() && !
key_comp()(key, it->first)) {
1479 AllocatorTraits::is_always_equal::value &&
1480 bsl::is_nothrow_swappable<COMPARATOR>::value);
1517 return iterator(BloombergLP::bslalg::RbTreeUtil::find(
1518 d_tree, this->comparator(), key));
1527 template <
class LOOKUP_KEY>
1529 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1534 return iterator(BloombergLP::bslalg::RbTreeUtil::find(
1535 d_tree, this->comparator(), key));
1551 return iterator(BloombergLP::bslalg::RbTreeUtil::lowerBound(
1552 d_tree, this->comparator(), key));
1566 template <
class LOOKUP_KEY>
1568 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1573 return iterator(BloombergLP::bslalg::RbTreeUtil::lowerBound(
1574 d_tree, this->comparator(), key));
1590 return iterator(BloombergLP::bslalg::RbTreeUtil::upperBound(
1591 d_tree, this->comparator(), key));
1605 template <
class LOOKUP_KEY>
1607 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1612 return iterator(BloombergLP::bslalg::RbTreeUtil::upperBound(
1613 d_tree, this->comparator(), key));
1631 if (endIt !=
end() && !comparator()(key, *endIt.node())) {
1648 template <
class LOOKUP_KEY>
1650 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1657 if (endIt !=
end() && !comparator()(key, *endIt.node())) {
1723 template <class LOOKUP_KEY>
1725 BloombergLP::
bslmf::IsTransparentPredicate<COMPARATOR,
1775 d_tree, this->comparator(), key));
1784 template <
class LOOKUP_KEY>
1786 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1792 d_tree, this->comparator(), key));
1804 while (it !=
end() && !comparator()(key, *it.node())) {
1815 template <
class LOOKUP_KEY>
1817 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1825 while (it !=
end() && !comparator()(key, *it.node())) {
1846 return iterator(BloombergLP::bslalg::RbTreeUtil::lowerBound(
1847 d_tree, this->comparator(), key));
1862 template <
class LOOKUP_KEY>
1864 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1869 return const_iterator(BloombergLP::bslalg::RbTreeUtil::lowerBound(
1870 d_tree, this->comparator(), key));
1886 return const_iterator(BloombergLP::bslalg::RbTreeUtil::upperBound(
1887 d_tree, this->comparator(), key));
1901 template <
class LOOKUP_KEY>
1903 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1908 return const_iterator(BloombergLP::bslalg::RbTreeUtil::upperBound(
1909 d_tree, this->comparator(), key));
1927 if (endIt !=
end() && !comparator()(key, *endIt.node())) {
1944 template <
class LOOKUP_KEY>
1946 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1953 if (endIt !=
end() && !comparator()(key, *endIt.node())) {
1962#ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
1972 class INPUT_ITERATOR,
1973 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
1975 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
1976 class COMPARATOR = std::less<KEY>,
1978 BloombergLP::bslstl::IteratorUtil::IterToAlloc_t<INPUT_ITERATOR>>,
1979 class = bsl::enable_if_t<!bsl::IsStdAllocator_v<COMPARATOR>>,
1980 class = bsl::enable_if_t<
bsl::IsStdAllocator_v<ALLOCATOR>>
1982multimap(INPUT_ITERATOR,
1984 COMPARATOR = COMPARATOR(),
1985 ALLOCATOR = ALLOCATOR())
1986-> multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>;
1995 class INPUT_ITERATOR,
1998 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
2000 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
2001 class DEFAULT_ALLOCATOR = bsl::allocator<pair<const KEY, VALUE>>,
2002 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
2004multimap(INPUT_ITERATOR, INPUT_ITERATOR, COMPARATOR, ALLOC *)
2005-> multimap<KEY, VALUE, COMPARATOR>;
2012 class INPUT_ITERATOR,
2014 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
2016 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
2017 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
2019multimap(INPUT_ITERATOR, INPUT_ITERATOR, ALLOCATOR)
2020-> multimap<KEY, VALUE, std::less<KEY>, ALLOCATOR>;
2027 class INPUT_ITERATOR,
2029 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
2031 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
2032 class DEFAULT_ALLOCATOR = bsl::allocator<pair<const KEY, VALUE>>,
2033 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
2035multimap(INPUT_ITERATOR, INPUT_ITERATOR, ALLOC *)
2036-> multimap<KEY, VALUE>;
2047 class COMPARATOR = std::less<KEY>,
2048 class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE>>,
2049 class = bsl::enable_if_t<!bsl::IsStdAllocator_v<COMPARATOR>>,
2050 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
2052multimap(std::initializer_list<pair<const KEY, VALUE>>,
2053 COMPARATOR = COMPARATOR(),
2054 ALLOCATOR = ALLOCATOR())
2055-> multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>;
2068 class DEFAULT_ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE>>,
2069 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
2071multimap(std::initializer_list<pair<const KEY, VALUE>>, COMPARATOR, ALLOC *)
2072-> multimap<KEY, VALUE, COMPARATOR>;
2084 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
2086multimap(std::initializer_list<pair<const KEY, VALUE>>, ALLOCATOR)
2087-> multimap<KEY, VALUE, std::less<KEY>, ALLOCATOR>;
2097 class DEFAULT_ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE>>,
2098 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
2100multimap(std::initializer_list<pair<const KEY, VALUE>>, ALLOC *)
2101-> multimap<KEY, VALUE>;
2114template <class KEY, class VALUE, class COMPARATOR, class ALLOCATOR>
2115bool operator==(const multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>& lhs,
2116 const multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>& rhs);
2118#ifndef BSLS_COMPILERFEATURES_SUPPORT_THREE_WAY_COMPARISON
2119template <class KEY, class VALUE, class COMPARATOR, class ALLOCATOR>
2120bool operator!=(const multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>& lhs,
2121 const multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>& rhs);
2132#ifdef BSLALG_SYNTHTHREEWAYUTIL_AVAILABLE
2138template <class KEY, class VALUE, class COMPARATOR, class ALLOCATOR>
2139BloombergLP::bslalg::SynthThreeWayUtil::Result<pair<const KEY, VALUE>>
2140operator<=>(const multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>& lhs,
2141 const multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>& rhs);
2145template <class KEY, class VALUE, class COMPARATOR, class ALLOCATOR>
2146bool operator<(const multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>& lhs,
2147 const multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>& rhs);
2160template <class KEY, class VALUE, class COMPARATOR, class ALLOCATOR>
2161bool operator>(const multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>& lhs,
2162 const multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>& rhs);
2171template <class KEY, class VALUE, class COMPARATOR, class ALLOCATOR>
2172bool operator<=(const multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>& lhs,
2173 const multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>& rhs);
2182template <class KEY, class VALUE, class COMPARATOR, class ALLOCATOR>
2183bool operator>=(const multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>& lhs,
2184 const multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>& rhs);
2204typename
multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>::size_type
2205erase_if(multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>& m,
2206 PREDICATE predicate);
2226template <class KEY, class VALUE, class COMPARATOR, class ALLOCATOR>
2227void swap(multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>& a,
2228 multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>& b)
2240template <class KEY, class VALUE, class COMPARATOR, class ALLOCATOR>
2242multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>::DataWrapper::DataWrapper(
2243 const COMPARATOR& comparator,
2244 const ALLOCATOR& basicAllocator)
2245:
::bsl::multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>::Comparator(comparator)
2246, d_pool(basicAllocator)
2250template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2252multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>::DataWrapper::DataWrapper(
2253 BloombergLP::bslmf::MovableRef<DataWrapper> original)
2254: ::
bsl::multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>::Comparator(
2255 MoveUtil::access(original).keyComparator())
2256, d_pool(MoveUtil::move(MoveUtil::access(original).d_pool))
2261template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2263typename multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>::NodeFactory&
2264multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>::DataWrapper::nodeFactory()
2270template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2272const typename multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>::NodeFactory&
2273multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>::DataWrapper::nodeFactory()
const
2282template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2285 COMPARATOR comparator)
2290template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2304template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2306typename multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>::Comparator&
2309 return d_compAndAlloc;
2312template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2314typename multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>::NodeFactory&
2317 return d_compAndAlloc.nodeFactory();
2320template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2322void multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>::quickSwapExchangeAllocators(
2325 BloombergLP::bslalg::RbTreeUtil::swap(&d_tree, &other.d_tree);
2326 nodeFactory().swapExchangeAllocators(other.nodeFactory());
2334 if (
sizeof(NodeFactory) !=
sizeof(DataWrapper)) {
2335 comparator().swap(other.comparator());
2339template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2341void multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>::quickSwapRetainAllocators(
2344 BloombergLP::bslalg::RbTreeUtil::swap(&d_tree, &other.d_tree);
2345 nodeFactory().swapRetainAllocators(other.nodeFactory());
2349 if (
sizeof(NodeFactory) !=
sizeof(DataWrapper)) {
2350 comparator().swap(other.comparator());
2354template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2355template <
class INPUT_ITERATOR,
class SENTINEL>
2358multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>::constructFromRange(
2359 INPUT_ITERATOR first,
2362 if (first == last) {
2367 BloombergLP::bslstl::IteratorUtil::
2368 canCalculateInsertDistance<INPUT_ITERATOR, SENTINEL>()) {
2369 nodeFactory().reserveNodes(
2370 BloombergLP::bslstl::IteratorUtil::insertDistance(first, last));
2373 BloombergLP::bslalg::RbTreeUtilTreeProctor<NodeFactory> proctor(
2384 BloombergLP::bslalg::RbTreeNode *prevNode = d_tree.rootNode();
2386 while (++first != last) {
2389 if (this->comparator()(value.first, *prevNode)) {
2392 insertFromRange(++first, last);
2397 BloombergLP::bslalg::RbTreeNode *node =
2398 nodeFactory().emplaceIntoNewNode(value);
2399 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2409#if defined(BSLS_LIBRARYFEATURES_HAS_CPP20_CONCEPTS) \
2410 && defined(BSLS_LIBRARYFEATURES_HAS_CPP20_RANGES)
2412template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2413template <
class INPUT_ITERATOR,
class SENTINEL>
2416multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>::constructFromRange(
2417 INPUT_ITERATOR first,
2423 !BloombergLP::bslstl::IteratorUtil
2424 ::canCalculateInsertDistance<INPUT_ITERATOR, SENTINEL>()
2425 || numElements ==
static_cast<size_type>(
2426 BloombergLP::bslstl::IteratorUtil::insertDistance(first, last))));
2428 if (first == last) {
2432 if (0 < numElements) {
2433 nodeFactory().reserveNodes(numElements);
2436 BloombergLP::bslalg::RbTreeUtilTreeProctor<NodeFactory> proctor(
2446 insert(*first); --numElements;
2447 BloombergLP::bslalg::RbTreeNode *prevNode = d_tree.rootNode();
2449 while (++first != last) {
2452 if (this->comparator()(value.first, *prevNode)) {
2454 insert(value); --numElements;
2455 insertFromRange(++first, last, numElements);
2460 BloombergLP::bslalg::RbTreeNode *node =
2461 nodeFactory().emplaceIntoNewNode(value);
2462 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2475template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2476template <
class INPUT_ITERATOR,
class SENTINEL>
2479multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>::insertFromRange(
2480 INPUT_ITERATOR first,
2493 while (first != last) {
2495 if (BloombergLP::bslstl::IteratorUtil
2496 ::canCalculateInsertDistance<INPUT_ITERATOR, SENTINEL>()
2498 !nodeFactory().hasFreeNodes())) {
2499 nodeFactory().reserveNodes(
2500 BloombergLP::bslstl::IteratorUtil::insertDistance(first, last));
2508#if defined(BSLS_LIBRARYFEATURES_HAS_CPP20_CONCEPTS) \
2509 && defined(BSLS_LIBRARYFEATURES_HAS_CPP20_RANGES)
2511template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2512template <
class INPUT_ITERATOR,
class SENTINEL>
2514void multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>::insertFromRange(
2515 INPUT_ITERATOR first,
2520 !BloombergLP::bslstl::IteratorUtil
2521 ::canCalculateInsertDistance<INPUT_ITERATOR, SENTINEL>()
2522 || numElements ==
static_cast<size_type>(
2523 BloombergLP::bslstl::IteratorUtil::insertDistance(first, last))));
2525 while (first != last) {
2528 !nodeFactory().hasFreeNodes())) {
2529 nodeFactory().reserveNodes(numElements);
2541template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2543const typename multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>::Comparator&
2544multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>::comparator()
const
2546 return d_compAndAlloc;
2549template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2551const typename multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>::NodeFactory&
2552multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>::nodeFactory()
const
2554 return d_compAndAlloc.nodeFactory();
2558template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2561: d_compAndAlloc(COMPARATOR(), ALLOCATOR())
2566template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2569 const ALLOCATOR& basicAllocator)
2570: d_compAndAlloc(COMPARATOR(), basicAllocator)
2575template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2578: d_compAndAlloc(original.comparator().keyComparator(),
2583 if (0 < original.
size()) {
2584 nodeFactory().reserveNodes(original.
size());
2585 BloombergLP::bslalg::RbTreeUtil::copyTree(&d_tree,
2591template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2594 BloombergLP::bslmf::MovableRef<multimap> original)
2595: d_compAndAlloc(MoveUtil::move(MoveUtil::access(original).d_compAndAlloc))
2599 BloombergLP::bslalg::RbTreeUtil::swap(&d_tree, &lvalue.d_tree);
2602template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2606 const typename type_identity<ALLOCATOR>::type& basicAllocator)
2607: d_compAndAlloc(original.comparator().keyComparator(), basicAllocator)
2610 if (0 < original.
size()) {
2611 nodeFactory().reserveNodes(original.
size());
2612 BloombergLP::bslalg::RbTreeUtil::copyTree(&d_tree,
2618template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2621 BloombergLP::bslmf::MovableRef<multimap> original,
2622 const typename type_identity<ALLOCATOR>::type& basicAllocator)
2623: d_compAndAlloc(MoveUtil::access(original).comparator().keyComparator(),
2630 nodeFactory().
allocator() == lvalue.nodeFactory().allocator())) {
2631 d_compAndAlloc.nodeFactory().adopt(
2632 MoveUtil::move(lvalue.d_compAndAlloc.nodeFactory()));
2633 BloombergLP::bslalg::RbTreeUtil::swap(&d_tree, &lvalue.d_tree);
2636 if (0 < lvalue.
size()) {
2637 nodeFactory().reserveNodes(lvalue.
size());
2638 BloombergLP::bslalg::RbTreeUtil::moveTree(&d_tree,
2641 &lvalue.nodeFactory());
2646template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2647template <
class INPUT_ITERATOR>
2650 INPUT_ITERATOR first,
2651 INPUT_ITERATOR last,
2652 const COMPARATOR& comparator,
2653 const ALLOCATOR& basicAllocator)
2654: d_compAndAlloc(comparator, basicAllocator)
2657 if (first != last) {
2660 BloombergLP::bslstl::IteratorUtil::insertDistance(first, last));
2662 if (0 < numElements) {
2663 nodeFactory().reserveNodes(numElements);
2666 BloombergLP::bslalg::RbTreeUtilTreeProctor<NodeFactory> proctor(
2677 BloombergLP::bslalg::RbTreeNode *prevNode = d_tree.rootNode();
2678 while (++first != last) {
2682 if (this->comparator()(value.
first, *prevNode)) {
2687 BloombergLP::bslalg::RbTreeNode *node =
2688 nodeFactory().emplaceIntoNewNode(value);
2689 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2699template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2700template <
class INPUT_ITERATOR>
2703 INPUT_ITERATOR first,
2704 INPUT_ITERATOR last,
2705 const ALLOCATOR& basicAllocator)
2706: d_compAndAlloc(COMPARATOR(), basicAllocator)
2709 if (first != last) {
2712 BloombergLP::bslstl::IteratorUtil::insertDistance(first, last));
2714 if (0 < numElements) {
2715 nodeFactory().reserveNodes(numElements);
2718 BloombergLP::bslalg::RbTreeUtilTreeProctor<NodeFactory> proctor(
2729 BloombergLP::bslalg::RbTreeNode *prevNode = d_tree.rootNode();
2730 while (++first != last) {
2734 if (this->comparator()(value.
first, *prevNode)) {
2739 BloombergLP::bslalg::RbTreeNode *node =
2740 nodeFactory().emplaceIntoNewNode(value);
2741 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2751#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
2752template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2755 std::initializer_list<value_type> values,
2756 const COMPARATOR& comparator,
2757 const ALLOCATOR& basicAllocator)
2762template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2765 std::initializer_list<value_type> values,
2766 const ALLOCATOR& basicAllocator)
2767: multimap(values.begin(), values.end(), COMPARATOR(), basicAllocator)
2772template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2780template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2786 if (AllocatorTraits::propagate_on_container_copy_assignment::value) {
2788 quickSwapExchangeAllocators(other);
2792 quickSwapRetainAllocators(other);
2798template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2802 BloombergLP::bslmf::MovableRef<multimap>
rhs)
2804 AllocatorTraits::is_always_equal::value &&
2805 std::is_nothrow_move_assignable<COMPARATOR>::value)
2810 if (nodeFactory().
allocator() == lvalue.nodeFactory().allocator()) {
2811 multimap other(MoveUtil::move(lvalue));
2812 quickSwapRetainAllocators(other);
2815 AllocatorTraits::propagate_on_container_move_assignment::value) {
2816 multimap other(MoveUtil::move(lvalue));
2817 quickSwapExchangeAllocators(other);
2820 multimap other(MoveUtil::move(lvalue), nodeFactory().allocator());
2821 quickSwapRetainAllocators(other);
2827#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
2828template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2830multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>&
2832 std::initializer_list<value_type> values)
2835 insert(values.begin(), values.end());
2840template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2845 return iterator(d_tree.firstNode());
2848template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2853 return iterator(d_tree.sentinel());
2856template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2864template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2872template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2879 BloombergLP::bslalg::RbTreeNode *insertLocation =
2880 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(&leftChild,
2885 BloombergLP::bslalg::RbTreeNode *node =
2886 nodeFactory().emplaceIntoNewNode(value);
2888 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2895template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2896template <
class INPUT_ITERATOR>
2899 INPUT_ITERATOR last)
2909 while (first != last) {
2910 if (BloombergLP::bslstl::IteratorUtil
2911 ::canCalculateInsertDistance<INPUT_ITERATOR, INPUT_ITERATOR>()
2913 !nodeFactory().hasFreeNodes())) {
2915 BloombergLP::bslstl::IteratorUtil::insertDistance(first, last));
2917 nodeFactory().reserveNodes(numElements);
2924#if defined(BSLS_PLATFORM_CMP_SUN) && BSLS_PLATFORM_CMP_VERSION < 0x5130
2925template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2928 const_iterator last)
2930 while (first != last) {
2937template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2945 BloombergLP::bslalg::RbTreeNode *hintNode =
2946 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
2948 BloombergLP::bslalg::RbTreeNode *insertLocation =
2949 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(&leftChild,
2955 BloombergLP::bslalg::RbTreeNode *node =
2956 nodeFactory().emplaceIntoNewNode(value);
2958 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2965#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
2966template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2969 std::initializer_list<value_type> values)
2971 insert(values.begin(), values.end());
2975#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
2976template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
2977template <
class... Args>
2984 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2987 BloombergLP::bslalg::RbTreeNode *insertLocation =
2988 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(
2992 static_cast<const Node *
>(node)->value().first);
2994 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
3001template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3002template <
class... Args>
3010 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
3013 BloombergLP::bslalg::RbTreeNode *hintNode =
3014 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
3016 BloombergLP::bslalg::RbTreeNode *insertLocation =
3017 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(
3021 static_cast<const Node *
>(node)->value().first,
3024 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
3033template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3040 BloombergLP::bslalg::RbTreeNode *node =
3041 const_cast<BloombergLP::bslalg::RbTreeNode *
>(position.node());
3042 BloombergLP::bslalg::RbTreeNode *result =
3043 BloombergLP::bslalg::RbTreeUtil::next(node);
3044 BloombergLP::bslalg::RbTreeUtil::remove(&d_tree, node);
3045 nodeFactory().deleteNode(node);
3049template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3057template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3065 if (first !=
end()) {
3067 while (first != last) {
3068 first =
erase(first);
3075template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3081 while (first != last) {
3082 first =
erase(first);
3087template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3091 AllocatorTraits::is_always_equal::value &&
3092 bsl::is_nothrow_swappable<COMPARATOR>::value)
3094 if (AllocatorTraits::propagate_on_container_swap::value) {
3095 quickSwapExchangeAllocators(other);
3102 nodeFactory().allocator() == other.nodeFactory().allocator())) {
3103 quickSwapRetainAllocators(other);
3108 multimap toOtherCopy(MoveUtil::move(*
this),
3109 other.nodeFactory().allocator());
3110 multimap toThisCopy( MoveUtil::move(other),
3111 nodeFactory().allocator());
3113 this->quickSwapRetainAllocators(toThisCopy);
3114 other.quickSwapRetainAllocators(toOtherCopy);
3119template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3125 if (d_tree.rootNode()) {
3129 BloombergLP::bslalg::RbTreeUtil::deleteTree(&d_tree, &nodeFactory());
3131#if defined(BSLS_ASSERT_SAFE_IS_USED)
3140template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3146 return nodeFactory().allocator();
3149template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3158template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3166template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3175template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3183template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3192template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3200template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3209template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3218template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3223 return find(key) !=
end();
3227template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3232 return 0 == d_tree.numNodes();
3235template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3240 return d_tree.numNodes();
3243template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3249 return AllocatorTraits::max_size(get_allocator());
3252template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3257 return comparator().keyComparator();
3260template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3271template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3273bool bsl::operator==(
3277 return BloombergLP::bslalg::RangeCompare::equal(lhs.begin(),
3285#ifndef BSLS_COMPILERFEATURES_SUPPORT_THREE_WAY_COMPARISON
3286template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3296#ifdef BSLALG_SYNTHTHREEWAYUTIL_AVAILABLE
3298template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3300BloombergLP::bslalg::SynthThreeWayUtil::Result<bsl::pair<const KEY, VALUE>>
3301bsl::operator<=>(
const multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>& lhs,
3302 const multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>& rhs)
3304 return bsl::lexicographical_compare_three_way(
3309 BloombergLP::bslalg::SynthThreeWayUtil::compare);
3314template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3320 return 0 > BloombergLP::bslalg::RangeCompare::lexicographical(
lhs.begin(),
3328template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3337template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3346template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3366 PREDICATE predicate)
3368 return BloombergLP::bslstl::AlgorithmUtil::containerEraseIf(m, predicate);
3371template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3393template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
3403template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
Definition bslma_bslallocator.h:588
Definition bslstl_multimap.h:812
COMPARATOR comp
Definition bslstl_multimap.h:819
value_compare & operator=(const value_compare &rhs)=default
bool operator()(const value_type &x, const value_type &y) const
Definition bslstl_multimap.h:2292
value_type first_argument_type
Definition bslstl_multimap.h:839
bool result_type
Definition bslstl_multimap.h:834
value_type second_argument_type
Definition bslstl_multimap.h:844
value_compare(const value_compare &original)=default
Definition bslstl_multimap.h:690
void swap(multimap &other) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(AllocatorTraits void clear() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_multimap.h:1503
AllocatorTraits::difference_type difference_type
Definition bslstl_multimap.h:788
pair< const KEY, VALUE > value_type
Definition bslstl_multimap.h:781
bool contains(const key_type &key) const
Definition bslstl_multimap.h:3220
bsl::enable_if< BloombergLP::bslmf::IsTransparentPredicate< COMPARATOR, LOOKUP_KEY >::value, pair< const_iterator, const_iterator > >::type equal_range(const LOOKUP_KEY &key) const
Definition bslstl_multimap.h:1949
const_iterator upper_bound(const key_type &key) const
Definition bslstl_multimap.h:1884
bsl::reverse_iterator< const_iterator > const_reverse_iterator
Definition bslstl_multimap.h:801
size_type max_size() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_multimap.h:3246
size_type size() const BSLS_KEYWORD_NOEXCEPT
Return the number of elements in this multimap.
Definition bslstl_multimap.h:3238
bsl::pair< iterator, iterator > equal_range(const key_type &key)
Definition bslstl_multimap.h:1627
const value_type & const_reference
Definition bslstl_multimap.h:785
COMPARATOR key_compare
Definition bslstl_multimap.h:782
iterator emplace(Args &&... args)
Definition bslstl_multimap.h:2980
AllocatorTraits::const_pointer const_pointer
Definition bslstl_multimap.h:790
AllocatorTraits::size_type size_type
Definition bslstl_multimap.h:787
iterator insert(const value_type &value)
Definition bslstl_multimap.h:2875
BloombergLP::bslstl::TreeIterator< const value_type, Node, difference_type > const_iterator
Definition bslstl_multimap.h:798
bsl::enable_if< BloombergLP::bslmf::IsTransparentPredicate< COMPARATOR, LOOKUP_KEY >::value, const_iterator >::type find(const LOOKUP_KEY &key) const
Definition bslstl_multimap.h:1789
const_reverse_iterator crbegin() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_multimap.h:3203
enable_if< is_convertible< ALT_VALUE_TYPE, value_type >::value, iterator >::type insert(BSLS_COMPILERFEATURES_FORWARD_REF(ALT_VALUE_TYPE) value)
Definition bslstl_multimap.h:1268
iterator erase(const_iterator position)
Definition bslstl_multimap.h:3036
BloombergLP::bslstl::TreeIterator< value_type, Node, difference_type > iterator
Definition bslstl_multimap.h:794
bsl::enable_if< BloombergLP::bslmf::IsTransparentPredicate< COMPARATOR, LOOKUP_KEY >::value, iterator >::type find(const LOOKUP_KEY &key)
Definition bslstl_multimap.h:1532
const_iterator lower_bound(const key_type &key) const
Definition bslstl_multimap.h:1844
multimap & operator=(const multimap &rhs)
Definition bslstl_multimap.h:2783
bsl::enable_if< BloombergLP::bslmf::IsTransparentPredicate< COMPARATOR, LOOKUP_KEY >::value, size_type >::type count(const LOOKUP_KEY &key) const
Definition bslstl_multimap.h:1820
bsl::reverse_iterator< iterator > reverse_iterator
Definition bslstl_multimap.h:800
bool empty() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_multimap.h:3229
reverse_iterator rbegin() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_multimap.h:2859
pair< const_iterator, const_iterator > equal_range(const key_type &key) const
Definition bslstl_multimap.h:1923
ALLOCATOR allocator_type
Definition bslstl_multimap.h:783
allocator_type get_allocator() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_multimap.h:3143
~multimap()
Destroy this object.
Definition bslstl_multimap.h:2774
AllocatorTraits::pointer pointer
Definition bslstl_multimap.h:789
iterator emplace_hint(const_iterator hint, Args &&... args)
Definition bslstl_multimap.h:3005
value_compare value_comp() const
Definition bslstl_multimap.h:3263
iterator lower_bound(const key_type &key)
Definition bslstl_multimap.h:1549
const_iterator cend() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_multimap.h:3195
multimap(const COMPARATOR &comparator, const ALLOCATOR &basicAllocator=ALLOCATOR())
Definition bslstl_multimap.h:978
iterator end() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_multimap.h:2851
key_compare key_comp() const
Definition bslstl_multimap.h:3255
enable_if< BloombergLP::bslmf::IsTransparentPredicate< COMPARATOR, t_KEY >::value &&!is_convertible< BSLS_COMPILERFEATURES_FORWARD_REF(t_KEY), iterator >::value &&!is_convertible< BSLS_COMPILERFEATURES_FORWARD_REF(t_KEY), const_iterator >::value, size_type >::type erase(BSLS_COMPILERFEATURES_FORWARD_REF(t_KEY) key)
Definition bslstl_multimap.h:1454
const_reverse_iterator crend() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_multimap.h:3212
iterator find(const key_type &key)
Definition bslstl_multimap.h:1515
bsl::enable_if< BloombergLP::bslmf::IsTransparentPredicate< COMPARATOR, LOOKUP_KEY >::value, iterator >::type upper_bound(const LOOKUP_KEY &key)
Definition bslstl_multimap.h:1610
size_type count(const key_type &key) const
Definition bslstl_multimap.h:1799
const_iterator cbegin() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_multimap.h:3186
bsl::enable_if< BloombergLP::bslmf::IsTransparentPredicate< COMPARATOR, LOOKUP_KEY >::value, const_iterator >::type lower_bound(const LOOKUP_KEY &key) const
Definition bslstl_multimap.h:1867
multimap()
Definition bslstl_multimap.h:2560
VALUE mapped_type
Definition bslstl_multimap.h:780
bsl::enable_if< BloombergLP::bslmf::IsTransparentPredicate< COMPARATOR, LOOKUP_KEY >::value, iterator >::type lower_bound(const LOOKUP_KEY &key)
Definition bslstl_multimap.h:1571
KEY key_type
Definition bslstl_multimap.h:779
iterator upper_bound(const key_type &key)
Definition bslstl_multimap.h:1588
value_type & reference
Definition bslstl_multimap.h:784
bsl::enable_if< BloombergLP::bslmf::IsTransparentPredicate< COMPARATOR, LOOKUP_KEY >::value, pair< iterator, iterator > >::type equal_range(const LOOKUP_KEY &key)
Definition bslstl_multimap.h:1653
bsl::enable_if< BloombergLP::bslmf::IsTransparentPredicate< COMPARATOR, LOOKUP_KEY >::value, const_iterator >::type upper_bound(const LOOKUP_KEY &key) const
Definition bslstl_multimap.h:1906
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_multimap.h:1317
void insert_range(BSLS_COMPILERFEATURES_FORWARD_REF(RANGE) range)
Definition bslstl_multimap.h:1353
reverse_iterator rend() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_multimap.h:2867
multimap &operator=(BloombergLP::bslmf::MovableRef< multimap > rhs) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(AllocatorTraits iterator begin() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_multimap.h:2843
Definition bslstl_pair.h:1280
#define BSLS_ASSERT_SAFE(X)
Definition bsls_assert.h:1917
#define BSLS_COMPILERFEATURES_FORWARD_REF(T)
Definition bsls_compilerfeatures.h:2343
#define BSLS_COMPILERFEATURES_FORWARD(T, V)
Definition bsls_compilerfeatures.h:2349
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
#define BSLS_KEYWORD_CONSTEXPR_CPP17
Definition bsls_keyword.h:639
#define BSLS_KEYWORD_NOEXCEPT
Definition bsls_keyword.h:674
#define BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(...)
Definition bsls_keyword.h:676
#define BSLSTL_MULTIMAP_REQUIRES_CONTAINER_COMPATIBLE_RANGE(R, T)
Definition bslstl_multimap.h:649
Definition bdlat_valuetypefunctions.h:939
void swap(array< VALUE_TYPE, SIZE > &lhs, array< VALUE_TYPE, SIZE > &rhs)
T::const_iterator cend(const T &container)
Definition bslstl_iterator.h:1709
bool operator<(const array< VALUE_TYPE, SIZE > &lhs, const array< VALUE_TYPE, SIZE > &rhs)
T::const_reverse_iterator crbegin(const T &container)
Definition bslstl_iterator.h:1695
bool operator>(const array< VALUE_TYPE, SIZE > &lhs, const array< VALUE_TYPE, SIZE > &rhs)
bool operator>=(const array< VALUE_TYPE, SIZE > &lhs, const array< VALUE_TYPE, SIZE > &rhs)
bool operator<=(const array< VALUE_TYPE, SIZE > &lhs, const array< VALUE_TYPE, SIZE > &rhs)
ALLOCATOR const STRING_VIEW_LIKE_TYPE & rhs
Definition bslstl_string.h:3918
deque< VALUE_TYPE, ALLOCATOR >::size_type erase(deque< VALUE_TYPE, ALLOCATOR > &deq, const BDE_OTHER_TYPE &value)
Definition bslstl_deque.h:4424
T::iterator begin(T &container)
Definition bslstl_iterator.h:1593
const from_range_t from_range
T::const_iterator cbegin(const T &container)
Definition bslstl_iterator.h:1651
ALLOCATOR & lhs
Definition bslstl_string.h:3917
T::iterator end(T &container)
Definition bslstl_iterator.h:1621
deque< VALUE_TYPE, ALLOCATOR >::size_type erase_if(deque< VALUE_TYPE, ALLOCATOR > &deq, PREDICATE predicate)
Definition bslstl_deque.h:4433
bool operator!=(const memory_resource &a, const memory_resource &b)
T::const_reverse_iterator crend(const T &container)
Definition bslstl_iterator.h:1752
Definition bdlc_flathashmap.h:2218
Definition baljsn_encoder_testtypes.h:76
Definition bdlbb_blob.h:579
TYPE first
Definition bslstl_pair.h:587
Definition bslma_allocatortraits.h:1089
BloombergLP::bslma::AllocatorTraits_ConstPointerType< ALLOCATOR >::type const_pointer
Definition bslma_allocatortraits.h:1183
BloombergLP::bslma::AllocatorTraits_SizeType< ALLOCATOR >::type size_type
Definition bslma_allocatortraits.h:1196
BloombergLP::bslma::AllocatorTraits_PointerType< ALLOCATOR >::type pointer
Definition bslma_allocatortraits.h:1180
BloombergLP::bslma::AllocatorTraits_DifferenceType< ALLOCATOR >::type difference_type
Definition bslma_allocatortraits.h:1193
Definition bslmf_enableif.h:530
Definition bslstl_ranges.h:301
Definition bslmf_isconvertible.h:875
Definition bslalg_hasstliterators.h:99
Definition bslma_usesbslmaallocator.h:344