11#ifndef INCLUDED_BSLSTL_MULTISET_CPP03
12#define INCLUDED_BSLSTL_MULTISET_CPP03
63#ifdef COMPILING_BSLSTL_MULTISET_H
85 class COMPARATOR = std::less<KEY>,
93 typedef const KEY ValueType;
97 typedef BloombergLP::bslstl::SetComparator<KEY, COMPARATOR> Comparator;
101 typedef BloombergLP::bslstl::TreeNode<KEY> Node;
105 typedef BloombergLP::bslstl::TreeNodePool<KEY, ALLOCATOR> NodeFactory;
113 typedef BloombergLP::bslmf::MovableRefUtil MoveUtil;
124 class DataWrapper :
public Comparator {
131 DataWrapper(
const DataWrapper&);
132 DataWrapper& operator=(
const DataWrapper&);
140 explicit DataWrapper(
const COMPARATOR& comparator,
141 const ALLOCATOR& basicAllocator);
148 DataWrapper(BloombergLP::bslmf::MovableRef<DataWrapper> original);
154 NodeFactory& nodeFactory();
160 const NodeFactory& nodeFactory()
const;
164 DataWrapper d_compAndAlloc;
168 BloombergLP::bslalg::RbTreeAnchor d_tree;
186 typedef BloombergLP::bslstl::TreeIterator<
const value_type,
189 typedef BloombergLP::bslstl::TreeIterator<
const value_type,
200 Comparator& comparator();
204 NodeFactory& nodeFactory();
211 void quickSwapExchangeAllocators(
multiset& other);
220 void quickSwapRetainAllocators(
multiset& other);
226 template <
class INPUT_ITERATOR,
class SENTINEL>
227 void constructFromRange(INPUT_ITERATOR first, SENTINEL last);
229#if defined(BSLS_LIBRARYFEATURES_HAS_CPP20_CONCEPTS) \
230 && defined(BSLS_LIBRARYFEATURES_HAS_CPP20_RANGES)
240 template <
class INPUT_ITERATOR,
class SENTINEL>
241 void constructFromRange(INPUT_ITERATOR first,
247 template <
class INPUT_ITERATOR,
class SENTINEL>
248 void insertFromRange(INPUT_ITERATOR first,
251#if defined(BSLS_LIBRARYFEATURES_HAS_CPP20_CONCEPTS) \
252 && defined(BSLS_LIBRARYFEATURES_HAS_CPP20_RANGES)
260 template <
class INPUT_ITERATOR,
class SENTINEL>
261 void insertFromRange(INPUT_ITERATOR first,
270 const Comparator& comparator()
const;
274 const NodeFactory& nodeFactory()
const;
291 explicit multiset(
const COMPARATOR& comparator,
292 const ALLOCATOR& basicAllocator = ALLOCATOR())
293 : d_compAndAlloc(comparator, basicAllocator)
310 explicit multiset(
const ALLOCATOR& basicAllocator);
329 multiset(BloombergLP::bslmf::MovableRef<multiset> original);
341 const typename type_identity<ALLOCATOR>::type& basicAllocator);
356 multiset(BloombergLP::bslmf::MovableRef<multiset> original,
357 const typename type_identity<ALLOCATOR>::type& basicAllocator);
386 template <
class INPUT_ITERATOR>
389 const COMPARATOR& comparator = COMPARATOR(),
390 const ALLOCATOR& basicAllocator = ALLOCATOR());
391 template <
class INPUT_ITERATOR>
394 const ALLOCATOR& basicAllocator);
415 template <
class RANGE>
420 const COMPARATOR& comparator = COMPARATOR(),
421 const ALLOCATOR& basicAllocator = ALLOCATOR())
422 : d_compAndAlloc(comparator, basicAllocator)
427#if defined(BSLS_LIBRARYFEATURES_HAS_CPP20_CONCEPTS) \
428 && defined(BSLS_LIBRARYFEATURES_HAS_CPP20_RANGES)
429 if constexpr (ranges::sized_range<RANGE>) {
430 constructFromRange(bsl::ranges::begin(range),
431 bsl::ranges::end (range),
432 bsl::ranges::size (range));
436 constructFromRange(bsl::ranges::begin(range),
437 bsl::ranges::end (range));
441 template <
class RANGE>
445 const ALLOCATOR& basicAllocator)
446 : d_compAndAlloc(COMPARATOR(), basicAllocator)
454 nodeFactory().allocator());
455 quickSwapRetainAllocators(other);
458#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
478 multiset(std::initializer_list<KEY> values,
479 const COMPARATOR& comparator = COMPARATOR(),
480 const ALLOCATOR& basicAllocator = ALLOCATOR());
481 multiset(std::initializer_list<KEY> values,
482 const ALLOCATOR& basicAllocator);
502 AllocatorTraits::is_always_equal::value
503 && std::is_nothrow_move_assignable<COMPARATOR>::value);
518#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
607 template <class INPUT_ITERATOR>
608 void insert(INPUT_ITERATOR first, INPUT_ITERATOR last);
610#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
615 void insert(std::initializer_list<KEY> values);
627 template <
class RANGE>
633#if defined(BSLS_LIBRARYFEATURES_HAS_CPP20_CONCEPTS) \
634 && defined(BSLS_LIBRARYFEATURES_HAS_CPP20_RANGES)
635 if constexpr (ranges::sized_range<RANGE>) {
636 insertFromRange(bsl::ranges::begin(range),
637 bsl::ranges::end (range),
638 bsl::ranges::size (range));
642 insertFromRange(bsl::ranges::begin(range),
643 bsl::ranges::end (range));
647#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
650#ifndef BSLSTL_MULTISET_VARIADIC_LIMIT
651#define BSLSTL_MULTISET_VARIADIC_LIMIT 10
653#ifndef BSLSTL_MULTISET_VARIADIC_LIMIT_A
654#define BSLSTL_MULTISET_VARIADIC_LIMIT_A BSLSTL_MULTISET_VARIADIC_LIMIT
656#if BSLSTL_MULTISET_VARIADIC_LIMIT_A >= 0
660#if BSLSTL_MULTISET_VARIADIC_LIMIT_A >= 1
661 template <
class Args_01>
665#if BSLSTL_MULTISET_VARIADIC_LIMIT_A >= 2
666 template <
class Args_01,
672#if BSLSTL_MULTISET_VARIADIC_LIMIT_A >= 3
673 template <
class Args_01,
681#if BSLSTL_MULTISET_VARIADIC_LIMIT_A >= 4
682 template <
class Args_01,
692#if BSLSTL_MULTISET_VARIADIC_LIMIT_A >= 5
693 template <
class Args_01,
705#if BSLSTL_MULTISET_VARIADIC_LIMIT_A >= 6
706 template <
class Args_01,
720#if BSLSTL_MULTISET_VARIADIC_LIMIT_A >= 7
721 template <
class Args_01,
737#if BSLSTL_MULTISET_VARIADIC_LIMIT_A >= 8
738 template <
class Args_01,
756#if BSLSTL_MULTISET_VARIADIC_LIMIT_A >= 9
757 template <
class Args_01,
777#if BSLSTL_MULTISET_VARIADIC_LIMIT_A >= 10
778 template <
class Args_01,
801#if BSLSTL_MULTISET_VARIADIC_LIMIT_A >= 0
805#if BSLSTL_MULTISET_VARIADIC_LIMIT_A >= 1
806 template <
class Args_01>
811#if BSLSTL_MULTISET_VARIADIC_LIMIT_A >= 2
812 template <
class Args_01,
819#if BSLSTL_MULTISET_VARIADIC_LIMIT_A >= 3
820 template <
class Args_01,
829#if BSLSTL_MULTISET_VARIADIC_LIMIT_A >= 4
830 template <
class Args_01,
841#if BSLSTL_MULTISET_VARIADIC_LIMIT_A >= 5
842 template <
class Args_01,
855#if BSLSTL_MULTISET_VARIADIC_LIMIT_A >= 6
856 template <
class Args_01,
871#if BSLSTL_MULTISET_VARIADIC_LIMIT_A >= 7
872 template <
class Args_01,
889#if BSLSTL_MULTISET_VARIADIC_LIMIT_A >= 8
890 template <
class Args_01,
909#if BSLSTL_MULTISET_VARIADIC_LIMIT_A >= 9
910 template <
class Args_01,
931#if BSLSTL_MULTISET_VARIADIC_LIMIT_A >= 10
932 template <
class Args_01,
958 template <
class... Args>
961 template <
class... Args>
986 template <
class t_KEY>
988 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1019 AllocatorTraits::is_always_equal::value
1020 && bsl::is_nothrow_swappable<COMPARATOR>::value);
1057 return iterator(BloombergLP::bslalg::RbTreeUtil::find(
1058 d_tree, this->comparator(), key));
1067 template <
class LOOKUP_KEY>
1069 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1072 find(
const LOOKUP_KEY& key)
1074 return iterator(BloombergLP::bslalg::RbTreeUtil::find(
1075 d_tree, this->comparator(), key));
1091 return iterator(BloombergLP::bslalg::RbTreeUtil::lowerBound(
1092 d_tree, this->comparator(), key));
1106 template <
class LOOKUP_KEY>
1108 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1113 return iterator(BloombergLP::bslalg::RbTreeUtil::lowerBound(
1114 d_tree, this->comparator(), key));
1130 return iterator(BloombergLP::bslalg::RbTreeUtil::upperBound(
1131 d_tree, this->comparator(), key));
1145 template <
class LOOKUP_KEY>
1147 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1152 return iterator(BloombergLP::bslalg::RbTreeUtil::upperBound(
1153 d_tree, this->comparator(), key));
1171 if (endIt !=
end() && !comparator()(key, *endIt.node())) {
1174 return pair<iterator, iterator>(startIt, endIt);
1187 template <
class LOOKUP_KEY>
1189 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1191 pair<iterator, iterator> >::type
1196 if (endIt !=
end() && !comparator()(key, *endIt.node())) {
1199 return pair<iterator, iterator>(startIt, endIt);
1262 template <class LOOKUP_KEY>
1263 typename
bsl::enable_if<
1264 BloombergLP::
bslmf::IsTransparentPredicate<COMPARATOR,
1267 contains(const LOOKUP_KEY& key)
const
1313 d_tree, this->comparator(), key));
1322 template <
class LOOKUP_KEY>
1324 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1327 find(
const LOOKUP_KEY& key)
const
1330 d_tree, this->comparator(), key));
1342 while (it !=
end() && !comparator()(key, *it.node())) {
1353 template <
class LOOKUP_KEY>
1355 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1358 count(
const LOOKUP_KEY& key)
const
1363 while (it !=
end() && !comparator()(key, *it.node())) {
1383 return iterator(BloombergLP::bslalg::RbTreeUtil::lowerBound(
1384 d_tree, this->comparator(), key));
1398 template <
class LOOKUP_KEY>
1400 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1405 return const_iterator(BloombergLP::bslalg::RbTreeUtil::lowerBound(
1406 d_tree, this->comparator(), key));
1422 return const_iterator(BloombergLP::bslalg::RbTreeUtil::upperBound(
1423 d_tree, this->comparator(), key));
1437 template <
class LOOKUP_KEY>
1439 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1444 return const_iterator(BloombergLP::bslalg::RbTreeUtil::upperBound(
1445 d_tree, this->comparator(), key));
1464 if (endIt !=
end() && !comparator()(key, *endIt.node())) {
1467 return pair<const_iterator, const_iterator>(startIt, endIt);
1481 template <
class LOOKUP_KEY>
1483 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1485 pair<const_iterator, const_iterator> >::type
1490 if (endIt !=
end() && !comparator()(key, *endIt.node())) {
1493 return pair<const_iterator, const_iterator>(startIt, endIt);
1499#ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
1509 class INPUT_ITERATOR,
1511 typename BloombergLP::bslstl::IteratorUtil::IterVal_t<INPUT_ITERATOR>,
1512 class COMPARATOR = std::less<KEY>,
1514 class = bsl::enable_if_t<!bsl::IsStdAllocator_v<COMPARATOR>>,
1515 class = bsl::enable_if_t<
bsl::IsStdAllocator_v<ALLOCATOR>>
1517multiset(INPUT_ITERATOR,
1519 COMPARATOR = COMPARATOR(),
1520 ALLOCATOR = ALLOCATOR())
1521-> multiset<KEY, COMPARATOR, ALLOCATOR>;
1529 class INPUT_ITERATOR,
1533 typename BloombergLP::bslstl::IteratorUtil::IterVal_t<INPUT_ITERATOR>,
1534 class DEFAULT_ALLOCATOR = bsl::allocator<KEY>,
1535 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
1537multiset(INPUT_ITERATOR, INPUT_ITERATOR, COMPARATOR, ALLOC *)
1538-> multiset<KEY, COMPARATOR>;
1546 class INPUT_ITERATOR,
1549 typename BloombergLP::bslstl::IteratorUtil::IterVal_t<INPUT_ITERATOR>,
1550 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
1552multiset(INPUT_ITERATOR, INPUT_ITERATOR, ALLOCATOR)
1553-> multiset<KEY, std::less<KEY>, ALLOCATOR>;
1560 class INPUT_ITERATOR,
1563 typename BloombergLP::bslstl::IteratorUtil::IterVal_t<INPUT_ITERATOR>,
1564 class DEFAULT_ALLOCATOR = bsl::allocator<KEY>,
1565 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
1567multiset(INPUT_ITERATOR, INPUT_ITERATOR, ALLOC *)
1576 class COMPARATOR = std::less<KEY>,
1577 class ALLOCATOR = bsl::allocator<KEY>,
1578 class = bsl::enable_if_t<!bsl::IsStdAllocator_v<COMPARATOR>>,
1579 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
1581multiset(std::initializer_list<KEY>,
1582 COMPARATOR = COMPARATOR(),
1583 ALLOCATOR = ALLOCATOR())
1584-> multiset<KEY, COMPARATOR, ALLOCATOR>;
1595 class DEFAULT_ALLOCATOR = bsl::allocator<KEY>,
1596 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
1598multiset(std::initializer_list<KEY>, COMPARATOR, ALLOC *)
1599-> multiset<KEY, COMPARATOR>;
1608 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
1610multiset(std::initializer_list<KEY>, ALLOCATOR)
1611-> multiset<KEY, std::less<KEY>, ALLOCATOR>;
1620 class DEFAULT_ALLOCATOR = bsl::allocator<KEY>,
1621 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
1623multiset(std::initializer_list<KEY>, ALLOC *)
1637template <class KEY, class COMPARATOR, class ALLOCATOR>
1638bool operator==(const multiset<KEY, COMPARATOR, ALLOCATOR>& lhs,
1639 const multiset<KEY, COMPARATOR, ALLOCATOR>& rhs);
1641#ifndef BSLS_COMPILERFEATURES_SUPPORT_THREE_WAY_COMPARISON
1642template <class KEY, class COMPARATOR, class ALLOCATOR>
1643bool operator!=(const multiset<KEY, COMPARATOR, ALLOCATOR>& lhs,
1644 const multiset<KEY, COMPARATOR, ALLOCATOR>& rhs);
1654#ifdef BSLALG_SYNTHTHREEWAYUTIL_AVAILABLE
1659template <class KEY, class COMPARATOR, class ALLOCATOR>
1660BloombergLP::bslalg::SynthThreeWayUtil::Result<KEY>
1661operator<=>(const multiset<KEY, COMPARATOR, ALLOCATOR>& lhs,
1662 const multiset<KEY, COMPARATOR, ALLOCATOR>& rhs);
1666template <class KEY, class COMPARATOR, class ALLOCATOR>
1667bool operator< (const multiset<KEY, COMPARATOR, ALLOCATOR>& lhs,
1668 const multiset<KEY, COMPARATOR, ALLOCATOR>& rhs);
1681template <class KEY, class COMPARATOR, class ALLOCATOR>
1682bool operator> (const multiset<KEY, COMPARATOR, ALLOCATOR>& lhs,
1683 const multiset<KEY, COMPARATOR, ALLOCATOR>& rhs);
1692template <class KEY, class COMPARATOR, class ALLOCATOR>
1693bool operator<=(const multiset<KEY, COMPARATOR, ALLOCATOR>& lhs,
1694 const multiset<KEY, COMPARATOR, ALLOCATOR>& rhs);
1703template <class KEY, class COMPARATOR, class ALLOCATOR>
1704bool operator>=(const multiset<KEY, COMPARATOR, ALLOCATOR>& lhs,
1705 const multiset<KEY, COMPARATOR, ALLOCATOR>& rhs);
1720template <class KEY, class COMPARATOR, class ALLOCATOR, class PREDICATE>
1721typename multiset<KEY, COMPARATOR, ALLOCATOR>::size_type
1722erase_if(multiset<KEY, COMPARATOR, ALLOCATOR>& ms, PREDICATE predicate);
1724template <class KEY, class COMPARATOR, class ALLOCATOR>
1725void
swap(multiset<KEY, COMPARATOR, ALLOCATOR>& a,
1726 multiset<KEY, COMPARATOR, ALLOCATOR>& b)
1728 BSLS_KEYWORD_NOEXCEPT_OPERATOR(a.swap(b)));
1756template <class KEY, class COMPARATOR, class ALLOCATOR>
1758multiset<KEY, COMPARATOR, ALLOCATOR>::DataWrapper::DataWrapper(
1759 const COMPARATOR& comparator,
1760 const ALLOCATOR& basicAllocator)
1762, d_pool(basicAllocator)
1766template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1768multiset<KEY, COMPARATOR, ALLOCATOR>::DataWrapper::DataWrapper(
1769 BloombergLP::bslmf::MovableRef<DataWrapper> original)
1770: ::
bsl::multiset<KEY, COMPARATOR, ALLOCATOR>::Comparator(
1771 MoveUtil::access(original).keyComparator())
1772, d_pool(MoveUtil::move(MoveUtil::access(original).d_pool))
1777template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1779typename multiset<KEY, COMPARATOR, ALLOCATOR>::NodeFactory&
1780multiset<KEY, COMPARATOR, ALLOCATOR>::DataWrapper::nodeFactory()
1786template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1788const typename multiset<KEY, COMPARATOR, ALLOCATOR>::NodeFactory&
1789multiset<KEY, COMPARATOR, ALLOCATOR>::DataWrapper::nodeFactory()
const
1798template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1800typename multiset<KEY, COMPARATOR, ALLOCATOR>::Comparator&
1801multiset<KEY, COMPARATOR, ALLOCATOR>::comparator()
1803 return d_compAndAlloc;
1806template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1808typename multiset<KEY, COMPARATOR, ALLOCATOR>::NodeFactory&
1809multiset<KEY, COMPARATOR, ALLOCATOR>::nodeFactory()
1811 return d_compAndAlloc.nodeFactory();
1814template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1816void multiset<KEY, COMPARATOR, ALLOCATOR>::quickSwapExchangeAllocators(
1819 BloombergLP::bslalg::RbTreeUtil::swap(&d_tree, &other.d_tree);
1820 nodeFactory().swapExchangeAllocators(other.nodeFactory());
1828 if (
sizeof(NodeFactory) !=
sizeof(DataWrapper)) {
1829 comparator().swap(other.comparator());
1833template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1835void multiset<KEY, COMPARATOR, ALLOCATOR>::quickSwapRetainAllocators(
1838 BloombergLP::bslalg::RbTreeUtil::swap(&d_tree, &other.d_tree);
1839 nodeFactory().swapRetainAllocators(other.nodeFactory());
1843 if (
sizeof(NodeFactory) !=
sizeof(DataWrapper)) {
1844 comparator().swap(other.comparator());
1848template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1849template <
class INPUT_ITERATOR,
class SENTINEL>
1852multiset<KEY, COMPARATOR, ALLOCATOR>::constructFromRange(INPUT_ITERATOR first,
1855 if (first == last) {
1860 BloombergLP::bslstl::IteratorUtil::
1861 canCalculateInsertDistance<INPUT_ITERATOR, SENTINEL>()) {
1862 const size_type numElements =
static_cast<size_type
>(
1863 BloombergLP::bslstl::IteratorUtil::insertDistance(first, last));
1864 nodeFactory().reserveNodes(numElements);
1867 BloombergLP::bslalg::RbTreeUtilTreeProctor<NodeFactory> proctor(
1878 BloombergLP::bslalg::RbTreeNode *prevNode = d_tree.rootNode();
1880 while (++first != last) {
1882 const value_type& value = *first;
1883 if (this->comparator()(value, *prevNode)) {
1886 insertFromRange(++first, last);
1890 if (this->comparator()(*prevNode, value)) {
1891 BloombergLP::bslalg::RbTreeNode *node =
1892 nodeFactory().emplaceIntoNewNode(value);
1893 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
1904#if defined(BSLS_LIBRARYFEATURES_HAS_CPP20_CONCEPTS) \
1905 && defined(BSLS_LIBRARYFEATURES_HAS_CPP20_RANGES)
1907template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1908template <
class INPUT_ITERATOR,
class SENTINEL>
1910void multiset<KEY, COMPARATOR, ALLOCATOR>::constructFromRange(
1911 INPUT_ITERATOR first,
1917 !BloombergLP::bslstl::IteratorUtil
1918 ::canCalculateInsertDistance<INPUT_ITERATOR, SENTINEL>()
1919 || numElements ==
static_cast<size_type
>(
1920 BloombergLP::bslstl::IteratorUtil::insertDistance(first, last))));
1922 if (first == last) {
1926 if (0 < numElements) {
1927 nodeFactory().reserveNodes(numElements);
1930 BloombergLP::bslalg::RbTreeUtilTreeProctor<NodeFactory> proctor(
1940 insert(*first); --numElements;
1941 BloombergLP::bslalg::RbTreeNode *prevNode = d_tree.rootNode();
1943 while (++first != last) {
1945 const value_type& value = *first;
1946 if (this->comparator()(value, *prevNode)) {
1948 insert(value); --numElements;
1949 insertFromRange(++first, last, numElements);
1953 if (this->comparator()(*prevNode, value)) {
1954 BloombergLP::bslalg::RbTreeNode *node =
1955 nodeFactory().emplaceIntoNewNode(value);
1956 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
1970template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1971template <
class INPUT_ITERATOR,
class SENTINEL>
1974multiset<KEY, COMPARATOR, ALLOCATOR>::insertFromRange(INPUT_ITERATOR first,
1993 while (first != last) {
1995 if (BloombergLP::bslstl::IteratorUtil
1996 ::canCalculateInsertDistance<INPUT_ITERATOR, SENTINEL>()
1998 !nodeFactory().hasFreeNodes())) {
1999 nodeFactory().reserveNodes(
2000 BloombergLP::bslstl::IteratorUtil::insertDistance(first, last));
2008#if defined(BSLS_LIBRARYFEATURES_HAS_CPP20_CONCEPTS) \
2009 && defined(BSLS_LIBRARYFEATURES_HAS_CPP20_RANGES)
2011template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2012template <
class INPUT_ITERATOR,
class SENTINEL>
2014void multiset<KEY, COMPARATOR, ALLOCATOR>::insertFromRange(
2015 INPUT_ITERATOR first,
2020 !BloombergLP::bslstl::IteratorUtil
2021 ::canCalculateInsertDistance<INPUT_ITERATOR, SENTINEL>()
2022 || numElements ==
static_cast<size_type
>(
2023 BloombergLP::bslstl::IteratorUtil::insertDistance(first, last))));
2025 while (first != last) {
2028 !nodeFactory().hasFreeNodes())) {
2029 nodeFactory().reserveNodes(numElements);
2041template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2043const typename multiset<KEY, COMPARATOR, ALLOCATOR>::Comparator&
2044multiset<KEY, COMPARATOR, ALLOCATOR>::comparator()
const
2046 return d_compAndAlloc;
2049template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2051const typename multiset<KEY, COMPARATOR, ALLOCATOR>::NodeFactory&
2052multiset<KEY, COMPARATOR, ALLOCATOR>::nodeFactory()
const
2054 return d_compAndAlloc.nodeFactory();
2058template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2060multiset<KEY, COMPARATOR, ALLOCATOR>::multiset()
2061: d_compAndAlloc(COMPARATOR(), ALLOCATOR())
2066template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2068multiset<KEY, COMPARATOR, ALLOCATOR>::multiset(
const ALLOCATOR& basicAllocator)
2069: d_compAndAlloc(COMPARATOR(), basicAllocator)
2074template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2076multiset<KEY, COMPARATOR, ALLOCATOR>::multiset(
const multiset& original)
2077: d_compAndAlloc(original.comparator().keyComparator(),
2078 AllocatorTraits::select_on_container_copy_construction(
2079 original.nodeFactory().allocator()))
2082 if (0 < original.size()) {
2083 nodeFactory().reserveNodes(original.size());
2084 BloombergLP::bslalg::RbTreeUtil::copyTree(&d_tree,
2090template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2092multiset<KEY, COMPARATOR, ALLOCATOR>::multiset(
2093 BloombergLP::bslmf::MovableRef<multiset> original)
2094: d_compAndAlloc(MoveUtil::move(MoveUtil::access(original).d_compAndAlloc))
2097 multiset& lvalue = original;
2098 BloombergLP::bslalg::RbTreeUtil::swap(&d_tree, &lvalue.d_tree);
2101template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2103multiset<KEY, COMPARATOR, ALLOCATOR>::multiset(
const multiset& original,
2104 const typename type_identity<ALLOCATOR>::type& basicAllocator)
2105: d_compAndAlloc(original.comparator().keyComparator(), basicAllocator)
2108 if (0 < original.size()) {
2109 nodeFactory().reserveNodes(original.size());
2110 BloombergLP::bslalg::RbTreeUtil::copyTree(&d_tree,
2116template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2118multiset<KEY, COMPARATOR, ALLOCATOR>::multiset(
2119 BloombergLP::bslmf::MovableRef<multiset> original,
2120 const typename type_identity<ALLOCATOR>::type& basicAllocator)
2121: d_compAndAlloc(MoveUtil::access(original).comparator().keyComparator(),
2125 multiset& lvalue = original;
2128 nodeFactory().allocator() == lvalue.nodeFactory().allocator())) {
2129 d_compAndAlloc.nodeFactory().adopt(
2130 MoveUtil::move(lvalue.d_compAndAlloc.nodeFactory()));
2131 BloombergLP::bslalg::RbTreeUtil::swap(&d_tree, &lvalue.d_tree);
2134 if (0 < lvalue.size()) {
2135 nodeFactory().reserveNodes(lvalue.size());
2136 BloombergLP::bslalg::RbTreeUtil::moveTree(&d_tree,
2139 &lvalue.nodeFactory());
2144template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2145template <
class INPUT_ITERATOR>
2147multiset<KEY, COMPARATOR, ALLOCATOR>::multiset(
2148 INPUT_ITERATOR first,
2149 INPUT_ITERATOR last,
2150 const COMPARATOR& comparator,
2151 const ALLOCATOR& basicAllocator)
2152: d_compAndAlloc(comparator, basicAllocator)
2155 if (first != last) {
2157 const size_type numElements =
static_cast<size_type
>(
2158 BloombergLP::bslstl::IteratorUtil::insertDistance(first, last));
2160 if (0 < numElements) {
2161 nodeFactory().reserveNodes(numElements);
2164 BloombergLP::bslalg::RbTreeUtilTreeProctor<NodeFactory> proctor(
2175 BloombergLP::bslalg::RbTreeNode *prevNode = d_tree.rootNode();
2176 while (++first != last) {
2179 const value_type& value = *first;
2180 if (this->comparator()(value, *prevNode)) {
2182 insert(++first, last);
2185 BloombergLP::bslalg::RbTreeNode *node =
2186 nodeFactory().emplaceIntoNewNode(value);
2187 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2198template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2199template <
class INPUT_ITERATOR>
2201multiset<KEY, COMPARATOR, ALLOCATOR>::multiset(
2202 INPUT_ITERATOR first,
2203 INPUT_ITERATOR last,
2204 const ALLOCATOR& basicAllocator)
2205: d_compAndAlloc(COMPARATOR(), basicAllocator)
2208 if (first != last) {
2210 const size_type numElements =
static_cast<size_type
>(
2211 BloombergLP::bslstl::IteratorUtil::insertDistance(first, last));
2213 if (0 < numElements) {
2214 nodeFactory().reserveNodes(numElements);
2217 BloombergLP::bslalg::RbTreeUtilTreeProctor<NodeFactory> proctor(
2228 BloombergLP::bslalg::RbTreeNode *prevNode = d_tree.rootNode();
2229 while (++first != last) {
2232 const value_type& value = *first;
2233 if (this->comparator()(value, *prevNode)) {
2235 insert(++first, last);
2238 BloombergLP::bslalg::RbTreeNode *node =
2239 nodeFactory().emplaceIntoNewNode(value);
2240 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2251#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
2252template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2254multiset<KEY, COMPARATOR, ALLOCATOR>::multiset(
2255 std::initializer_list<KEY> values,
2256 const COMPARATOR& comparator,
2257 const ALLOCATOR& basicAllocator)
2258: multiset(values.
begin(), values.
end(), comparator, basicAllocator)
2262template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2264multiset<KEY, COMPARATOR, ALLOCATOR>::multiset(
2265 std::initializer_list<KEY> values,
2266 const ALLOCATOR& basicAllocator)
2267: multiset(values.
begin(), values.
end(), COMPARATOR(), basicAllocator)
2272template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2274multiset<KEY, COMPARATOR, ALLOCATOR>::~multiset()
2280template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2282multiset<KEY, COMPARATOR, ALLOCATOR>&
2283multiset<KEY, COMPARATOR, ALLOCATOR>::operator=(
const multiset& rhs)
2286 if (AllocatorTraits::propagate_on_container_copy_assignment::value) {
2287 multiset other(rhs,
rhs.nodeFactory().allocator());
2288 quickSwapExchangeAllocators(other);
2291 multiset other(rhs, nodeFactory().allocator());
2292 quickSwapRetainAllocators(other);
2298template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2300multiset<KEY, COMPARATOR, ALLOCATOR>&
2301multiset<KEY, COMPARATOR, ALLOCATOR>::operator=(
2302 BloombergLP::bslmf::MovableRef<multiset> rhs)
2304 AllocatorTraits::is_always_equal::value
2305 && std::is_nothrow_move_assignable<COMPARATOR>::value)
2307 multiset& lvalue =
rhs;
2310 if (nodeFactory().allocator() == lvalue.nodeFactory().allocator()) {
2311 multiset other(MoveUtil::move(lvalue));
2312 quickSwapRetainAllocators(other);
2315 AllocatorTraits::propagate_on_container_move_assignment::value) {
2316 multiset other(MoveUtil::move(lvalue));
2317 quickSwapExchangeAllocators(other);
2320 multiset other(MoveUtil::move(lvalue), nodeFactory().allocator());
2321 quickSwapRetainAllocators(other);
2327#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
2328template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2330multiset<KEY, COMPARATOR, ALLOCATOR>&
2331multiset<KEY, COMPARATOR, ALLOCATOR>::operator=(
2332 std::initializer_list<KEY> values)
2335 insert(values.begin(), values.end());
2340template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2342typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
2345 return iterator(d_tree.firstNode());
2348template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2350typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
2353 return iterator(d_tree.sentinel());
2356template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2358typename multiset<KEY, COMPARATOR, ALLOCATOR>::reverse_iterator
2361 return reverse_iterator(
end());
2364template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2366typename multiset<KEY, COMPARATOR, ALLOCATOR>::reverse_iterator
2369 return reverse_iterator(
begin());
2372template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2374typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
2375multiset<KEY, COMPARATOR, ALLOCATOR>::insert(
const value_type& value)
2379 BloombergLP::bslalg::RbTreeNode *insertLocation =
2380 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(&leftChild,
2385 BloombergLP::bslalg::RbTreeNode *node =
2386 nodeFactory().emplaceIntoNewNode(value);
2388 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2392 return iterator(node);
2395template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2397typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
2398multiset<KEY, COMPARATOR, ALLOCATOR>::insert(
2399 BloombergLP::bslmf::MovableRef<value_type> value)
2401 value_type& lvalue = value;
2404 BloombergLP::bslalg::RbTreeNode *insertLocation =
2405 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(&leftChild,
2410 BloombergLP::bslalg::RbTreeNode *node =
2411 nodeFactory().emplaceIntoNewNode(MoveUtil::move(lvalue));
2413 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2417 return iterator(node);
2420template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2422typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
2423multiset<KEY, COMPARATOR, ALLOCATOR>::insert(const_iterator hint,
2424 const value_type& value)
2428 BloombergLP::bslalg::RbTreeNode *hintNode =
2429 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
2431 BloombergLP::bslalg::RbTreeNode *insertLocation =
2432 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(&leftChild,
2438 BloombergLP::bslalg::RbTreeNode *node =
2439 nodeFactory().emplaceIntoNewNode(value);
2441 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2445 return iterator(node);
2448template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2450typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
2451multiset<KEY, COMPARATOR, ALLOCATOR>::insert(
2452 const_iterator hint,
2453 BloombergLP::bslmf::MovableRef<value_type> value)
2455 value_type& lvalue = value;
2458 BloombergLP::bslalg::RbTreeNode *hintNode =
2459 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
2461 BloombergLP::bslalg::RbTreeNode *insertLocation =
2462 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(&leftChild,
2468 BloombergLP::bslalg::RbTreeNode *node =
2469 nodeFactory().emplaceIntoNewNode(MoveUtil::move(lvalue));
2471 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2475 return iterator(node);
2478template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2479template <
class INPUT_ITERATOR>
2481void multiset<KEY, COMPARATOR, ALLOCATOR>::insert(INPUT_ITERATOR first,
2482 INPUT_ITERATOR last)
2492 while (first != last) {
2493 if (BloombergLP::bslstl::IteratorUtil::
2494 canCalculateInsertDistance<INPUT_ITERATOR,INPUT_ITERATOR>()
2496 !nodeFactory().hasFreeNodes())) {
2497 const size_type numElements =
static_cast<size_type
>(
2498 BloombergLP::bslstl::IteratorUtil::insertDistance(first, last));
2500 nodeFactory().reserveNodes(numElements);
2507#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
2508template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2510void multiset<KEY, COMPARATOR, ALLOCATOR>::insert(
2511 std::initializer_list<KEY> values)
2513 insert(values.begin(), values.end());
2517#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
2520#ifndef BSLSTL_MULTISET_VARIADIC_LIMIT
2521#define BSLSTL_MULTISET_VARIADIC_LIMIT 10
2523#ifndef BSLSTL_MULTISET_VARIADIC_LIMIT_B
2524#define BSLSTL_MULTISET_VARIADIC_LIMIT_B BSLSTL_MULTISET_VARIADIC_LIMIT
2526#if BSLSTL_MULTISET_VARIADIC_LIMIT_B >= 0
2527template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2529typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
2530multiset<KEY, COMPARATOR, ALLOCATOR>::emplace(
2535 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2538 BloombergLP::bslalg::RbTreeNode *insertLocation =
2539 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(&leftChild,
2542 static_cast<const Node *
>(node)->value());
2544 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2548 return iterator(node);
2552#if BSLSTL_MULTISET_VARIADIC_LIMIT_B >= 1
2553template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2554template <
class Args_01>
2556typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
2557multiset<KEY, COMPARATOR, ALLOCATOR>::emplace(
2562 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2565 BloombergLP::bslalg::RbTreeNode *insertLocation =
2566 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(&leftChild,
2569 static_cast<const Node *
>(node)->value());
2571 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2575 return iterator(node);
2579#if BSLSTL_MULTISET_VARIADIC_LIMIT_B >= 2
2580template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2581template <
class Args_01,
2584typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
2585multiset<KEY, COMPARATOR, ALLOCATOR>::emplace(
2591 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2595 BloombergLP::bslalg::RbTreeNode *insertLocation =
2596 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(&leftChild,
2599 static_cast<const Node *
>(node)->value());
2601 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2605 return iterator(node);
2609#if BSLSTL_MULTISET_VARIADIC_LIMIT_B >= 3
2610template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2611template <
class Args_01,
2615typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
2616multiset<KEY, COMPARATOR, ALLOCATOR>::emplace(
2623 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2628 BloombergLP::bslalg::RbTreeNode *insertLocation =
2629 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(&leftChild,
2632 static_cast<const Node *
>(node)->value());
2634 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2638 return iterator(node);
2642#if BSLSTL_MULTISET_VARIADIC_LIMIT_B >= 4
2643template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2644template <
class Args_01,
2649typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
2650multiset<KEY, COMPARATOR, ALLOCATOR>::emplace(
2658 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2664 BloombergLP::bslalg::RbTreeNode *insertLocation =
2665 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(&leftChild,
2668 static_cast<const Node *
>(node)->value());
2670 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2674 return iterator(node);
2678#if BSLSTL_MULTISET_VARIADIC_LIMIT_B >= 5
2679template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2680template <
class Args_01,
2686typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
2687multiset<KEY, COMPARATOR, ALLOCATOR>::emplace(
2696 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2703 BloombergLP::bslalg::RbTreeNode *insertLocation =
2704 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(&leftChild,
2707 static_cast<const Node *
>(node)->value());
2709 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2713 return iterator(node);
2717#if BSLSTL_MULTISET_VARIADIC_LIMIT_B >= 6
2718template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2719template <
class Args_01,
2726typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
2727multiset<KEY, COMPARATOR, ALLOCATOR>::emplace(
2737 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2745 BloombergLP::bslalg::RbTreeNode *insertLocation =
2746 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(&leftChild,
2749 static_cast<const Node *
>(node)->value());
2751 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2755 return iterator(node);
2759#if BSLSTL_MULTISET_VARIADIC_LIMIT_B >= 7
2760template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2761template <
class Args_01,
2769typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
2770multiset<KEY, COMPARATOR, ALLOCATOR>::emplace(
2781 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2790 BloombergLP::bslalg::RbTreeNode *insertLocation =
2791 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(&leftChild,
2794 static_cast<const Node *
>(node)->value());
2796 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2800 return iterator(node);
2804#if BSLSTL_MULTISET_VARIADIC_LIMIT_B >= 8
2805template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2806template <
class Args_01,
2815typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
2816multiset<KEY, COMPARATOR, ALLOCATOR>::emplace(
2828 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2838 BloombergLP::bslalg::RbTreeNode *insertLocation =
2839 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(&leftChild,
2842 static_cast<const Node *
>(node)->value());
2844 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2848 return iterator(node);
2852#if BSLSTL_MULTISET_VARIADIC_LIMIT_B >= 9
2853template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2854template <
class Args_01,
2864typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
2865multiset<KEY, COMPARATOR, ALLOCATOR>::emplace(
2878 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2889 BloombergLP::bslalg::RbTreeNode *insertLocation =
2890 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(&leftChild,
2893 static_cast<const Node *
>(node)->value());
2895 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2899 return iterator(node);
2903#if BSLSTL_MULTISET_VARIADIC_LIMIT_B >= 10
2904template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2905template <
class Args_01,
2916typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
2917multiset<KEY, COMPARATOR, ALLOCATOR>::emplace(
2931 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2943 BloombergLP::bslalg::RbTreeNode *insertLocation =
2944 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(&leftChild,
2947 static_cast<const Node *
>(node)->value());
2949 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2953 return iterator(node);
2958#if BSLSTL_MULTISET_VARIADIC_LIMIT_B >= 0
2959template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2961typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
2962multiset<KEY, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint)
2966 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2969 BloombergLP::bslalg::RbTreeNode *hintNode =
2970 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
2972 BloombergLP::bslalg::RbTreeNode *insertLocation =
2973 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(&leftChild,
2976 static_cast<const Node *
>(node)->value(),
2979 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2983 return iterator(node);
2987#if BSLSTL_MULTISET_VARIADIC_LIMIT_B >= 1
2988template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2989template <
class Args_01>
2991typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
2992multiset<KEY, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
2997 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
3000 BloombergLP::bslalg::RbTreeNode *hintNode =
3001 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
3003 BloombergLP::bslalg::RbTreeNode *insertLocation =
3004 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(&leftChild,
3007 static_cast<const Node *
>(node)->value(),
3010 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
3014 return iterator(node);
3018#if BSLSTL_MULTISET_VARIADIC_LIMIT_B >= 2
3019template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3020template <
class Args_01,
3023typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
3024multiset<KEY, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
3030 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
3034 BloombergLP::bslalg::RbTreeNode *hintNode =
3035 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
3037 BloombergLP::bslalg::RbTreeNode *insertLocation =
3038 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(&leftChild,
3041 static_cast<const Node *
>(node)->value(),
3044 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
3048 return iterator(node);
3052#if BSLSTL_MULTISET_VARIADIC_LIMIT_B >= 3
3053template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3054template <
class Args_01,
3058typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
3059multiset<KEY, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
3066 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
3071 BloombergLP::bslalg::RbTreeNode *hintNode =
3072 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
3074 BloombergLP::bslalg::RbTreeNode *insertLocation =
3075 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(&leftChild,
3078 static_cast<const Node *
>(node)->value(),
3081 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
3085 return iterator(node);
3089#if BSLSTL_MULTISET_VARIADIC_LIMIT_B >= 4
3090template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3091template <
class Args_01,
3096typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
3097multiset<KEY, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
3105 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
3111 BloombergLP::bslalg::RbTreeNode *hintNode =
3112 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
3114 BloombergLP::bslalg::RbTreeNode *insertLocation =
3115 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(&leftChild,
3118 static_cast<const Node *
>(node)->value(),
3121 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
3125 return iterator(node);
3129#if BSLSTL_MULTISET_VARIADIC_LIMIT_B >= 5
3130template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3131template <
class Args_01,
3137typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
3138multiset<KEY, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
3147 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
3154 BloombergLP::bslalg::RbTreeNode *hintNode =
3155 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
3157 BloombergLP::bslalg::RbTreeNode *insertLocation =
3158 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(&leftChild,
3161 static_cast<const Node *
>(node)->value(),
3164 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
3168 return iterator(node);
3172#if BSLSTL_MULTISET_VARIADIC_LIMIT_B >= 6
3173template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3174template <
class Args_01,
3181typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
3182multiset<KEY, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
3192 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
3200 BloombergLP::bslalg::RbTreeNode *hintNode =
3201 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
3203 BloombergLP::bslalg::RbTreeNode *insertLocation =
3204 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(&leftChild,
3207 static_cast<const Node *
>(node)->value(),
3210 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
3214 return iterator(node);
3218#if BSLSTL_MULTISET_VARIADIC_LIMIT_B >= 7
3219template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3220template <
class Args_01,
3228typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
3229multiset<KEY, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
3240 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
3249 BloombergLP::bslalg::RbTreeNode *hintNode =
3250 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
3252 BloombergLP::bslalg::RbTreeNode *insertLocation =
3253 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(&leftChild,
3256 static_cast<const Node *
>(node)->value(),
3259 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
3263 return iterator(node);
3267#if BSLSTL_MULTISET_VARIADIC_LIMIT_B >= 8
3268template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3269template <
class Args_01,
3278typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
3279multiset<KEY, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
3291 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
3301 BloombergLP::bslalg::RbTreeNode *hintNode =
3302 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
3304 BloombergLP::bslalg::RbTreeNode *insertLocation =
3305 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(&leftChild,
3308 static_cast<const Node *
>(node)->value(),
3311 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
3315 return iterator(node);
3319#if BSLSTL_MULTISET_VARIADIC_LIMIT_B >= 9
3320template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3321template <
class Args_01,
3331typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
3332multiset<KEY, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
3345 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
3356 BloombergLP::bslalg::RbTreeNode *hintNode =
3357 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
3359 BloombergLP::bslalg::RbTreeNode *insertLocation =
3360 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(&leftChild,
3363 static_cast<const Node *
>(node)->value(),
3366 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
3370 return iterator(node);
3374#if BSLSTL_MULTISET_VARIADIC_LIMIT_B >= 10
3375template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3376template <
class Args_01,
3387typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
3388multiset<KEY, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
3402 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
3414 BloombergLP::bslalg::RbTreeNode *hintNode =
3415 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
3417 BloombergLP::bslalg::RbTreeNode *insertLocation =
3418 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(&leftChild,
3421 static_cast<const Node *
>(node)->value(),
3424 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
3428 return iterator(node);
3435template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3436template <
class... Args>
3438typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
3439multiset<KEY, COMPARATOR, ALLOCATOR>::emplace(
3444 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
3447 BloombergLP::bslalg::RbTreeNode *insertLocation =
3448 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(&leftChild,
3451 static_cast<const Node *
>(node)->value());
3453 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
3457 return iterator(node);
3460template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3461template <
class... Args>
3463typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
3464multiset<KEY, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
3469 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
3472 BloombergLP::bslalg::RbTreeNode *hintNode =
3473 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
3475 BloombergLP::bslalg::RbTreeNode *insertLocation =
3476 BloombergLP::bslalg::RbTreeUtil::findInsertLocation(&leftChild,
3479 static_cast<const Node *
>(node)->value(),
3482 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
3486 return iterator(node);
3491template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3493typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
3494multiset<KEY, COMPARATOR, ALLOCATOR>::erase(const_iterator position)
3498 BloombergLP::bslalg::RbTreeNode *node =
3499 const_cast<BloombergLP::bslalg::RbTreeNode *
>(position.node());
3500 BloombergLP::bslalg::RbTreeNode *result =
3501 BloombergLP::bslalg::RbTreeUtil::next(node);
3502 BloombergLP::bslalg::RbTreeUtil::remove(&d_tree, node);
3503 nodeFactory().deleteNode(node);
3504 return iterator(result);
3507template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3509typename multiset<KEY, COMPARATOR, ALLOCATOR>::size_type
3510multiset<KEY, COMPARATOR, ALLOCATOR>::erase(
const key_type& key)
3512 size_type count = 0;
3513 const_iterator first = find(key);
3514 if (first !=
end()) {
3515 const_iterator last = upper_bound(key);
3516 while (first != last) {
3517 first =
erase(first);
3524template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3526typename multiset<KEY, COMPARATOR, ALLOCATOR>::iterator
3527multiset<KEY, COMPARATOR, ALLOCATOR>::erase(const_iterator first,
3528 const_iterator last)
3530 while (first != last) {
3531 first =
erase(first);
3533 return iterator(last.node());
3536template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3538void multiset<KEY, COMPARATOR, ALLOCATOR>::swap(multiset& other)
3540 AllocatorTraits::is_always_equal::value
3541 && bsl::is_nothrow_swappable<COMPARATOR>::value)
3543 if (AllocatorTraits::propagate_on_container_swap::value) {
3544 quickSwapExchangeAllocators(other);
3551 nodeFactory().allocator() == other.nodeFactory().allocator())) {
3552 quickSwapRetainAllocators(other);
3557 multiset toOtherCopy(MoveUtil::move(*
this),
3558 other.nodeFactory().allocator());
3559 multiset toThisCopy(MoveUtil::move(other),
3560 nodeFactory().allocator());
3562 other.quickSwapRetainAllocators(toOtherCopy);
3563 this->quickSwapRetainAllocators(toThisCopy);
3568template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3574 if (d_tree.rootNode()) {
3578 BloombergLP::bslalg::RbTreeUtil::deleteTree(&d_tree, &nodeFactory());
3580#if defined(BSLS_ASSERT_SAFE_IS_USED)
3589template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3591typename multiset<KEY, COMPARATOR, ALLOCATOR>::allocator_type
3592multiset<KEY, COMPARATOR, ALLOCATOR>::get_allocator() const
3595 return nodeFactory().allocator();
3598template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3600typename multiset<KEY, COMPARATOR, ALLOCATOR>::const_iterator
3606template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3608typename multiset<KEY, COMPARATOR, ALLOCATOR>::const_iterator
3614template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3616typename multiset<KEY, COMPARATOR, ALLOCATOR>::const_reverse_iterator
3622template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3624typename multiset<KEY, COMPARATOR, ALLOCATOR>::const_reverse_iterator
3630template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3632typename multiset<KEY, COMPARATOR, ALLOCATOR>::const_iterator
3635 return const_iterator(d_tree.firstNode());
3638template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3640typename multiset<KEY, COMPARATOR, ALLOCATOR>::const_iterator
3643 return const_iterator(d_tree.sentinel());
3646template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3648typename multiset<KEY, COMPARATOR, ALLOCATOR>::const_reverse_iterator
3651 return const_reverse_iterator(
end());
3654template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3656typename multiset<KEY, COMPARATOR, ALLOCATOR>::const_reverse_iterator
3659 return const_reverse_iterator(
begin());
3662template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3664bool multiset<KEY, COMPARATOR, ALLOCATOR>::contains(
const key_type& key)
const
3666 return find(key) !=
end();
3670template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3674 return 0 == d_tree.numNodes();
3677template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3679typename multiset<KEY, COMPARATOR, ALLOCATOR>::size_type
3682 return d_tree.numNodes();
3685template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3687typename multiset<KEY, COMPARATOR, ALLOCATOR>::size_type
3690 return AllocatorTraits::max_size(get_allocator());
3693template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3695typename multiset<KEY, COMPARATOR, ALLOCATOR>::key_compare
3696multiset<KEY, COMPARATOR, ALLOCATOR>::key_comp()
const
3698 return comparator().keyComparator();
3701template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3703typename multiset<KEY, COMPARATOR, ALLOCATOR>::value_compare
3704multiset<KEY, COMPARATOR, ALLOCATOR>::value_comp()
const
3706 return value_compare(key_comp());
3712template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3717 return BloombergLP::bslalg::RangeCompare::equal(
lhs.begin(),
3725#ifndef BSLS_COMPILERFEATURES_SUPPORT_THREE_WAY_COMPARISON
3726template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3735#ifdef BSLALG_SYNTHTHREEWAYUTIL_AVAILABLE
3737template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3739BloombergLP::bslalg::SynthThreeWayUtil::Result<KEY>
3740bsl::operator<=>(
const multiset<KEY, COMPARATOR, ALLOCATOR>& lhs,
3741 const multiset<KEY, COMPARATOR, ALLOCATOR>& rhs)
3743 return bsl::lexicographical_compare_three_way(
3748 BloombergLP::bslalg::SynthThreeWayUtil::compare);
3753template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3758 return 0 > BloombergLP::bslalg::RangeCompare::lexicographical(
lhs.begin(),
3766template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3774template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3782template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3793template <
class KEY,
class COMPARATOR,
class ALLOCATOR,
class PREDICATE>
3796bsl::erase_if(multiset<KEY, COMPARATOR, ALLOCATOR>& ms, PREDICATE predicate)
3798 return BloombergLP::bslstl::AlgorithmUtil::containerEraseIf(ms, predicate);
3801template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3824template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3825struct HasStlIterators<
bsl::multiset<KEY, COMPARATOR, ALLOCATOR> >
3833template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3834struct UsesBslmaAllocator<
bsl::multiset<KEY, COMPARATOR, ALLOCATOR> >
3843# error Not valid except when included from bslstl_multiset.h
Definition bslma_bslallocator.h:588
Definition bslstl_multiset.h:644
const_reverse_iterator crbegin() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_multiset.h:2997
multiset &operator=(BloombergLP::bslmf::MovableRef< multiset > rhs) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(AllocatorTraits iterator begin() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_multiset.h:2610
bool empty() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_multiset.h:3020
void swap(multiset &other) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(AllocatorTraits void clear() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_multiset.h:1310
size_type max_size() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_multiset.h:3036
BloombergLP::bslstl::TreeIterator< const value_type, Node, difference_type > const_iterator
Definition bslstl_multiset.h:748
value_type & reference
Definition bslstl_multiset.h:735
bsl::reverse_iterator< const_iterator > const_reverse_iterator
Definition bslstl_multiset.h:750
const_reverse_iterator crend() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_multiset.h:3005
COMPARATOR key_compare
Definition bslstl_multiset.h:732
BloombergLP::bslstl::TreeIterator< const value_type, Node, difference_type > iterator
Definition bslstl_multiset.h:745
const_iterator cend() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_multiset.h:2989
COMPARATOR value_compare
Definition bslstl_multiset.h:733
iterator erase(const_iterator position)
Definition bslstl_multiset.h:2842
iterator end() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_multiset.h:2618
iterator find(const key_type &key)
Definition bslstl_multiset.h:1322
key_compare key_comp() const
Definition bslstl_multiset.h:3044
size_type size() const BSLS_KEYWORD_NOEXCEPT
Return the number of elements in this multiset.
Definition bslstl_multiset.h:3028
allocator_type get_allocator() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_multiset.h:2940
multiset()
Definition bslstl_multiset.h:2327
iterator insert(const value_type &value)
Definition bslstl_multiset.h:2642
iterator lower_bound(const key_type &key)
Definition bslstl_multiset.h:1356
KEY value_type
Definition bslstl_multiset.h:731
void insert_range(BSLS_COMPILERFEATURES_FORWARD_REF(RANGE) range)
Definition bslstl_multiset.h:1186
~multiset()
Destroy this object.
Definition bslstl_multiset.h:2541
const_iterator cbegin() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_multiset.h:2981
bool contains(const key_type &key) const
Definition bslstl_multiset.h:3012
pair< iterator, iterator > equal_range(const key_type &key)
Definition bslstl_multiset.h:1433
iterator emplace(Args &&... args)
Definition bslstl_multiset.h:2789
value_compare value_comp() const
Definition bslstl_multiset.h:3052
multiset & operator=(const multiset &rhs)
Definition bslstl_multiset.h:2550
KEY key_type
Definition bslstl_multiset.h:730
reverse_iterator rend() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_multiset.h:2634
iterator upper_bound(const key_type &key)
Definition bslstl_multiset.h:1395
iterator emplace_hint(const_iterator hint, Args &&... args)
Definition bslstl_multiset.h:2813
AllocatorTraits::const_pointer const_pointer
Definition bslstl_multiset.h:741
AllocatorTraits::difference_type difference_type
Definition bslstl_multiset.h:739
size_type count(const key_type &key) const
Definition bslstl_multiset.h:1604
AllocatorTraits::pointer pointer
Definition bslstl_multiset.h:740
ALLOCATOR allocator_type
Definition bslstl_multiset.h:734
reverse_iterator rbegin() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_multiset.h:2626
bsl::reverse_iterator< iterator > reverse_iterator
Definition bslstl_multiset.h:749
const value_type & const_reference
Definition bslstl_multiset.h:736
AllocatorTraits::size_type size_type
Definition bslstl_multiset.h:738
#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_KEYWORD_CONSTEXPR_CPP17
Definition bsls_keyword.h:639
#define BSLS_KEYWORD_NOEXCEPT_OPERATOR(...)
Definition bsls_keyword.h:677
#define BSLS_KEYWORD_NOEXCEPT
Definition bsls_keyword.h:674
#define BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(...)
Definition bsls_keyword.h:676
#define BSLSTL_MULTISET_REQUIRES_CONTAINER_COMPATIBLE_RANGE(R, T)
Definition bslstl_multiset.h:606
void swap(OptionValue &a, OptionValue &b)
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
bool operator==(const memory_resource &a, const memory_resource &b)
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
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