1451 d_tree, this->comparator(), key));
1460 template <
class LOOKUP_KEY>
1462 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1468 d_tree, this->comparator(), key));
1478 return (
find(key) !=
end()) ? 1 : 0;
1489 template <
class LOOKUP_KEY>
1491 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1499 while (it !=
end() && !comparator()(key, *it.node())) {
1518 return const_iterator(BloombergLP::bslalg::RbTreeUtil::lowerBound(
1519 d_tree, this->comparator(), key));
1532 template <
class LOOKUP_KEY>
1534 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1539 return const_iterator(BloombergLP::bslalg::RbTreeUtil::lowerBound(
1540 d_tree, this->comparator(), key));
1555 return const_iterator(BloombergLP::bslalg::RbTreeUtil::upperBound(
1556 d_tree, this->comparator(), key));
1569 template <
class LOOKUP_KEY>
1571 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1576 return const_iterator(BloombergLP::bslalg::RbTreeUtil::upperBound(
1577 d_tree, this->comparator(), key));
1596 if (endIt !=
end() && !comparator()(key, *endIt.node())) {
1617 template <
class LOOKUP_KEY>
1619 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1626 if (endIt !=
end() && !comparator()(key, *endIt.node())) {
1634 if (endIt !=
end() && !comparator()(key, *endIt.node())) {
1644#ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
1654 class INPUT_ITERATOR,
1655 class KEY =
typename bsl::iterator_traits<INPUT_ITERATOR>::value_type,
1656 class COMPARATOR = std::less<KEY>,
1658 class = bsl::enable_if_t<!bsl::IsStdAllocator_v<COMPARATOR>>,
1659 class = bsl::enable_if_t<
bsl::IsStdAllocator_v<ALLOCATOR>>
1663 COMPARATOR = COMPARATOR(),
1664 ALLOCATOR = ALLOCATOR())
1665-> set<KEY, COMPARATOR, ALLOCATOR>;
1673 class INPUT_ITERATOR,
1677 typename BloombergLP::bslstl::IteratorUtil::IterVal_t<INPUT_ITERATOR>,
1678 class DEFAULT_ALLOCATOR = bsl::allocator<KEY>,
1679 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
1681set(INPUT_ITERATOR, INPUT_ITERATOR, COMPARATOR, ALLOC *)
1682-> set<KEY, COMPARATOR>;
1690 class INPUT_ITERATOR,
1693 typename BloombergLP::bslstl::IteratorUtil::IterVal_t<INPUT_ITERATOR>,
1694 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
1696set(INPUT_ITERATOR, INPUT_ITERATOR, ALLOCATOR)
1697-> set<KEY, std::less<KEY>, ALLOCATOR>;
1704 class INPUT_ITERATOR,
1707 typename BloombergLP::bslstl::IteratorUtil::IterVal_t<INPUT_ITERATOR>,
1708 class DEFAULT_ALLOCATOR = bsl::allocator<KEY>,
1709 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
1711set(INPUT_ITERATOR, INPUT_ITERATOR, ALLOC *)
1720 class COMPARATOR = std::less<KEY>,
1721 class ALLOCATOR = bsl::allocator<KEY>,
1722 class = bsl::enable_if_t<!bsl::IsStdAllocator_v<COMPARATOR>>,
1723 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
1725set(std::initializer_list<KEY>,
1726 COMPARATOR = COMPARATOR(),
1727 ALLOCATOR = ALLOCATOR())
1728-> set<KEY, COMPARATOR, ALLOCATOR>;
1739 class DEFAULT_ALLOCATOR = bsl::allocator<KEY>,
1740 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
1742set(std::initializer_list<KEY>, COMPARATOR, ALLOC *)
1743-> set<KEY, COMPARATOR>;
1752 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
1754set(std::initializer_list<KEY>, ALLOCATOR)
1755-> set<KEY, std::less<KEY>, ALLOCATOR>;
1764 class DEFAULT_ALLOCATOR = bsl::allocator<KEY>,
1765 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
1767set(std::initializer_list<KEY>, ALLOC *)
1781template <class KEY, class COMPARATOR, class ALLOCATOR>
1782bool operator==(const set<KEY, COMPARATOR, ALLOCATOR>& lhs,
1783 const set<KEY, COMPARATOR, ALLOCATOR>& rhs);
1785#ifndef BSLS_COMPILERFEATURES_SUPPORT_THREE_WAY_COMPARISON
1793template <class KEY, class COMPARATOR, class ALLOCATOR>
1794bool operator!=(const set<KEY, COMPARATOR, ALLOCATOR>& lhs,
1795 const set<KEY, COMPARATOR, ALLOCATOR>& rhs);
1798#ifdef BSLALG_SYNTHTHREEWAYUTIL_AVAILABLE
1803template <class KEY, class COMPARATOR, class ALLOCATOR>
1804BloombergLP::bslalg::SynthThreeWayUtil::Result<KEY>
1805operator<=>(const set<KEY, COMPARATOR, ALLOCATOR>& lhs,
1806 const set<KEY, COMPARATOR, ALLOCATOR>& rhs);
1821template <class KEY, class COMPARATOR, class ALLOCATOR>
1822bool operator< (const set<KEY, COMPARATOR, ALLOCATOR>& lhs,
1823 const set<KEY, COMPARATOR, ALLOCATOR>& rhs);
1832template <class KEY, class COMPARATOR, class ALLOCATOR>
1833bool operator> (const set<KEY, COMPARATOR, ALLOCATOR>& lhs,
1834 const set<KEY, COMPARATOR, ALLOCATOR>& rhs);
1843template <class KEY, class COMPARATOR, class ALLOCATOR>
1844bool operator<=(const set<KEY, COMPARATOR, ALLOCATOR>& lhs,
1845 const set<KEY, COMPARATOR, ALLOCATOR>& rhs);
1854template <class KEY, class COMPARATOR, class ALLOCATOR>
1855bool operator>=(const set<KEY, COMPARATOR, ALLOCATOR>& lhs,
1856 const set<KEY, COMPARATOR, ALLOCATOR>& rhs);
1864template <class KEY, class COMPARATOR, class ALLOCATOR, class PREDICATE>
1865typename
set<KEY, COMPARATOR, ALLOCATOR>::size_type
1866erase_if(set<KEY, COMPARATOR, ALLOCATOR>& s, PREDICATE predicate);
1885template <class KEY, class COMPARATOR, class ALLOCATOR>
1886void swap(set<KEY, COMPARATOR, ALLOCATOR>& a,
1887 set<KEY, COMPARATOR, ALLOCATOR>& b)
1889 BSLS_KEYWORD_NOEXCEPT_OPERATOR(a.swap(b)));
1900template <class KEY, class COMPARATOR, class ALLOCATOR>
1902set<KEY, COMPARATOR, ALLOCATOR>::DataWrapper::DataWrapper(
1903 const COMPARATOR& comparator,
1904 const ALLOCATOR& basicAllocator)
1905:
::bsl::set<KEY, COMPARATOR, ALLOCATOR>::Comparator(comparator)
1906, d_pool(basicAllocator)
1910template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1912set<KEY, COMPARATOR, ALLOCATOR>::DataWrapper::DataWrapper(
1913 BloombergLP::bslmf::MovableRef<DataWrapper> original)
1914: ::
bsl::set<KEY, COMPARATOR, ALLOCATOR>::Comparator(
1915 MoveUtil::access(original).keyComparator())
1916, d_pool(MoveUtil::move(MoveUtil::access(original).d_pool))
1920template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1922typename set<KEY, COMPARATOR, ALLOCATOR>::NodeFactory&
1923set<KEY, COMPARATOR, ALLOCATOR>::DataWrapper::nodeFactory()
1928template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1930const typename set<KEY, COMPARATOR, ALLOCATOR>::NodeFactory&
1931set<KEY, COMPARATOR, ALLOCATOR>::DataWrapper::nodeFactory()
const
1941template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1943typename set<KEY, COMPARATOR, ALLOCATOR>::NodeFactory&
1944set<KEY, COMPARATOR, ALLOCATOR>::nodeFactory()
1946 return d_compAndAlloc.nodeFactory();
1949template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1951typename set<KEY, COMPARATOR, ALLOCATOR>::Comparator&
1952set<KEY, COMPARATOR, ALLOCATOR>::comparator()
1954 return d_compAndAlloc;
1957template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1959void set<KEY, COMPARATOR, ALLOCATOR>::quickSwapExchangeAllocators(set& other)
1961 BloombergLP::bslalg::RbTreeUtil::swap(&d_tree, &other.d_tree);
1962 nodeFactory().swapExchangeAllocators(other.nodeFactory());
1970 if (
sizeof(NodeFactory) !=
sizeof(DataWrapper)) {
1971 comparator().swap(other.comparator());
1975template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1977void set<KEY, COMPARATOR, ALLOCATOR>::quickSwapRetainAllocators(set& other)
1979 BloombergLP::bslalg::RbTreeUtil::swap(&d_tree, &other.d_tree);
1980 nodeFactory().swapRetainAllocators(other.nodeFactory());
1984 if (
sizeof(NodeFactory) !=
sizeof(DataWrapper)) {
1985 comparator().swap(other.comparator());
1990template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1992const typename set<KEY, COMPARATOR, ALLOCATOR>::NodeFactory&
1993set<KEY, COMPARATOR, ALLOCATOR>::nodeFactory()
const
1995 return d_compAndAlloc.nodeFactory();
1998template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2000const typename set<KEY, COMPARATOR, ALLOCATOR>::Comparator&
2001set<KEY, COMPARATOR, ALLOCATOR>::comparator()
const
2003 return d_compAndAlloc;
2007template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2010: d_compAndAlloc(COMPARATOR(), ALLOCATOR())
2015template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2018: d_compAndAlloc(COMPARATOR(), basicAllocator)
2023template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2026: d_compAndAlloc(original.comparator().keyComparator(),
2031 if (0 < original.
size()) {
2032 nodeFactory().reserveNodes(original.
size());
2033 BloombergLP::bslalg::RbTreeUtil::copyTree(&d_tree,
2039template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2042 BloombergLP::bslmf::MovableRef<set> original)
2043: d_compAndAlloc(MoveUtil::move(MoveUtil::access(original).d_compAndAlloc))
2046 set& lvalue = original;
2047 BloombergLP::bslalg::RbTreeUtil::swap(&d_tree, &lvalue.d_tree);
2050template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2053 const set& original,
2055: d_compAndAlloc(original.comparator().keyComparator(), basicAllocator)
2058 if (0 < original.
size()) {
2059 nodeFactory().reserveNodes(original.
size());
2060 BloombergLP::bslalg::RbTreeUtil::copyTree(&d_tree,
2066template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2069 BloombergLP::bslmf::MovableRef<set> original,
2071: d_compAndAlloc(MoveUtil::access(original).comparator().keyComparator(),
2075 set& lvalue = original;
2078 nodeFactory().
allocator() == lvalue.nodeFactory().allocator())) {
2079 d_compAndAlloc.nodeFactory().adopt(
2080 MoveUtil::move(lvalue.d_compAndAlloc.nodeFactory()));
2081 BloombergLP::bslalg::RbTreeUtil::swap(&d_tree, &lvalue.d_tree);
2084 if (0 < lvalue.
size()) {
2085 nodeFactory().reserveNodes(lvalue.
size());
2086 BloombergLP::bslalg::RbTreeUtil::moveTree(&d_tree,
2089 &lvalue.nodeFactory());
2094template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2095template <
class INPUT_ITERATOR>
2098 INPUT_ITERATOR last,
2099 const COMPARATOR& comparator,
2100 const ALLOCATOR& basicAllocator)
2101: d_compAndAlloc(comparator, basicAllocator)
2104 if (first != last) {
2107 BloombergLP::bslstl::IteratorUtil::insertDistance(first, last);
2109 if (0 < numElements) {
2110 nodeFactory().reserveNodes(numElements);
2113 BloombergLP::bslalg::RbTreeUtilTreeProctor<NodeFactory> proctor(
2124 BloombergLP::bslalg::RbTreeNode *prevNode = d_tree.rootNode();
2125 while (++first != last) {
2129 if (this->comparator()(value, *prevNode)) {
2135 if (this->comparator()(*prevNode, value)) {
2136 BloombergLP::bslalg::RbTreeNode *node =
2137 nodeFactory().emplaceIntoNewNode(value);
2138 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2150template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2151template <
class INPUT_ITERATOR>
2154 INPUT_ITERATOR last,
2155 const ALLOCATOR& basicAllocator)
2156: d_compAndAlloc(COMPARATOR(), basicAllocator)
2159 if (first != last) {
2162 BloombergLP::bslstl::IteratorUtil::insertDistance(first, last);
2164 if (0 < numElements) {
2165 nodeFactory().reserveNodes(numElements);
2168 BloombergLP::bslalg::RbTreeUtilTreeProctor<NodeFactory> proctor(
2179 BloombergLP::bslalg::RbTreeNode *prevNode = d_tree.rootNode();
2180 while (++first != last) {
2184 if (this->comparator()(value, *prevNode)) {
2190 if (this->comparator()(*prevNode, value)) {
2191 BloombergLP::bslalg::RbTreeNode *node =
2192 nodeFactory().emplaceIntoNewNode(value);
2193 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2205#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
2206template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2209 const COMPARATOR& comparator,
2210 const ALLOCATOR& basicAllocator)
2211:
set(values.
begin(), values.
end(), comparator, basicAllocator)
2215template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2218 const ALLOCATOR& basicAllocator)
2219: set(values.
begin(), values.
end(), COMPARATOR(), basicAllocator)
2224template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2232template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2238 if (AllocatorTraits::propagate_on_container_copy_assignment::value) {
2239 set other(rhs, rhs.nodeFactory().allocator());
2240 quickSwapExchangeAllocators(other);
2244 quickSwapRetainAllocators(other);
2250template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2254 BloombergLP::bslmf::MovableRef<set> rhs)
2256 AllocatorTraits::is_always_equal::value
2257 && std::is_nothrow_move_assignable<COMPARATOR>::value)
2262 if (nodeFactory().
allocator() == lvalue.nodeFactory().allocator()) {
2263 set other(MoveUtil::move(lvalue));
2264 quickSwapRetainAllocators(other);
2267 AllocatorTraits::propagate_on_container_move_assignment::value) {
2268 set other(MoveUtil::move(lvalue));
2269 quickSwapExchangeAllocators(other);
2272 set other(MoveUtil::move(lvalue), nodeFactory().allocator());
2273 quickSwapRetainAllocators(other);
2279#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
2280template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2282set<KEY, COMPARATOR, ALLOCATOR>&
2286 insert(values.begin(), values.end());
2291template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2296 return iterator(d_tree.firstNode());
2299template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2304 return iterator(d_tree.sentinel());
2307template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2315template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2323template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2328 int comparisonResult;
2329 BloombergLP::bslalg::RbTreeNode *insertLocation =
2330 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2335 if (!comparisonResult) {
2339 BloombergLP::bslalg::RbTreeNode *node =
2340 nodeFactory().emplaceIntoNewNode(value);
2341 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2343 comparisonResult < 0,
2348template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2352 BloombergLP::bslmf::MovableRef<value_type> value)
2355 int comparisonResult;
2356 BloombergLP::bslalg::RbTreeNode *insertLocation =
2357 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2362 if (!comparisonResult) {
2366 BloombergLP::bslalg::RbTreeNode *node =
2367 nodeFactory().emplaceIntoNewNode(MoveUtil::move(lvalue));
2368 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2370 comparisonResult < 0,
2375template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2381 BloombergLP::bslalg::RbTreeNode *hintNode =
2382 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
2383 int comparisonResult;
2384 BloombergLP::bslalg::RbTreeNode *insertLocation =
2385 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2391 if (!comparisonResult) {
2395 BloombergLP::bslalg::RbTreeNode *node =
2396 nodeFactory().emplaceIntoNewNode(value);
2397 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2399 comparisonResult < 0,
2404template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2408 BloombergLP::bslmf::MovableRef<value_type> value)
2411 BloombergLP::bslalg::RbTreeNode *hintNode =
2412 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
2413 int comparisonResult;
2414 BloombergLP::bslalg::RbTreeNode *insertLocation =
2415 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2421 if (!comparisonResult) {
2425 BloombergLP::bslalg::RbTreeNode *node =
2426 nodeFactory().emplaceIntoNewNode(MoveUtil::move(lvalue));
2428 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2430 comparisonResult < 0,
2435template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2436template <
class INPUT_ITERATOR>
2439 INPUT_ITERATOR last)
2453 const bool canCalculateInsertDistance =
2455 iterator_traits<INPUT_ITERATOR>::iterator_category,
2456 forward_iterator_tag>::value;
2458 while (first != last) {
2459 if (canCalculateInsertDistance
2461 !nodeFactory().hasFreeNodes())) {
2463 BloombergLP::bslstl::IteratorUtil::insertDistance(first, last);
2465 nodeFactory().reserveNodes(numElements);
2472#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
2473template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2477 insert(values.begin(), values.end());
2481#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
2482template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2483template <
class... Args>
2485pair<typename set<KEY, COMPARATOR, ALLOCATOR>::iterator,
bool>
2488 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2490 int comparisonResult;
2491 BloombergLP::bslalg::RbTreeNode *insertLocation =
2492 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2496 static_cast<const Node *
>(node)->value());
2497 if (!comparisonResult) {
2498 nodeFactory().deleteNode(node);
2502 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2504 comparisonResult < 0,
2509template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2510template <
class... Args>
2514 Args&&... arguments)
2516 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2518 BloombergLP::bslalg::RbTreeNode *hintNode =
2519 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
2520 int comparisonResult;
2521 BloombergLP::bslalg::RbTreeNode *insertLocation =
2522 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2526 static_cast<const Node *
>(node)->value(),
2528 if (!comparisonResult) {
2529 nodeFactory().deleteNode(node);
2533 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2535 comparisonResult < 0,
2541template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2548 BloombergLP::bslalg::RbTreeNode *node =
2549 const_cast<BloombergLP::bslalg::RbTreeNode *
>(position.node());
2550 BloombergLP::bslalg::RbTreeNode *result =
2551 BloombergLP::bslalg::RbTreeUtil::next(node);
2552 BloombergLP::bslalg::RbTreeUtil::remove(&d_tree, node);
2553 nodeFactory().deleteNode(node);
2557template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2570template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2576 while (first != last) {
2577 first =
erase(first);
2582template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2586 AllocatorTraits::is_always_equal::value
2587 && bsl::is_nothrow_swappable<COMPARATOR>::value)
2589 if (AllocatorTraits::propagate_on_container_swap::value) {
2590 quickSwapExchangeAllocators(other);
2597 nodeFactory().allocator() == other.nodeFactory().allocator())) {
2598 quickSwapRetainAllocators(other);
2603 set toOtherCopy(MoveUtil::move(*
this),
2604 other.nodeFactory().allocator());
2605 set toThisCopy(MoveUtil::move(other), nodeFactory().allocator());
2607 this->quickSwapRetainAllocators(toThisCopy);
2608 other.quickSwapRetainAllocators(toOtherCopy);
2613template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2619 if (d_tree.rootNode()) {
2623 BloombergLP::bslalg::RbTreeUtil::deleteTree(&d_tree, &nodeFactory());
2625#if defined(BSLS_ASSERT_SAFE_IS_USED)
2634template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2639 return nodeFactory().allocator();
2642template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2650template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2658template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2666template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2674template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2682template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2690template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2698template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2706template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2710 return find(key) !=
end();
2715template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2719 return 0 == d_tree.numNodes();
2722template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2727 return d_tree.numNodes();
2731template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2736 return AllocatorTraits::max_size(get_allocator());
2739template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2744 return comparator().keyComparator();
2747template <
class KEY,
class COMPARATOR,
class ALLOCATOR>