11#ifndef INCLUDED_BSLSTL_MAP_CPP03
12#define INCLUDED_BSLSTL_MAP_CPP03
63#ifdef COMPILING_BSLSTL_MAP_H
87 class COMPARATOR = std::less<KEY>,
88 class ALLOCATOR = allocator<pair<const KEY, VALUE> > >
95 typedef pair<const KEY, VALUE> ValueType;
99 typedef BloombergLP::bslstl::MapComparator<KEY, VALUE, COMPARATOR>
104 typedef BloombergLP::bslstl::TreeNode<ValueType> Node;
108 typedef BloombergLP::bslstl::TreeNodePool<ValueType, ALLOCATOR>
117 typedef BloombergLP::bslmf::MovableRefUtil MoveUtil;
128 class DataWrapper :
public Comparator {
135 DataWrapper(
const DataWrapper&);
136 DataWrapper& operator=(
const DataWrapper&);
144 DataWrapper(
const COMPARATOR& comparator,
145 const ALLOCATOR& basicAllocator);
153 BloombergLP::bslmf::MovableRef<DataWrapper> original);
159 NodeFactory& nodeFactory();
165 const NodeFactory& nodeFactory()
const;
169 DataWrapper d_compAndAlloc;
173 BloombergLP::bslalg::RbTreeAnchor d_tree;
191 typedef BloombergLP::bslstl::TreeIterator<
193 typedef BloombergLP::bslstl::TreeIterator<
206 class value_compare {
268 static Node *toNode(BloombergLP::bslalg::RbTreeNode *node);
273 static const Node *toNode(
const BloombergLP::bslalg::RbTreeNode *node);
279 NodeFactory& nodeFactory();
283 Comparator& comparator();
290 void quickSwapExchangeAllocators(
map& other);
298 void quickSwapRetainAllocators(
map& other);
304 const NodeFactory& nodeFactory()
const;
308 const Comparator& comparator()
const;
325 explicit map(
const COMPARATOR& comparator,
326 const ALLOCATOR& basicAllocator = ALLOCATOR())
327 : d_compAndAlloc(comparator, basicAllocator)
343 explicit map(
const ALLOCATOR& basicAllocator);
363 map(BloombergLP::bslmf::MovableRef<map> original);
388 map(BloombergLP::bslmf::MovableRef<map> original,
418 template <
class INPUT_ITERATOR>
419 map(INPUT_ITERATOR first,
421 const COMPARATOR& comparator = COMPARATOR(),
422 const ALLOCATOR& basicAllocator = ALLOCATOR());
423 template <
class INPUT_ITERATOR>
424 map(INPUT_ITERATOR first,
426 const ALLOCATOR& basicAllocator);
428#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
429 map(std::initializer_list<value_type> values,
430 const COMPARATOR& comparator = COMPARATOR(),
431 const ALLOCATOR& basicAllocator = ALLOCATOR());
451 map(std::initializer_list<value_type> values,
452 const ALLOCATOR& basicAllocator);
473 AllocatorTraits::is_always_equal::value &&
474 std::is_nothrow_move_assignable<COMPARATOR>::value);
490#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
499 map&
operator=(std::initializer_list<value_type> values);
523 BloombergLP::bslmf::MovableRef<key_type> key);
579#if defined(BSLS_PLATFORM_CMP_SUN) && BSLS_PLATFORM_CMP_VERSION < 0x5130
580 template <
class ALT_VALUE_TYPE>
582#elif !defined(BSLS_COMPILERFEATURES_SUPPORT_TRAITS_HEADER)
583 template <
class ALT_VALUE_TYPE>
584 typename enable_if<is_convertible<ALT_VALUE_TYPE, value_type>::value,
585 pair<iterator, bool> >::type
600 template <
class ALT_VALUE_TYPE>
601 typename enable_if<std::is_constructible<
value_type,
602 ALT_VALUE_TYPE&&>::value,
603 pair<iterator, bool> >::type
645 BloombergLP::bslmf::MovableRef<value_type> value);
647#if defined(BSLS_PLATFORM_CMP_SUN) && BSLS_PLATFORM_CMP_VERSION < 0x5130
648 template <
class ALT_VALUE_TYPE>
650#elif !defined(BSLS_COMPILERFEATURES_SUPPORT_TRAITS_HEADER)
651 template <
class ALT_VALUE_TYPE>
652 typename enable_if<is_convertible<ALT_VALUE_TYPE, value_type>::value,
672 template <
class ALT_VALUE_TYPE>
673 typename enable_if<std::is_constructible<
value_type,
674 ALT_VALUE_TYPE&&>::value,
702 template <
class INPUT_ITERATOR>
703 void insert(INPUT_ITERATOR first, INPUT_ITERATOR last);
705#if defined(BSLS_PLATFORM_CMP_SUN) && BSLS_PLATFORM_CMP_VERSION < 0x5130
720#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
727 void insert(std::initializer_list<value_type> values);
733 template <
class BDE_OTHER_TYPE>
737 template <
class BDE_OTHER_TYPE>
739 BloombergLP::bslmf::MovableRef<KEY> key,
742 template <
class BDE_OTHER_TYPE>
747 template <
class BDE_OTHER_TYPE>
749 BloombergLP::bslmf::MovableRef<KEY> key,
753#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
756#ifndef BSLSTL_MAP_VARIADIC_LIMIT
757#define BSLSTL_MAP_VARIADIC_LIMIT 10
759#ifndef BSLSTL_MAP_VARIADIC_LIMIT_B
760#define BSLSTL_MAP_VARIADIC_LIMIT_B BSLSTL_MAP_VARIADIC_LIMIT
762#if BSLSTL_MAP_VARIADIC_LIMIT_B >= 0
767#if BSLSTL_MAP_VARIADIC_LIMIT_B >= 1
768 template <
class Args_01>
773#if BSLSTL_MAP_VARIADIC_LIMIT_B >= 2
774 template <
class Args_01,
781#if BSLSTL_MAP_VARIADIC_LIMIT_B >= 3
782 template <
class Args_01,
791#if BSLSTL_MAP_VARIADIC_LIMIT_B >= 4
792 template <
class Args_01,
803#if BSLSTL_MAP_VARIADIC_LIMIT_B >= 5
804 template <
class Args_01,
817#if BSLSTL_MAP_VARIADIC_LIMIT_B >= 6
818 template <
class Args_01,
833#if BSLSTL_MAP_VARIADIC_LIMIT_B >= 7
834 template <
class Args_01,
851#if BSLSTL_MAP_VARIADIC_LIMIT_B >= 8
852 template <
class Args_01,
871#if BSLSTL_MAP_VARIADIC_LIMIT_B >= 9
872 template <
class Args_01,
893#if BSLSTL_MAP_VARIADIC_LIMIT_B >= 10
894 template <
class Args_01,
918#if BSLSTL_MAP_VARIADIC_LIMIT_B >= 0
922#if BSLSTL_MAP_VARIADIC_LIMIT_B >= 1
923 template <
class Args_01>
928#if BSLSTL_MAP_VARIADIC_LIMIT_B >= 2
929 template <
class Args_01,
936#if BSLSTL_MAP_VARIADIC_LIMIT_B >= 3
937 template <
class Args_01,
946#if BSLSTL_MAP_VARIADIC_LIMIT_B >= 4
947 template <
class Args_01,
958#if BSLSTL_MAP_VARIADIC_LIMIT_B >= 5
959 template <
class Args_01,
972#if BSLSTL_MAP_VARIADIC_LIMIT_B >= 6
973 template <
class Args_01,
988#if BSLSTL_MAP_VARIADIC_LIMIT_B >= 7
989 template <
class Args_01,
1006#if BSLSTL_MAP_VARIADIC_LIMIT_B >= 8
1007 template <
class Args_01,
1026#if BSLSTL_MAP_VARIADIC_LIMIT_B >= 9
1027 template <
class Args_01,
1048#if BSLSTL_MAP_VARIADIC_LIMIT_B >= 10
1049 template <
class Args_01,
1075 template <
class... Args>
1079 template <
class... Args>
1115 AllocatorTraits::is_always_equal::value &&
1116 bsl::is_nothrow_swappable<COMPARATOR>::value);
1135#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
1138#ifndef BSLSTL_MAP_VARIADIC_LIMIT
1139#define BSLSTL_MAP_VARIADIC_LIMIT 10
1141#ifndef BSLSTL_MAP_VARIADIC_LIMIT_C
1142#define BSLSTL_MAP_VARIADIC_LIMIT_C BSLSTL_MAP_VARIADIC_LIMIT
1144#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 0
1148#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 1
1149 template <
class Args_01>
1154#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 2
1155 template <
class Args_01,
1162#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 3
1163 template <
class Args_01,
1172#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 4
1173 template <
class Args_01,
1184#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 5
1185 template <
class Args_01,
1198#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 6
1199 template <
class Args_01,
1214#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 7
1215 template <
class Args_01,
1232#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 8
1233 template <
class Args_01,
1252#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 9
1253 template <
class Args_01,
1274#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 10
1275 template <
class Args_01,
1298#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 0
1299 pair<iterator, bool>
try_emplace(BloombergLP::bslmf::MovableRef<KEY> key);
1302#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 1
1303 template <
class Args_01>
1304 pair<iterator, bool>
try_emplace(BloombergLP::bslmf::MovableRef<KEY> key,
1308#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 2
1309 template <
class Args_01,
1311 pair<iterator, bool>
try_emplace(BloombergLP::bslmf::MovableRef<KEY> key,
1316#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 3
1317 template <
class Args_01,
1320 pair<iterator, bool>
try_emplace(BloombergLP::bslmf::MovableRef<KEY> key,
1326#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 4
1327 template <
class Args_01,
1331 pair<iterator, bool>
try_emplace(BloombergLP::bslmf::MovableRef<KEY> key,
1338#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 5
1339 template <
class Args_01,
1344 pair<iterator, bool>
try_emplace(BloombergLP::bslmf::MovableRef<KEY> key,
1352#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 6
1353 template <
class Args_01,
1359 pair<iterator, bool>
try_emplace(BloombergLP::bslmf::MovableRef<KEY> key,
1368#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 7
1369 template <
class Args_01,
1376 pair<iterator, bool>
try_emplace(BloombergLP::bslmf::MovableRef<KEY> key,
1386#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 8
1387 template <
class Args_01,
1395 pair<iterator, bool>
try_emplace(BloombergLP::bslmf::MovableRef<KEY> key,
1406#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 9
1407 template <
class Args_01,
1416 pair<iterator, bool>
try_emplace(BloombergLP::bslmf::MovableRef<KEY> key,
1428#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 10
1429 template <
class Args_01,
1439 pair<iterator, bool>
try_emplace(BloombergLP::bslmf::MovableRef<KEY> key,
1452#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 0
1453 template<
class LOOKUP_KEY>
1455 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1456 LOOKUP_KEY>::value &&
1461 pair<iterator, bool> >::type
1464 const LOOKUP_KEY& lvalue = key;
1466 int comparisonResult;
1467 BloombergLP::bslalg::RbTreeNode *insertLocation =
1468 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
1473 if (!comparisonResult) {
1474 return pair<iterator, bool>(
1478 #if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
1479 BloombergLP::bslalg::RbTreeNode *node =
1480 nodeFactory().emplaceIntoNewNode(
1481 std::piecewise_construct,
1482 std::forward_as_tuple(
1485 std::forward_as_tuple());
1487 BloombergLP::bslalg::RbTreeNode *node =
1488 nodeFactory().emplaceIntoNewNode(
1493 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
1495 comparisonResult < 0,
1498 return pair<iterator, bool>(
iterator(node),
true);
1502#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 1
1503 template<
class LOOKUP_KEY,
class Args_01>
1505 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1506 LOOKUP_KEY>::value &&
1511 pair<iterator, bool> >::type
1515 const LOOKUP_KEY& lvalue = key;
1517 int comparisonResult;
1518 BloombergLP::bslalg::RbTreeNode *insertLocation =
1519 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
1524 if (!comparisonResult) {
1525 return pair<iterator, bool>(
1529 #if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
1530 BloombergLP::bslalg::RbTreeNode *node =
1531 nodeFactory().emplaceIntoNewNode(
1532 std::piecewise_construct,
1533 std::forward_as_tuple(
1536 std::forward_as_tuple(
1540 BloombergLP::bslalg::RbTreeNode *node =
1541 nodeFactory().emplaceIntoNewNode(
1547 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
1549 comparisonResult < 0,
1552 return pair<iterator, bool>(
iterator(node),
true);
1556#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 2
1557 template<
class LOOKUP_KEY,
class Args_01,
1560 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1561 LOOKUP_KEY>::value &&
1566 pair<iterator, bool> >::type
1571 const LOOKUP_KEY& lvalue = key;
1573 int comparisonResult;
1574 BloombergLP::bslalg::RbTreeNode *insertLocation =
1575 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
1580 if (!comparisonResult) {
1581 return pair<iterator, bool>(
1585 #if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
1586 BloombergLP::bslalg::RbTreeNode *node =
1587 nodeFactory().emplaceIntoNewNode(
1588 std::piecewise_construct,
1589 std::forward_as_tuple(
1592 std::forward_as_tuple(
1598 BloombergLP::bslalg::RbTreeNode *node =
1599 nodeFactory().emplaceIntoNewNode(
1606 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
1608 comparisonResult < 0,
1611 return pair<iterator, bool>(
iterator(node),
true);
1615#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 3
1616 template<
class LOOKUP_KEY,
class Args_01,
1620 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1621 LOOKUP_KEY>::value &&
1626 pair<iterator, bool> >::type
1632 const LOOKUP_KEY& lvalue = key;
1634 int comparisonResult;
1635 BloombergLP::bslalg::RbTreeNode *insertLocation =
1636 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
1641 if (!comparisonResult) {
1642 return pair<iterator, bool>(
1646 #if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
1647 BloombergLP::bslalg::RbTreeNode *node =
1648 nodeFactory().emplaceIntoNewNode(
1649 std::piecewise_construct,
1650 std::forward_as_tuple(
1653 std::forward_as_tuple(
1661 BloombergLP::bslalg::RbTreeNode *node =
1662 nodeFactory().emplaceIntoNewNode(
1670 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
1672 comparisonResult < 0,
1675 return pair<iterator, bool>(
iterator(node),
true);
1679#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 4
1680 template<
class LOOKUP_KEY,
class Args_01,
1685 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1686 LOOKUP_KEY>::value &&
1691 pair<iterator, bool> >::type
1698 const LOOKUP_KEY& lvalue = key;
1700 int comparisonResult;
1701 BloombergLP::bslalg::RbTreeNode *insertLocation =
1702 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
1707 if (!comparisonResult) {
1708 return pair<iterator, bool>(
1712 #if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
1713 BloombergLP::bslalg::RbTreeNode *node =
1714 nodeFactory().emplaceIntoNewNode(
1715 std::piecewise_construct,
1716 std::forward_as_tuple(
1719 std::forward_as_tuple(
1729 BloombergLP::bslalg::RbTreeNode *node =
1730 nodeFactory().emplaceIntoNewNode(
1739 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
1741 comparisonResult < 0,
1744 return pair<iterator, bool>(
iterator(node),
true);
1748#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 5
1749 template<
class LOOKUP_KEY,
class Args_01,
1755 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1756 LOOKUP_KEY>::value &&
1761 pair<iterator, bool> >::type
1769 const LOOKUP_KEY& lvalue = key;
1771 int comparisonResult;
1772 BloombergLP::bslalg::RbTreeNode *insertLocation =
1773 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
1778 if (!comparisonResult) {
1779 return pair<iterator, bool>(
1783 #if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
1784 BloombergLP::bslalg::RbTreeNode *node =
1785 nodeFactory().emplaceIntoNewNode(
1786 std::piecewise_construct,
1787 std::forward_as_tuple(
1790 std::forward_as_tuple(
1802 BloombergLP::bslalg::RbTreeNode *node =
1803 nodeFactory().emplaceIntoNewNode(
1813 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
1815 comparisonResult < 0,
1818 return pair<iterator, bool>(
iterator(node),
true);
1822#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 6
1823 template<
class LOOKUP_KEY,
class Args_01,
1830 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1831 LOOKUP_KEY>::value &&
1836 pair<iterator, bool> >::type
1845 const LOOKUP_KEY& lvalue = key;
1847 int comparisonResult;
1848 BloombergLP::bslalg::RbTreeNode *insertLocation =
1849 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
1854 if (!comparisonResult) {
1855 return pair<iterator, bool>(
1859 #if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
1860 BloombergLP::bslalg::RbTreeNode *node =
1861 nodeFactory().emplaceIntoNewNode(
1862 std::piecewise_construct,
1863 std::forward_as_tuple(
1866 std::forward_as_tuple(
1880 BloombergLP::bslalg::RbTreeNode *node =
1881 nodeFactory().emplaceIntoNewNode(
1892 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
1894 comparisonResult < 0,
1897 return pair<iterator, bool>(
iterator(node),
true);
1901#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 7
1902 template<
class LOOKUP_KEY,
class Args_01,
1910 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1911 LOOKUP_KEY>::value &&
1916 pair<iterator, bool> >::type
1926 const LOOKUP_KEY& lvalue = key;
1928 int comparisonResult;
1929 BloombergLP::bslalg::RbTreeNode *insertLocation =
1930 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
1935 if (!comparisonResult) {
1936 return pair<iterator, bool>(
1940 #if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
1941 BloombergLP::bslalg::RbTreeNode *node =
1942 nodeFactory().emplaceIntoNewNode(
1943 std::piecewise_construct,
1944 std::forward_as_tuple(
1947 std::forward_as_tuple(
1963 BloombergLP::bslalg::RbTreeNode *node =
1964 nodeFactory().emplaceIntoNewNode(
1976 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
1978 comparisonResult < 0,
1981 return pair<iterator, bool>(
iterator(node),
true);
1985#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 8
1986 template<
class LOOKUP_KEY,
class Args_01,
1995 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1996 LOOKUP_KEY>::value &&
2001 pair<iterator, bool> >::type
2012 const LOOKUP_KEY& lvalue = key;
2014 int comparisonResult;
2015 BloombergLP::bslalg::RbTreeNode *insertLocation =
2016 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2021 if (!comparisonResult) {
2022 return pair<iterator, bool>(
2026 #if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
2027 BloombergLP::bslalg::RbTreeNode *node =
2028 nodeFactory().emplaceIntoNewNode(
2029 std::piecewise_construct,
2030 std::forward_as_tuple(
2033 std::forward_as_tuple(
2051 BloombergLP::bslalg::RbTreeNode *node =
2052 nodeFactory().emplaceIntoNewNode(
2065 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2067 comparisonResult < 0,
2070 return pair<iterator, bool>(
iterator(node),
true);
2074#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 9
2075 template<
class LOOKUP_KEY,
class Args_01,
2085 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
2086 LOOKUP_KEY>::value &&
2091 pair<iterator, bool> >::type
2103 const LOOKUP_KEY& lvalue = key;
2105 int comparisonResult;
2106 BloombergLP::bslalg::RbTreeNode *insertLocation =
2107 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2112 if (!comparisonResult) {
2113 return pair<iterator, bool>(
2117 #if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
2118 BloombergLP::bslalg::RbTreeNode *node =
2119 nodeFactory().emplaceIntoNewNode(
2120 std::piecewise_construct,
2121 std::forward_as_tuple(
2124 std::forward_as_tuple(
2144 BloombergLP::bslalg::RbTreeNode *node =
2145 nodeFactory().emplaceIntoNewNode(
2159 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2161 comparisonResult < 0,
2164 return pair<iterator, bool>(
iterator(node),
true);
2168#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 10
2169 template<
class LOOKUP_KEY,
class Args_01,
2180 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
2181 LOOKUP_KEY>::value &&
2186 pair<iterator, bool> >::type
2199 const LOOKUP_KEY& lvalue = key;
2201 int comparisonResult;
2202 BloombergLP::bslalg::RbTreeNode *insertLocation =
2203 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2208 if (!comparisonResult) {
2209 return pair<iterator, bool>(
2213 #if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
2214 BloombergLP::bslalg::RbTreeNode *node =
2215 nodeFactory().emplaceIntoNewNode(
2216 std::piecewise_construct,
2217 std::forward_as_tuple(
2220 std::forward_as_tuple(
2242 BloombergLP::bslalg::RbTreeNode *node =
2243 nodeFactory().emplaceIntoNewNode(
2258 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2260 comparisonResult < 0,
2263 return pair<iterator, bool>(
iterator(node),
true);
2268#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 0
2272#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 1
2273 template<
class Args_01>
2278#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 2
2279 template<
class Args_01,
2286#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 3
2287 template<
class Args_01,
2296#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 4
2297 template<
class Args_01,
2308#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 5
2309 template<
class Args_01,
2322#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 6
2323 template<
class Args_01,
2338#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 7
2339 template<
class Args_01,
2356#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 8
2357 template<
class Args_01,
2376#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 9
2377 template<
class Args_01,
2398#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 10
2399 template<
class Args_01,
2422#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 0
2424 BloombergLP::bslmf::MovableRef<KEY> key);
2427#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 1
2428 template <
class Args_01>
2430 BloombergLP::bslmf::MovableRef<KEY> key,
2434#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 2
2435 template <
class Args_01,
2438 BloombergLP::bslmf::MovableRef<KEY> key,
2443#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 3
2444 template <
class Args_01,
2448 BloombergLP::bslmf::MovableRef<KEY> key,
2454#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 4
2455 template <
class Args_01,
2460 BloombergLP::bslmf::MovableRef<KEY> key,
2467#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 5
2468 template <
class Args_01,
2474 BloombergLP::bslmf::MovableRef<KEY> key,
2482#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 6
2483 template <
class Args_01,
2490 BloombergLP::bslmf::MovableRef<KEY> key,
2499#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 7
2500 template <
class Args_01,
2508 BloombergLP::bslmf::MovableRef<KEY> key,
2518#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 8
2519 template <
class Args_01,
2528 BloombergLP::bslmf::MovableRef<KEY> key,
2539#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 9
2540 template <
class Args_01,
2550 BloombergLP::bslmf::MovableRef<KEY> key,
2562#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 10
2563 template <
class Args_01,
2574 BloombergLP::bslmf::MovableRef<KEY> key,
2587#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 0
2588 template<
class LOOKUP_KEY>
2590 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
2596 const LOOKUP_KEY& lvalue = key;
2598 BloombergLP::bslalg::RbTreeNode *hintNode =
2599 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
2601 int comparisonResult;
2602 BloombergLP::bslalg::RbTreeNode *insertLocation =
2603 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2610 if (!comparisonResult) {
2614 #if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
2615 BloombergLP::bslalg::RbTreeNode *node =
2616 nodeFactory().emplaceIntoNewNode(
2617 std::piecewise_construct,
2618 std::forward_as_tuple(
2621 std::forward_as_tuple());
2623 BloombergLP::bslalg::RbTreeNode *node =
2624 nodeFactory().emplaceIntoNewNode(
2629 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2631 comparisonResult < 0,
2638#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 1
2639 template<
class LOOKUP_KEY,
class Args_01>
2641 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
2648 const LOOKUP_KEY& lvalue = key;
2650 BloombergLP::bslalg::RbTreeNode *hintNode =
2651 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
2653 int comparisonResult;
2654 BloombergLP::bslalg::RbTreeNode *insertLocation =
2655 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2662 if (!comparisonResult) {
2666 #if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
2667 BloombergLP::bslalg::RbTreeNode *node =
2668 nodeFactory().emplaceIntoNewNode(
2669 std::piecewise_construct,
2670 std::forward_as_tuple(
2673 std::forward_as_tuple(
2677 BloombergLP::bslalg::RbTreeNode *node =
2678 nodeFactory().emplaceIntoNewNode(
2684 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2686 comparisonResult < 0,
2693#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 2
2694 template<
class LOOKUP_KEY,
class Args_01,
2697 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
2705 const LOOKUP_KEY& lvalue = key;
2707 BloombergLP::bslalg::RbTreeNode *hintNode =
2708 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
2710 int comparisonResult;
2711 BloombergLP::bslalg::RbTreeNode *insertLocation =
2712 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2719 if (!comparisonResult) {
2723 #if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
2724 BloombergLP::bslalg::RbTreeNode *node =
2725 nodeFactory().emplaceIntoNewNode(
2726 std::piecewise_construct,
2727 std::forward_as_tuple(
2730 std::forward_as_tuple(
2736 BloombergLP::bslalg::RbTreeNode *node =
2737 nodeFactory().emplaceIntoNewNode(
2744 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2746 comparisonResult < 0,
2753#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 3
2754 template<
class LOOKUP_KEY,
class Args_01,
2758 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
2767 const LOOKUP_KEY& lvalue = key;
2769 BloombergLP::bslalg::RbTreeNode *hintNode =
2770 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
2772 int comparisonResult;
2773 BloombergLP::bslalg::RbTreeNode *insertLocation =
2774 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2781 if (!comparisonResult) {
2785 #if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
2786 BloombergLP::bslalg::RbTreeNode *node =
2787 nodeFactory().emplaceIntoNewNode(
2788 std::piecewise_construct,
2789 std::forward_as_tuple(
2792 std::forward_as_tuple(
2800 BloombergLP::bslalg::RbTreeNode *node =
2801 nodeFactory().emplaceIntoNewNode(
2809 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2811 comparisonResult < 0,
2818#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 4
2819 template<
class LOOKUP_KEY,
class Args_01,
2824 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
2834 const LOOKUP_KEY& lvalue = key;
2836 BloombergLP::bslalg::RbTreeNode *hintNode =
2837 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
2839 int comparisonResult;
2840 BloombergLP::bslalg::RbTreeNode *insertLocation =
2841 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2848 if (!comparisonResult) {
2852 #if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
2853 BloombergLP::bslalg::RbTreeNode *node =
2854 nodeFactory().emplaceIntoNewNode(
2855 std::piecewise_construct,
2856 std::forward_as_tuple(
2859 std::forward_as_tuple(
2869 BloombergLP::bslalg::RbTreeNode *node =
2870 nodeFactory().emplaceIntoNewNode(
2879 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2881 comparisonResult < 0,
2888#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 5
2889 template<
class LOOKUP_KEY,
class Args_01,
2895 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
2906 const LOOKUP_KEY& lvalue = key;
2908 BloombergLP::bslalg::RbTreeNode *hintNode =
2909 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
2911 int comparisonResult;
2912 BloombergLP::bslalg::RbTreeNode *insertLocation =
2913 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2920 if (!comparisonResult) {
2924 #if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
2925 BloombergLP::bslalg::RbTreeNode *node =
2926 nodeFactory().emplaceIntoNewNode(
2927 std::piecewise_construct,
2928 std::forward_as_tuple(
2931 std::forward_as_tuple(
2943 BloombergLP::bslalg::RbTreeNode *node =
2944 nodeFactory().emplaceIntoNewNode(
2954 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2956 comparisonResult < 0,
2963#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 6
2964 template<
class LOOKUP_KEY,
class Args_01,
2971 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
2983 const LOOKUP_KEY& lvalue = key;
2985 BloombergLP::bslalg::RbTreeNode *hintNode =
2986 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
2988 int comparisonResult;
2989 BloombergLP::bslalg::RbTreeNode *insertLocation =
2990 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2997 if (!comparisonResult) {
3001 #if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
3002 BloombergLP::bslalg::RbTreeNode *node =
3003 nodeFactory().emplaceIntoNewNode(
3004 std::piecewise_construct,
3005 std::forward_as_tuple(
3008 std::forward_as_tuple(
3022 BloombergLP::bslalg::RbTreeNode *node =
3023 nodeFactory().emplaceIntoNewNode(
3034 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
3036 comparisonResult < 0,
3043#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 7
3044 template<
class LOOKUP_KEY,
class Args_01,
3052 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
3065 const LOOKUP_KEY& lvalue = key;
3067 BloombergLP::bslalg::RbTreeNode *hintNode =
3068 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
3070 int comparisonResult;
3071 BloombergLP::bslalg::RbTreeNode *insertLocation =
3072 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
3079 if (!comparisonResult) {
3083 #if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
3084 BloombergLP::bslalg::RbTreeNode *node =
3085 nodeFactory().emplaceIntoNewNode(
3086 std::piecewise_construct,
3087 std::forward_as_tuple(
3090 std::forward_as_tuple(
3106 BloombergLP::bslalg::RbTreeNode *node =
3107 nodeFactory().emplaceIntoNewNode(
3119 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
3121 comparisonResult < 0,
3128#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 8
3129 template<
class LOOKUP_KEY,
class Args_01,
3138 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
3152 const LOOKUP_KEY& lvalue = key;
3154 BloombergLP::bslalg::RbTreeNode *hintNode =
3155 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
3157 int comparisonResult;
3158 BloombergLP::bslalg::RbTreeNode *insertLocation =
3159 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
3166 if (!comparisonResult) {
3170 #if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
3171 BloombergLP::bslalg::RbTreeNode *node =
3172 nodeFactory().emplaceIntoNewNode(
3173 std::piecewise_construct,
3174 std::forward_as_tuple(
3177 std::forward_as_tuple(
3195 BloombergLP::bslalg::RbTreeNode *node =
3196 nodeFactory().emplaceIntoNewNode(
3209 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
3211 comparisonResult < 0,
3218#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 9
3219 template<
class LOOKUP_KEY,
class Args_01,
3229 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
3244 const LOOKUP_KEY& lvalue = key;
3246 BloombergLP::bslalg::RbTreeNode *hintNode =
3247 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
3249 int comparisonResult;
3250 BloombergLP::bslalg::RbTreeNode *insertLocation =
3251 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
3258 if (!comparisonResult) {
3262 #if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
3263 BloombergLP::bslalg::RbTreeNode *node =
3264 nodeFactory().emplaceIntoNewNode(
3265 std::piecewise_construct,
3266 std::forward_as_tuple(
3269 std::forward_as_tuple(
3289 BloombergLP::bslalg::RbTreeNode *node =
3290 nodeFactory().emplaceIntoNewNode(
3304 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
3306 comparisonResult < 0,
3313#if BSLSTL_MAP_VARIADIC_LIMIT_C >= 10
3314 template<
class LOOKUP_KEY,
class Args_01,
3325 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
3341 const LOOKUP_KEY& lvalue = key;
3343 BloombergLP::bslalg::RbTreeNode *hintNode =
3344 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
3346 int comparisonResult;
3347 BloombergLP::bslalg::RbTreeNode *insertLocation =
3348 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
3355 if (!comparisonResult) {
3359 #if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
3360 BloombergLP::bslalg::RbTreeNode *node =
3361 nodeFactory().emplaceIntoNewNode(
3362 std::piecewise_construct,
3363 std::forward_as_tuple(
3366 std::forward_as_tuple(
3388 BloombergLP::bslalg::RbTreeNode *node =
3389 nodeFactory().emplaceIntoNewNode(
3404 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
3406 comparisonResult < 0,
3416 template <
class... Args>
3419 template <
class... Args>
3420 pair<iterator, bool>
try_emplace(BloombergLP::bslmf::MovableRef<KEY> key,
3422 template<
class LOOKUP_KEY,
class... Args>
3424 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
3425 LOOKUP_KEY>::value &&
3430 pair<iterator, bool> >::type
3434 const LOOKUP_KEY& lvalue = key;
3436 int comparisonResult;
3437 BloombergLP::bslalg::RbTreeNode *insertLocation =
3438 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
3443 if (!comparisonResult) {
3444 return pair<iterator, bool>(
3448 #if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
3449 BloombergLP::bslalg::RbTreeNode *node =
3450 nodeFactory().emplaceIntoNewNode(
3451 std::piecewise_construct,
3452 std::forward_as_tuple(
3458 BloombergLP::bslalg::RbTreeNode *node =
3459 nodeFactory().emplaceIntoNewNode(
3464 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
3466 comparisonResult < 0,
3469 return pair<iterator, bool>(
iterator(node),
true);
3472 template<
class... Args>
3475 template <
class... Args>
3477 BloombergLP::bslmf::MovableRef<KEY> key,
3479 template<
class LOOKUP_KEY,
class... Args>
3481 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
3488 const LOOKUP_KEY& lvalue = key;
3490 BloombergLP::bslalg::RbTreeNode *hintNode =
3491 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
3493 int comparisonResult;
3494 BloombergLP::bslalg::RbTreeNode *insertLocation =
3495 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
3502 if (!comparisonResult) {
3506 #if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
3507 BloombergLP::bslalg::RbTreeNode *node =
3508 nodeFactory().emplaceIntoNewNode(
3509 std::piecewise_construct,
3510 std::forward_as_tuple(
3516 BloombergLP::bslalg::RbTreeNode *node =
3517 nodeFactory().emplaceIntoNewNode(
3522 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
3524 comparisonResult < 0,
3548 return iterator(BloombergLP::bslalg::RbTreeUtil::find(
3549 d_tree, this->comparator(), key));
3558 template <
class LOOKUP_KEY>
3560 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
3563 find(
const LOOKUP_KEY& key)
3565 return iterator(BloombergLP::bslalg::RbTreeUtil::find(
3566 d_tree, this->comparator(), key));
3581 return iterator(BloombergLP::bslalg::RbTreeUtil::lowerBound(
3582 d_tree, this->comparator(), key));
3595 template <
class LOOKUP_KEY>
3597 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
3602 return iterator(BloombergLP::bslalg::RbTreeUtil::lowerBound(
3603 d_tree, this->comparator(), key));
3618 return iterator(BloombergLP::bslalg::RbTreeUtil::upperBound(
3619 d_tree, this->comparator(), key));
3632 template <
class LOOKUP_KEY>
3634 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
3639 return iterator(BloombergLP::bslalg::RbTreeUtil::upperBound(
3640 d_tree, this->comparator(), key));
3659 if (endIt !=
end() && !comparator()(key, *endIt.node())) {
3662 return pair<iterator, iterator>(startIt, endIt);
3680 template <
class LOOKUP_KEY>
3682 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
3684 pair<iterator, iterator> >::type
3689 if (endIt !=
end() && !comparator()(key, *endIt.node())) {
3697 if (endIt !=
end() && !comparator()(key, *endIt.node())) {
3701 return pair<iterator, iterator>(startIt, endIt);
3760 template <class LOOKUP_KEY>
3761 typename
bsl::enable_if<
3762 BloombergLP::
bslmf::IsTransparentPredicate<COMPARATOR,
3765 contains(const LOOKUP_KEY& key)
const
3789 typename add_lvalue_reference<const VALUE>::type
at(const
key_type& key)
3818 d_tree, this->comparator(), key));
3827 template <
class LOOKUP_KEY>
3829 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
3832 find(
const LOOKUP_KEY& key)
const
3835 d_tree, this->comparator(), key));
3845 return (
find(key) !=
end()) ? 1 : 0;
3856 template <
class LOOKUP_KEY>
3858 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
3861 count(
const LOOKUP_KEY& key)
const
3866 while (it !=
end() && !comparator()(key, *it.node())) {
3885 return iterator(BloombergLP::bslalg::RbTreeUtil::lowerBound(
3886 d_tree, this->comparator(), key));
3899 template <
class LOOKUP_KEY>
3901 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
3907 BloombergLP::bslalg::RbTreeUtil::lowerBound(d_tree,
3924 return const_iterator(BloombergLP::bslalg::RbTreeUtil::upperBound(
3925 d_tree, this->comparator(), key));
3938 template <
class LOOKUP_KEY>
3940 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
3945 return const_iterator(BloombergLP::bslalg::RbTreeUtil::upperBound(
3946 d_tree, this->comparator(), key));
3965 if (endIt !=
end() && !comparator()(key, *endIt.node())) {
3968 return pair<const_iterator, const_iterator>(startIt, endIt);
3986 template <
class LOOKUP_KEY>
3988 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
3990 pair<const_iterator, const_iterator> >::type
3995 if (endIt !=
end() && !comparator()(key, *endIt.node())) {
4003 if (endIt !=
end() && !comparator()(key, *endIt.node())) {
4007 return pair<const_iterator, const_iterator>(startIt, endIt);
4013#ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
4023 class INPUT_ITERATOR,
4024 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
4026 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
4027 class COMPARATOR = std::less<KEY>,
4029 BloombergLP::bslstl::IteratorUtil::IterToAlloc_t<INPUT_ITERATOR>>,
4030 class = bsl::enable_if_t<!bsl::IsStdAllocator_v<COMPARATOR>>,
4031 class = bsl::enable_if_t<
bsl::IsStdAllocator_v<ALLOCATOR>>
4035 COMPARATOR = COMPARATOR(),
4036 ALLOCATOR = ALLOCATOR())
4037-> map<KEY, VALUE, COMPARATOR, ALLOCATOR>;
4046 class INPUT_ITERATOR,
4049 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
4051 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
4052 class DEFAULT_ALLOCATOR = bsl::allocator<pair<const KEY, VALUE>>,
4053 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
4055map(INPUT_ITERATOR, INPUT_ITERATOR, COMPARATOR, ALLOC *)
4056-> map<KEY, VALUE, COMPARATOR>;
4063 class INPUT_ITERATOR,
4065 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
4067 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
4068 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
4070map(INPUT_ITERATOR, INPUT_ITERATOR, ALLOCATOR)
4071-> map<KEY, VALUE, std::less<KEY>, ALLOCATOR>;
4078 class INPUT_ITERATOR,
4080 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
4082 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
4083 class DEFAULT_ALLOCATOR = bsl::allocator<pair<const KEY, VALUE>>,
4084 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
4086map(INPUT_ITERATOR, INPUT_ITERATOR, ALLOC *)
4098 class COMPARATOR = std::less<KEY>,
4099 class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE>>,
4100 class = bsl::enable_if_t<!bsl::IsStdAllocator_v<COMPARATOR>>,
4101 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
4103map(std::initializer_list<pair<const KEY, VALUE>>,
4104 COMPARATOR = COMPARATOR(),
4105 ALLOCATOR = ALLOCATOR())
4106-> map<KEY, VALUE, COMPARATOR, ALLOCATOR>;
4119 class DEFAULT_ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE>>,
4120 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
4122map(std::initializer_list<pair<const KEY, VALUE>>, COMPARATOR, ALLOC *)
4123-> map<KEY, VALUE, COMPARATOR>;
4134 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
4136map(std::initializer_list<pair<const KEY, VALUE>>, ALLOCATOR)
4137-> map<KEY, VALUE, std::less<KEY>, ALLOCATOR>;
4147 class DEFAULT_ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE>>,
4148 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
4150map(std::initializer_list<pair<const KEY, VALUE>>, ALLOC *)
4164template <class KEY, class VALUE, class COMPARATOR, class ALLOCATOR>
4165bool operator==(const map<KEY, VALUE, COMPARATOR, ALLOCATOR>& lhs,
4166 const map<KEY, VALUE, COMPARATOR, ALLOCATOR>& rhs);
4168#ifndef BSLS_COMPILERFEATURES_SUPPORT_THREE_WAY_COMPARISON
4169template <class KEY, class VALUE, class COMPARATOR, class ALLOCATOR>
4170bool operator!=(const map<KEY, VALUE, COMPARATOR, ALLOCATOR>& lhs,
4171 const map<KEY, VALUE, COMPARATOR, ALLOCATOR>& rhs);
4182#ifdef BSLALG_SYNTHTHREEWAYUTIL_AVAILABLE
4188template <class KEY, class VALUE, class COMPARATOR, class ALLOCATOR>
4189BloombergLP::bslalg::SynthThreeWayUtil::Result<pair<const KEY, VALUE>>
4190operator<=>(const map<KEY, VALUE, COMPARATOR, ALLOCATOR>& lhs,
4191 const map<KEY, VALUE, COMPARATOR, ALLOCATOR>& rhs);
4195template <class KEY, class VALUE, class COMPARATOR, class ALLOCATOR>
4196bool operator<(const map<KEY, VALUE, COMPARATOR, ALLOCATOR>& lhs,
4197 const map<KEY, VALUE, COMPARATOR, ALLOCATOR>& rhs);
4210template <class KEY, class VALUE, class COMPARATOR, class ALLOCATOR>
4211bool operator>(const map<KEY, VALUE, COMPARATOR, ALLOCATOR>& lhs,
4212 const map<KEY, VALUE, COMPARATOR, ALLOCATOR>& rhs);
4221template <class KEY, class VALUE, class COMPARATOR, class ALLOCATOR>
4222bool operator<=(const map<KEY, VALUE, COMPARATOR, ALLOCATOR>& lhs,
4223 const map<KEY, VALUE, COMPARATOR, ALLOCATOR>& rhs);
4232template <class KEY, class VALUE, class COMPARATOR, class ALLOCATOR>
4233bool operator>=(const map<KEY, VALUE, COMPARATOR, ALLOCATOR>& lhs,
4234 const map<KEY, VALUE, COMPARATOR, ALLOCATOR>& rhs);
4254typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::size_type
4255erase_if(map<KEY, VALUE, COMPARATOR, ALLOCATOR>& m, PREDICATE predicate);
4274template <class KEY, class VALUE, class COMPARATOR, class ALLOCATOR>
4275void
swap(map<KEY, VALUE, COMPARATOR, ALLOCATOR>& a,
4276 map<KEY, VALUE, COMPARATOR, ALLOCATOR>& b)
4288template <class KEY, class VALUE, class COMPARATOR, class ALLOCATOR>
4290map<KEY, VALUE, COMPARATOR, ALLOCATOR>::DataWrapper::DataWrapper(
4291 const COMPARATOR& comparator,
4292 const ALLOCATOR& basicAllocator)
4293:
::bsl::map<KEY, VALUE, COMPARATOR, ALLOCATOR>::Comparator(comparator)
4294, d_pool(basicAllocator)
4298template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4300map<KEY, VALUE, COMPARATOR, ALLOCATOR>::DataWrapper::DataWrapper(
4301 BloombergLP::bslmf::MovableRef<DataWrapper> original)
4302: ::
bsl::map<KEY, VALUE, COMPARATOR, ALLOCATOR>::Comparator(
4303 MoveUtil::access(original).keyComparator())
4304, d_pool(MoveUtil::move(MoveUtil::access(original).d_pool))
4308template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4310typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::NodeFactory&
4311map<KEY, VALUE, COMPARATOR, ALLOCATOR>::DataWrapper::nodeFactory()
4317template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4319const typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::NodeFactory&
4320map<KEY, VALUE, COMPARATOR, ALLOCATOR>::DataWrapper::nodeFactory()
const
4330template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4332map<KEY, VALUE, COMPARATOR, ALLOCATOR>::value_compare::value_compare(
4333 COMPARATOR comparator)
4339template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4341bool map<KEY, VALUE, COMPARATOR, ALLOCATOR>::value_compare::operator()(
4342 const value_type& x,
4343 const value_type& y)
const
4345 return comp(x.first, y.first);
4353template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4355typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::Node *
4356map<KEY, VALUE, COMPARATOR, ALLOCATOR>::toNode(
4357 BloombergLP::bslalg::RbTreeNode *node)
4359 return static_cast<Node *
>(node);
4362template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4364const typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::Node *
4365map<KEY, VALUE, COMPARATOR, ALLOCATOR>::toNode(
4366 const BloombergLP::bslalg::RbTreeNode *node)
4368 return static_cast<const Node *
>(node);
4372template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4374typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::NodeFactory&
4375map<KEY, VALUE, COMPARATOR, ALLOCATOR>::nodeFactory()
4377 return d_compAndAlloc.nodeFactory();
4380template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4382typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::Comparator&
4383map<KEY, VALUE, COMPARATOR, ALLOCATOR>::comparator()
4385 return d_compAndAlloc;
4388template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4390void map<KEY, VALUE, COMPARATOR, ALLOCATOR>::quickSwapExchangeAllocators(
4393 BloombergLP::bslalg::RbTreeUtil::swap(&d_tree, &other.d_tree);
4394 nodeFactory().swapExchangeAllocators(other.nodeFactory());
4402 if (
sizeof(NodeFactory) !=
sizeof(DataWrapper)) {
4403 comparator().swap(other.comparator());
4407template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4409void map<KEY, VALUE, COMPARATOR, ALLOCATOR>::quickSwapRetainAllocators(
4412 BloombergLP::bslalg::RbTreeUtil::swap(&d_tree, &other.d_tree);
4413 nodeFactory().swapRetainAllocators(other.nodeFactory());
4417 if (
sizeof(NodeFactory) !=
sizeof(DataWrapper)) {
4418 comparator().swap(other.comparator());
4423template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4425const typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::NodeFactory&
4426map<KEY, VALUE, COMPARATOR, ALLOCATOR>::nodeFactory()
const
4428 return d_compAndAlloc.nodeFactory();
4431template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4433const typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::Comparator&
4434map<KEY, VALUE, COMPARATOR, ALLOCATOR>::comparator()
const
4436 return d_compAndAlloc;
4440template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4442map<KEY, VALUE, COMPARATOR, ALLOCATOR>::map()
4443: d_compAndAlloc(COMPARATOR(), ALLOCATOR())
4448template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4450map<KEY, VALUE, COMPARATOR, ALLOCATOR>::map(
const ALLOCATOR& basicAllocator)
4451: d_compAndAlloc(COMPARATOR(), basicAllocator)
4456template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4458map<KEY, VALUE, COMPARATOR, ALLOCATOR>::map(
const map& original)
4459: d_compAndAlloc(original.comparator().keyComparator(),
4460 AllocatorTraits::select_on_container_copy_construction(
4461 original.nodeFactory().allocator()))
4464 if (0 < original.size()) {
4465 nodeFactory().reserveNodes(original.size());
4466 BloombergLP::bslalg::RbTreeUtil::copyTree(&d_tree,
4472template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4474map<KEY, VALUE, COMPARATOR, ALLOCATOR>::map(
4475 BloombergLP::bslmf::MovableRef<map> original)
4476: d_compAndAlloc(MoveUtil::move(MoveUtil::access(original).d_compAndAlloc))
4479 map& lvalue = original;
4480 BloombergLP::bslalg::RbTreeUtil::swap(&d_tree, &lvalue.d_tree);
4483template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4485map<KEY, VALUE, COMPARATOR, ALLOCATOR>::map(
const map& original,
4486 const typename type_identity<ALLOCATOR>::type& basicAllocator)
4487: d_compAndAlloc(original.comparator().keyComparator(), basicAllocator)
4490 if (0 < original.size()) {
4491 nodeFactory().reserveNodes(original.size());
4492 BloombergLP::bslalg::RbTreeUtil::copyTree(&d_tree,
4498template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4500map<KEY, VALUE, COMPARATOR, ALLOCATOR>::map(
4501 BloombergLP::bslmf::MovableRef<map> original,
4502 const typename type_identity<ALLOCATOR>::type& basicAllocator)
4503: d_compAndAlloc(MoveUtil::access(original).comparator().keyComparator(),
4507 map& lvalue = original;
4510 nodeFactory().allocator() == lvalue.nodeFactory().allocator())) {
4511 d_compAndAlloc.nodeFactory().adopt(
4512 MoveUtil::move(lvalue.d_compAndAlloc.nodeFactory()));
4513 BloombergLP::bslalg::RbTreeUtil::swap(&d_tree, &lvalue.d_tree);
4515 else if (0 < lvalue.size()) {
4516 nodeFactory().reserveNodes(lvalue.size());
4517 BloombergLP::bslalg::RbTreeUtil::moveTree(&d_tree,
4520 &lvalue.nodeFactory());
4524template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4525template <
class INPUT_ITERATOR>
4527map<KEY, VALUE, COMPARATOR, ALLOCATOR>::map(INPUT_ITERATOR first,
4528 INPUT_ITERATOR last,
4529 const COMPARATOR& comparator,
4530 const ALLOCATOR& basicAllocator)
4531: d_compAndAlloc(comparator, basicAllocator)
4534 if (first != last) {
4536 size_type numElements =
4537 BloombergLP::bslstl::IteratorUtil::insertDistance(first, last);
4539 if (0 < numElements) {
4540 nodeFactory().reserveNodes(numElements);
4543 BloombergLP::bslalg::RbTreeUtilTreeProctor<NodeFactory> proctor(
4554 BloombergLP::bslalg::RbTreeNode *prevNode = d_tree.rootNode();
4555 while (++first != last) {
4558 const value_type& value = *first;
4559 if (this->comparator()(value.first, *prevNode)) {
4561 insert(++first, last);
4565 if (this->comparator()(*prevNode, value.first)) {
4566 BloombergLP::bslalg::RbTreeNode *node =
4567 nodeFactory().emplaceIntoNewNode(value);
4568 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
4579template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4580template <
class INPUT_ITERATOR>
4582map<KEY, VALUE, COMPARATOR, ALLOCATOR>::map(INPUT_ITERATOR first,
4583 INPUT_ITERATOR last,
4584 const ALLOCATOR& basicAllocator)
4585: d_compAndAlloc(COMPARATOR(), basicAllocator)
4588 map other(first, last, COMPARATOR(), nodeFactory().allocator());
4589 quickSwapRetainAllocators(other);
4592#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
4593template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4595map<KEY, VALUE, COMPARATOR, ALLOCATOR>::map(
4596 std::initializer_list<value_type> values,
4597 const COMPARATOR& comparator,
4598 const ALLOCATOR& basicAllocator)
4599: map(values.
begin(), values.
end(), comparator, basicAllocator)
4603template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4605map<KEY, VALUE, COMPARATOR, ALLOCATOR>::map(
4606 std::initializer_list<value_type> values,
4607 const ALLOCATOR& basicAllocator)
4608: map(values.
begin(), values.
end(), COMPARATOR(), basicAllocator)
4613template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4615map<KEY, VALUE, COMPARATOR, ALLOCATOR>::~map()
4621template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4623map<KEY, VALUE, COMPARATOR, ALLOCATOR>&
4624map<KEY, VALUE, COMPARATOR, ALLOCATOR>::operator=(
const map& rhs)
4627 if (AllocatorTraits::propagate_on_container_copy_assignment::value) {
4628 map other(rhs, rhs.nodeFactory().allocator());
4629 quickSwapExchangeAllocators(other);
4632 map other(rhs, nodeFactory().allocator());
4633 quickSwapRetainAllocators(other);
4639template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4641map<KEY, VALUE, COMPARATOR, ALLOCATOR>&
4642map<KEY, VALUE, COMPARATOR, ALLOCATOR>::operator=(
4643 BloombergLP::bslmf::MovableRef<map> rhs)
4645 AllocatorTraits::is_always_equal::value &&
4646 std::is_nothrow_move_assignable<COMPARATOR>::value)
4651 if (nodeFactory().allocator() == lvalue.nodeFactory().allocator()) {
4652 map other(MoveUtil::move(lvalue));
4653 quickSwapRetainAllocators(other);
4656 AllocatorTraits::propagate_on_container_move_assignment::value) {
4657 map other(MoveUtil::move(lvalue));
4658 quickSwapExchangeAllocators(other);
4661 map other(MoveUtil::move(lvalue), nodeFactory().allocator());
4662 quickSwapRetainAllocators(other);
4668#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
4669template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4671map<KEY, VALUE, COMPARATOR, ALLOCATOR>&
4672map<KEY, VALUE, COMPARATOR, ALLOCATOR>::operator=(
4673 std::initializer_list<value_type> values)
4676 insert(values.begin(), values.end());
4681template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4683typename add_lvalue_reference<VALUE>::type
4684map<KEY, VALUE, COMPARATOR, ALLOCATOR>::operator[](
const key_type& key)
4686 iterator iter = lower_bound(key);
4687 if (iter ==
end() || this->comparator()(key, *iter.node())) {
4688#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
4689 iter = emplace_hint(iter,
4690 std::piecewise_construct,
4691 std::forward_as_tuple(key),
4692 std::forward_as_tuple());
4694 BloombergLP::bsls::ObjectBuffer<VALUE> temp;
4696 ALLOCATOR alloc = nodeFactory().allocator();
4698 AllocatorTraits::construct(alloc, temp.address());
4700 BloombergLP::bslma::DestructorGuard<VALUE> guard(temp.address());
4702 iter = emplace_hint(iter, key, temp.object());
4705 return iter->second;
4708template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4710typename add_lvalue_reference<VALUE>::type
4711map<KEY, VALUE, COMPARATOR, ALLOCATOR>::operator[](
4712 BloombergLP::bslmf::MovableRef<key_type> key)
4714 key_type& lvalue = key;
4716 iterator iter = lower_bound(lvalue);
4717 if (iter ==
end() || this->comparator()(lvalue, *iter.node())) {
4718#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
4719 iter = emplace_hint(
4721 std::piecewise_construct,
4723 std::forward_as_tuple());
4725 BloombergLP::bsls::ObjectBuffer<VALUE> temp;
4727 ALLOCATOR alloc = nodeFactory().allocator();
4729 AllocatorTraits::construct(alloc, temp.address());
4731 BloombergLP::bslma::DestructorGuard<VALUE> guard(temp.address());
4733 iter = emplace_hint(iter, lvalue, temp.object());
4736 return iter->second;
4739template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4740typename add_lvalue_reference<VALUE>::type
4741map<KEY, VALUE, COMPARATOR, ALLOCATOR>::at(
const key_type& key)
4743 BloombergLP::bslalg::RbTreeNode *node =
4744 BloombergLP::bslalg::RbTreeUtil::find(d_tree, this->comparator(), key);
4745 if (d_tree.sentinel() == node) {
4746 BloombergLP::bslstl::StdExceptUtil::throwOutOfRange(
4747 "map<...>::at(key_type): invalid key value");
4749 return toNode(node)->value().second;
4752template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4754typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
4757 return iterator(d_tree.firstNode());
4760template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4762typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
4765 return iterator(d_tree.sentinel());
4768template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4770typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::reverse_iterator
4773 return reverse_iterator(
end());
4776template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4778typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::reverse_iterator
4781 return reverse_iterator(
begin());
4784template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4786pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
4787map<KEY, VALUE, COMPARATOR, ALLOCATOR>::insert(
const value_type& value)
4789 int comparisonResult;
4790 BloombergLP::bslalg::RbTreeNode *insertLocation =
4791 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
4796 if (!comparisonResult) {
4797 return pair<iterator, bool>(iterator(insertLocation),
false);
4800 BloombergLP::bslalg::RbTreeNode *node =
4801 nodeFactory().emplaceIntoNewNode(value);
4802 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
4804 comparisonResult < 0,
4806 return pair<iterator, bool>(iterator(node),
true);
4809template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4811pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
4812map<KEY, VALUE, COMPARATOR, ALLOCATOR>::insert(
4813 BloombergLP::bslmf::MovableRef<value_type> value)
4815 value_type& lvalue = value;
4817 int comparisonResult;
4818 BloombergLP::bslalg::RbTreeNode *insertLocation =
4819 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
4824 if (!comparisonResult) {
4825 return pair<iterator, bool>(iterator(insertLocation),
false);
4828 BloombergLP::bslalg::RbTreeNode *node =
4829 nodeFactory().emplaceIntoNewNode(MoveUtil::move(lvalue));
4830 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
4832 comparisonResult < 0,
4834 return pair<iterator, bool>(iterator(node),
true);
4837template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4838template <
class INPUT_ITERATOR>
4840void map<KEY, VALUE, COMPARATOR, ALLOCATOR>::insert(INPUT_ITERATOR first,
4841 INPUT_ITERATOR last)
4855 const bool canCalculateInsertDistance =
4856 is_convertible<
typename
4857 iterator_traits<INPUT_ITERATOR>::iterator_category,
4858 forward_iterator_tag>::value;
4860 while (first != last) {
4861 if (canCalculateInsertDistance
4863 !nodeFactory().hasFreeNodes())) {
4864 const size_type numElements =
4865 BloombergLP::bslstl::IteratorUtil::insertDistance(first, last);
4867 nodeFactory().reserveNodes(numElements);
4874#if defined(BSLS_PLATFORM_CMP_SUN) && BSLS_PLATFORM_CMP_VERSION < 0x5130
4875template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4877void map<KEY, VALUE, COMPARATOR, ALLOCATOR>::insert(const_iterator first,
4878 const_iterator last)
4880 while (first != last) {
4887template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4889typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
4890map<KEY, VALUE, COMPARATOR, ALLOCATOR>::insert(const_iterator hint,
4891 const value_type& value)
4893 BloombergLP::bslalg::RbTreeNode *hintNode =
4894 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
4895 int comparisonResult;
4896 BloombergLP::bslalg::RbTreeNode *insertLocation =
4897 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
4903 if (!comparisonResult) {
4904 return iterator(insertLocation);
4907 BloombergLP::bslalg::RbTreeNode *node =
4908 nodeFactory().emplaceIntoNewNode(value);
4909 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
4911 comparisonResult < 0,
4913 return iterator(node);
4916template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4918typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
4919map<KEY, VALUE, COMPARATOR, ALLOCATOR>::insert(
4920 const_iterator hint,
4921 BloombergLP::bslmf::MovableRef<value_type> value)
4923 value_type& lvalue = value;
4925 BloombergLP::bslalg::RbTreeNode *hintNode =
4926 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
4927 int comparisonResult;
4928 BloombergLP::bslalg::RbTreeNode *insertLocation =
4929 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
4935 if (!comparisonResult) {
4936 return iterator(insertLocation);
4939 BloombergLP::bslalg::RbTreeNode *node =
4940 nodeFactory().emplaceIntoNewNode(MoveUtil::move(lvalue));
4942 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
4944 comparisonResult < 0,
4946 return iterator(node);
4949#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
4950template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4952void map<KEY, VALUE, COMPARATOR, ALLOCATOR>::insert(
4953 std::initializer_list<value_type> values)
4955 insert(values.begin(), values.end());
4962template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4963template <
class BDE_OTHER_TYPE>
4965pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
4966map<KEY, VALUE, COMPARATOR, ALLOCATOR>::insert_or_assign(
const key_type& key,
4969 int comparisonResult;
4970 BloombergLP::bslalg::RbTreeNode *insertLocation =
4971 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
4977 if (!comparisonResult) {
4978 iterator(insertLocation)->second =
4980 return pair<iterator, bool>(iterator(insertLocation),
false);
4983 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
4986 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
4988 comparisonResult < 0,
4991 return pair<iterator, bool>(iterator(node),
true);
4994template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
4995template <
class BDE_OTHER_TYPE>
4997typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
4998map<KEY, VALUE, COMPARATOR, ALLOCATOR>::insert_or_assign(const_iterator hint,
4999 const key_type& key,
5002 BloombergLP::bslalg::RbTreeNode *hintNode =
5003 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
5004 int comparisonResult;
5005 BloombergLP::bslalg::RbTreeNode *insertLocation =
5006 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
5013 if (!comparisonResult) {
5014 iterator(insertLocation)->second =
5016 return iterator(insertLocation);
5019 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
5022 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
5024 comparisonResult < 0,
5027 return iterator(node);
5030template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
5031template <
class BDE_OTHER_TYPE>
5033pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
5034map<KEY, VALUE, COMPARATOR, ALLOCATOR>::insert_or_assign(
5035 BloombergLP::bslmf::MovableRef<key_type> key,
5038 int comparisonResult;
5039 BloombergLP::bslalg::RbTreeNode *insertLocation =
5040 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
5046 if (!comparisonResult) {
5047 iterator(insertLocation)->second =
5049 return pair<iterator, bool>(iterator(insertLocation),
false);
5052 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
5056 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
5058 comparisonResult < 0,
5061 return pair<iterator, bool>(iterator(node),
true);
5064template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
5065template <
class BDE_OTHER_TYPE>
5067typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
5068map<KEY, VALUE, COMPARATOR, ALLOCATOR>::insert_or_assign(
5069 const_iterator hint,
5070 BloombergLP::bslmf::MovableRef<key_type> key,
5073 BloombergLP::bslalg::RbTreeNode *hintNode =
5074 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
5075 int comparisonResult;
5076 BloombergLP::bslalg::RbTreeNode *insertLocation =
5077 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
5084 if (!comparisonResult) {
5085 iterator(insertLocation)->second =
5087 return iterator(insertLocation);
5090 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
5094 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
5096 comparisonResult < 0,
5099 return iterator(node);
5103#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
5106#ifndef BSLSTL_MAP_VARIADIC_LIMIT
5107#define BSLSTL_MAP_VARIADIC_LIMIT 10
5109#ifndef BSLSTL_MAP_VARIADIC_LIMIT_E
5110#define BSLSTL_MAP_VARIADIC_LIMIT_E BSLSTL_MAP_VARIADIC_LIMIT
5113#if BSLSTL_MAP_VARIADIC_LIMIT_E >= 0
5114template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
5116pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
5117map<KEY, VALUE, COMPARATOR, ALLOCATOR>::emplace(
5120 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
5122 int comparisonResult;
5123 BloombergLP::bslalg::RbTreeNode *insertLocation =
5124 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
5128 static_cast<const Node *
>(node)->value().first);
5129 if (!comparisonResult) {
5130 nodeFactory().deleteNode(node);
5131 return pair<iterator, bool>(iterator(insertLocation),
false);
5134 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
5136 comparisonResult < 0,
5138 return pair<iterator, bool>(iterator(node),
true);
5142#if BSLSTL_MAP_VARIADIC_LIMIT_E >= 1
5143template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
5144template <
class Args_01>
5146pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
5147map<KEY, VALUE, COMPARATOR, ALLOCATOR>::emplace(
5150 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
5152 int comparisonResult;
5153 BloombergLP::bslalg::RbTreeNode *insertLocation =
5154 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
5158 static_cast<const Node *
>(node)->value().first);
5159 if (!comparisonResult) {
5160 nodeFactory().deleteNode(node);
5161 return pair<iterator, bool>(iterator(insertLocation),
false);
5164 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
5166 comparisonResult < 0,
5168 return pair<iterator, bool>(iterator(node),
true);
5172#if BSLSTL_MAP_VARIADIC_LIMIT_E >= 2
5173template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
5174template <
class Args_01,
5177pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
5178map<KEY, VALUE, COMPARATOR, ALLOCATOR>::emplace(
5182 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
5185 int comparisonResult;
5186 BloombergLP::bslalg::RbTreeNode *insertLocation =
5187 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
5191 static_cast<const Node *
>(node)->value().first);
5192 if (!comparisonResult) {
5193 nodeFactory().deleteNode(node);
5194 return pair<iterator, bool>(iterator(insertLocation),
false);
5197 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
5199 comparisonResult < 0,
5201 return pair<iterator, bool>(iterator(node),
true);
5205#if BSLSTL_MAP_VARIADIC_LIMIT_E >= 3
5206template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
5207template <
class Args_01,
5211pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
5212map<KEY, VALUE, COMPARATOR, ALLOCATOR>::emplace(
5217 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
5221 int comparisonResult;
5222 BloombergLP::bslalg::RbTreeNode *insertLocation =
5223 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
5227 static_cast<const Node *
>(node)->value().first);
5228 if (!comparisonResult) {
5229 nodeFactory().deleteNode(node);
5230 return pair<iterator, bool>(iterator(insertLocation),
false);
5233 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
5235 comparisonResult < 0,
5237 return pair<iterator, bool>(iterator(node),
true);
5241#if BSLSTL_MAP_VARIADIC_LIMIT_E >= 4
5242template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
5243template <
class Args_01,
5248pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
5249map<KEY, VALUE, COMPARATOR, ALLOCATOR>::emplace(
5255 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
5260 int comparisonResult;
5261 BloombergLP::bslalg::RbTreeNode *insertLocation =
5262 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
5266 static_cast<const Node *
>(node)->value().first);
5267 if (!comparisonResult) {
5268 nodeFactory().deleteNode(node);
5269 return pair<iterator, bool>(iterator(insertLocation),
false);
5272 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
5274 comparisonResult < 0,
5276 return pair<iterator, bool>(iterator(node),
true);
5280#if BSLSTL_MAP_VARIADIC_LIMIT_E >= 5
5281template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
5282template <
class Args_01,
5288pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
5289map<KEY, VALUE, COMPARATOR, ALLOCATOR>::emplace(
5296 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
5302 int comparisonResult;
5303 BloombergLP::bslalg::RbTreeNode *insertLocation =
5304 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
5308 static_cast<const Node *
>(node)->value().first);
5309 if (!comparisonResult) {
5310 nodeFactory().deleteNode(node);
5311 return pair<iterator, bool>(iterator(insertLocation),
false);
5314 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
5316 comparisonResult < 0,
5318 return pair<iterator, bool>(iterator(node),
true);
5322#if BSLSTL_MAP_VARIADIC_LIMIT_E >= 6
5323template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
5324template <
class Args_01,
5331pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
5332map<KEY, VALUE, COMPARATOR, ALLOCATOR>::emplace(
5340 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
5347 int comparisonResult;
5348 BloombergLP::bslalg::RbTreeNode *insertLocation =
5349 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
5353 static_cast<const Node *
>(node)->value().first);
5354 if (!comparisonResult) {
5355 nodeFactory().deleteNode(node);
5356 return pair<iterator, bool>(iterator(insertLocation),
false);
5359 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
5361 comparisonResult < 0,
5363 return pair<iterator, bool>(iterator(node),
true);
5367#if BSLSTL_MAP_VARIADIC_LIMIT_E >= 7
5368template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
5369template <
class Args_01,
5377pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
5378map<KEY, VALUE, COMPARATOR, ALLOCATOR>::emplace(
5387 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
5395 int comparisonResult;
5396 BloombergLP::bslalg::RbTreeNode *insertLocation =
5397 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
5401 static_cast<const Node *
>(node)->value().first);
5402 if (!comparisonResult) {
5403 nodeFactory().deleteNode(node);
5404 return pair<iterator, bool>(iterator(insertLocation),
false);
5407 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
5409 comparisonResult < 0,
5411 return pair<iterator, bool>(iterator(node),
true);
5415#if BSLSTL_MAP_VARIADIC_LIMIT_E >= 8
5416template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
5417template <
class Args_01,
5426pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
5427map<KEY, VALUE, COMPARATOR, ALLOCATOR>::emplace(
5437 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
5446 int comparisonResult;
5447 BloombergLP::bslalg::RbTreeNode *insertLocation =
5448 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
5452 static_cast<const Node *
>(node)->value().first);
5453 if (!comparisonResult) {
5454 nodeFactory().deleteNode(node);
5455 return pair<iterator, bool>(iterator(insertLocation),
false);
5458 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
5460 comparisonResult < 0,
5462 return pair<iterator, bool>(iterator(node),
true);
5466#if BSLSTL_MAP_VARIADIC_LIMIT_E >= 9
5467template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
5468template <
class Args_01,
5478pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
5479map<KEY, VALUE, COMPARATOR, ALLOCATOR>::emplace(
5490 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
5500 int comparisonResult;
5501 BloombergLP::bslalg::RbTreeNode *insertLocation =
5502 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
5506 static_cast<const Node *
>(node)->value().first);
5507 if (!comparisonResult) {
5508 nodeFactory().deleteNode(node);
5509 return pair<iterator, bool>(iterator(insertLocation),
false);
5512 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
5514 comparisonResult < 0,
5516 return pair<iterator, bool>(iterator(node),
true);
5520#if BSLSTL_MAP_VARIADIC_LIMIT_E >= 10
5521template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
5522template <
class Args_01,
5533pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
5534map<KEY, VALUE, COMPARATOR, ALLOCATOR>::emplace(
5546 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
5557 int comparisonResult;
5558 BloombergLP::bslalg::RbTreeNode *insertLocation =
5559 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
5563 static_cast<const Node *
>(node)->value().first);
5564 if (!comparisonResult) {
5565 nodeFactory().deleteNode(node);
5566 return pair<iterator, bool>(iterator(insertLocation),
false);
5569 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
5571 comparisonResult < 0,
5573 return pair<iterator, bool>(iterator(node),
true);
5578#if BSLSTL_MAP_VARIADIC_LIMIT_E >= 0
5579template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
5581typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
5582map<KEY, VALUE, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint)
5584 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
5586 BloombergLP::bslalg::RbTreeNode *hintNode =
5587 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
5588 int comparisonResult;
5589 BloombergLP::bslalg::RbTreeNode *insertLocation =
5590 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
5594 static_cast<const Node *
>(node)->value().first,
5596 if (!comparisonResult) {
5597 nodeFactory().deleteNode(node);
5598 return iterator(insertLocation);
5601 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
5603 comparisonResult < 0,
5605 return iterator(node);
5609#if BSLSTL_MAP_VARIADIC_LIMIT_E >= 1
5610template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
5611template <
class Args_01>
5613typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
5614map<KEY, VALUE, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
5617 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
5619 BloombergLP::bslalg::RbTreeNode *hintNode =
5620 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
5621 int comparisonResult;
5622 BloombergLP::bslalg::RbTreeNode *insertLocation =
5623 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
5627 static_cast<const Node *
>(node)->value().first,
5629 if (!comparisonResult) {
5630 nodeFactory().deleteNode(node);
5631 return iterator(insertLocation);
5634 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
5636 comparisonResult < 0,
5638 return iterator(node);
5642#if BSLSTL_MAP_VARIADIC_LIMIT_E >= 2
5643template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
5644template <
class Args_01,
5647typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
5648map<KEY, VALUE, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
5652 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
5655 BloombergLP::bslalg::RbTreeNode *hintNode =
5656 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
5657 int comparisonResult;
5658 BloombergLP::bslalg::RbTreeNode *insertLocation =
5659 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
5663 static_cast<const Node *
>(node)->value().first,
5665 if (!comparisonResult) {
5666 nodeFactory().deleteNode(node);
5667 return iterator(insertLocation);
5670 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
5672 comparisonResult < 0,
5674 return iterator(node);
5678#if BSLSTL_MAP_VARIADIC_LIMIT_E >= 3
5679template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
5680template <
class Args_01,
5684typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
5685map<KEY, VALUE, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
5690 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
5694 BloombergLP::bslalg::RbTreeNode *hintNode =
5695 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
5696 int comparisonResult;
5697 BloombergLP::bslalg::RbTreeNode *insertLocation =
5698 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
5702 static_cast<const Node *
>(node)->value().first,
5704 if (!comparisonResult) {
5705 nodeFactory().deleteNode(node);
5706 return iterator(insertLocation);
5709 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
5711 comparisonResult < 0,
5713 return iterator(node);
5717#if BSLSTL_MAP_VARIADIC_LIMIT_E >= 4
5718template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
5719template <
class Args_01,
5724typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
5725map<KEY, VALUE, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
5731 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
5736 BloombergLP::bslalg::RbTreeNode *hintNode =
5737 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
5738 int comparisonResult;
5739 BloombergLP::bslalg::RbTreeNode *insertLocation =
5740 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
5744 static_cast<const Node *
>(node)->value().first,
5746 if (!comparisonResult) {
5747 nodeFactory().deleteNode(node);
5748 return iterator(insertLocation);
5751 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
5753 comparisonResult < 0,
5755 return iterator(node);
5759#if BSLSTL_MAP_VARIADIC_LIMIT_E >= 5
5760template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
5761template <
class Args_01,
5767typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
5768map<KEY, VALUE, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
5775 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
5781 BloombergLP::bslalg::RbTreeNode *hintNode =
5782 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
5783 int comparisonResult;
5784 BloombergLP::bslalg::RbTreeNode *insertLocation =
5785 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
5789 static_cast<const Node *
>(node)->value().first,
5791 if (!comparisonResult) {
5792 nodeFactory().deleteNode(node);
5793 return iterator(insertLocation);
5796 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
5798 comparisonResult < 0,
5800 return iterator(node);
5804#if BSLSTL_MAP_VARIADIC_LIMIT_E >= 6
5805template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
5806template <
class Args_01,
5813typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
5814map<KEY, VALUE, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
5822 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
5829 BloombergLP::bslalg::RbTreeNode *hintNode =
5830 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
5831 int comparisonResult;
5832 BloombergLP::bslalg::RbTreeNode *insertLocation =
5833 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
5837 static_cast<const Node *
>(node)->value().first,
5839 if (!comparisonResult) {
5840 nodeFactory().deleteNode(node);
5841 return iterator(insertLocation);
5844 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
5846 comparisonResult < 0,
5848 return iterator(node);
5852#if BSLSTL_MAP_VARIADIC_LIMIT_E >= 7
5853template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
5854template <
class Args_01,
5862typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
5863map<KEY, VALUE, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
5872 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
5880 BloombergLP::bslalg::RbTreeNode *hintNode =
5881 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
5882 int comparisonResult;
5883 BloombergLP::bslalg::RbTreeNode *insertLocation =
5884 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
5888 static_cast<const Node *
>(node)->value().first,
5890 if (!comparisonResult) {
5891 nodeFactory().deleteNode(node);
5892 return iterator(insertLocation);
5895 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
5897 comparisonResult < 0,
5899 return iterator(node);
5903#if BSLSTL_MAP_VARIADIC_LIMIT_E >= 8
5904template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
5905template <
class Args_01,
5914typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
5915map<KEY, VALUE, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
5925 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
5934 BloombergLP::bslalg::RbTreeNode *hintNode =
5935 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
5936 int comparisonResult;
5937 BloombergLP::bslalg::RbTreeNode *insertLocation =
5938 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
5942 static_cast<const Node *
>(node)->value().first,
5944 if (!comparisonResult) {
5945 nodeFactory().deleteNode(node);
5946 return iterator(insertLocation);
5949 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
5951 comparisonResult < 0,
5953 return iterator(node);
5957#if BSLSTL_MAP_VARIADIC_LIMIT_E >= 9
5958template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
5959template <
class Args_01,
5969typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
5970map<KEY, VALUE, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
5981 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
5991 BloombergLP::bslalg::RbTreeNode *hintNode =
5992 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
5993 int comparisonResult;
5994 BloombergLP::bslalg::RbTreeNode *insertLocation =
5995 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
5999 static_cast<const Node *
>(node)->value().first,
6001 if (!comparisonResult) {
6002 nodeFactory().deleteNode(node);
6003 return iterator(insertLocation);
6006 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
6008 comparisonResult < 0,
6010 return iterator(node);
6014#if BSLSTL_MAP_VARIADIC_LIMIT_E >= 10
6015template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
6016template <
class Args_01,
6027typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
6028map<KEY, VALUE, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
6040 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6051 BloombergLP::bslalg::RbTreeNode *hintNode =
6052 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
6053 int comparisonResult;
6054 BloombergLP::bslalg::RbTreeNode *insertLocation =
6055 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
6059 static_cast<const Node *
>(node)->value().first,
6061 if (!comparisonResult) {
6062 nodeFactory().deleteNode(node);
6063 return iterator(insertLocation);
6066 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
6068 comparisonResult < 0,
6070 return iterator(node);
6078template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
6079template <
class... Args>
6081pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
6082map<KEY, VALUE, COMPARATOR, ALLOCATOR>::emplace(
6085 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6087 int comparisonResult;
6088 BloombergLP::bslalg::RbTreeNode *insertLocation =
6089 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
6093 static_cast<const Node *
>(node)->value().first);
6094 if (!comparisonResult) {
6095 nodeFactory().deleteNode(node);
6096 return pair<iterator, bool>(iterator(insertLocation),
false);
6099 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
6101 comparisonResult < 0,
6103 return pair<iterator, bool>(iterator(node),
true);
6106template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
6107template <
class... Args>
6109typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
6110map<KEY, VALUE, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
6113 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6115 BloombergLP::bslalg::RbTreeNode *hintNode =
6116 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
6117 int comparisonResult;
6118 BloombergLP::bslalg::RbTreeNode *insertLocation =
6119 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
6123 static_cast<const Node *
>(node)->value().first,
6125 if (!comparisonResult) {
6126 nodeFactory().deleteNode(node);
6127 return iterator(insertLocation);
6130 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
6132 comparisonResult < 0,
6134 return iterator(node);
6140template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
6142typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
6143map<KEY, VALUE, COMPARATOR, ALLOCATOR>::erase(const_iterator position)
6147 BloombergLP::bslalg::RbTreeNode *node =
6148 const_cast<BloombergLP::bslalg::RbTreeNode *
>(position.node());
6149 BloombergLP::bslalg::RbTreeNode *result =
6150 BloombergLP::bslalg::RbTreeUtil::next(node);
6151 BloombergLP::bslalg::RbTreeUtil::remove(&d_tree, node);
6152 nodeFactory().deleteNode(node);
6153 return iterator(result);
6156template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
6158typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
6159map<KEY, VALUE, COMPARATOR, ALLOCATOR>::erase(iterator position)
6161 return erase(const_iterator(position));
6164template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
6166typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::size_type
6167map<KEY, VALUE, COMPARATOR, ALLOCATOR>::erase(
const key_type& key)
6169 const_iterator it = find(key);
6177template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
6179typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
6180map<KEY, VALUE, COMPARATOR, ALLOCATOR>::erase(const_iterator first,
6181 const_iterator last)
6183 while (first != last) {
6184 first =
erase(first);
6186 return iterator(last.node());
6189template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
6191void map<KEY, VALUE, COMPARATOR, ALLOCATOR>::swap(map& other)
6193 AllocatorTraits::is_always_equal::value &&
6194 bsl::is_nothrow_swappable<COMPARATOR>::value)
6196 if (AllocatorTraits::propagate_on_container_swap::value) {
6197 quickSwapExchangeAllocators(other);
6204 nodeFactory().allocator() == other.nodeFactory().allocator())) {
6205 quickSwapRetainAllocators(other);
6210 map toOtherCopy(MoveUtil::move(*
this),
6211 other.nodeFactory().allocator());
6212 map toThisCopy(MoveUtil::move(other), nodeFactory().allocator());
6214 this->quickSwapRetainAllocators(toThisCopy);
6215 other.quickSwapRetainAllocators(toOtherCopy);
6220#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
6223#ifndef BSLSTL_MAP_VARIADIC_LIMIT
6224#define BSLSTL_MAP_VARIADIC_LIMIT 10
6226#ifndef BSLSTL_MAP_VARIADIC_LIMIT_F
6227#define BSLSTL_MAP_VARIADIC_LIMIT_F BSLSTL_MAP_VARIADIC_LIMIT
6229#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 0
6230template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
6232pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
6233map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
const key_type& key)
6235 int comparisonResult;
6236 BloombergLP::bslalg::RbTreeNode *insertLocation =
6237 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
6242 if (!comparisonResult) {
6243 return pair<iterator, bool>(iterator(insertLocation),
false);
6246#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
6247 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6248 std::piecewise_construct,
6249 std::forward_as_tuple(key),
6250 std::forward_as_tuple());
6252 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6257 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
6259 comparisonResult < 0,
6261 return pair<iterator, bool>(iterator(node),
true);
6265#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 1
6266template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
6267template <
class Args_01>
6269pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
6270map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
const key_type& key,
6273 int comparisonResult;
6274 BloombergLP::bslalg::RbTreeNode *insertLocation =
6275 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
6280 if (!comparisonResult) {
6281 return pair<iterator, bool>(iterator(insertLocation),
false);
6284#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
6285 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6286 std::piecewise_construct,
6287 std::forward_as_tuple(key),
6288 std::forward_as_tuple(
6291 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6296 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
6298 comparisonResult < 0,
6300 return pair<iterator, bool>(iterator(node),
true);
6304#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 2
6305template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
6306template <
class Args_01,
6309pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
6310map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
const key_type& key,
6314 int comparisonResult;
6315 BloombergLP::bslalg::RbTreeNode *insertLocation =
6316 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
6321 if (!comparisonResult) {
6322 return pair<iterator, bool>(iterator(insertLocation),
false);
6325#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
6326 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6327 std::piecewise_construct,
6328 std::forward_as_tuple(key),
6329 std::forward_as_tuple(
6333 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6339 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
6341 comparisonResult < 0,
6343 return pair<iterator, bool>(iterator(node),
true);
6347#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 3
6348template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
6349template <
class Args_01,
6353pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
6354map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
const key_type& key,
6359 int comparisonResult;
6360 BloombergLP::bslalg::RbTreeNode *insertLocation =
6361 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
6366 if (!comparisonResult) {
6367 return pair<iterator, bool>(iterator(insertLocation),
false);
6370#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
6371 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6372 std::piecewise_construct,
6373 std::forward_as_tuple(key),
6374 std::forward_as_tuple(
6379 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6386 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
6388 comparisonResult < 0,
6390 return pair<iterator, bool>(iterator(node),
true);
6394#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 4
6395template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
6396template <
class Args_01,
6401pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
6402map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
const key_type& key,
6408 int comparisonResult;
6409 BloombergLP::bslalg::RbTreeNode *insertLocation =
6410 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
6415 if (!comparisonResult) {
6416 return pair<iterator, bool>(iterator(insertLocation),
false);
6419#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
6420 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6421 std::piecewise_construct,
6422 std::forward_as_tuple(key),
6423 std::forward_as_tuple(
6429 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6437 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
6439 comparisonResult < 0,
6441 return pair<iterator, bool>(iterator(node),
true);
6445#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 5
6446template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
6447template <
class Args_01,
6453pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
6454map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
const key_type& key,
6461 int comparisonResult;
6462 BloombergLP::bslalg::RbTreeNode *insertLocation =
6463 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
6468 if (!comparisonResult) {
6469 return pair<iterator, bool>(iterator(insertLocation),
false);
6472#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
6473 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6474 std::piecewise_construct,
6475 std::forward_as_tuple(key),
6476 std::forward_as_tuple(
6483 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6492 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
6494 comparisonResult < 0,
6496 return pair<iterator, bool>(iterator(node),
true);
6500#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 6
6501template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
6502template <
class Args_01,
6509pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
6510map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
const key_type& key,
6518 int comparisonResult;
6519 BloombergLP::bslalg::RbTreeNode *insertLocation =
6520 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
6525 if (!comparisonResult) {
6526 return pair<iterator, bool>(iterator(insertLocation),
false);
6529#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
6530 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6531 std::piecewise_construct,
6532 std::forward_as_tuple(key),
6533 std::forward_as_tuple(
6541 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6551 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
6553 comparisonResult < 0,
6555 return pair<iterator, bool>(iterator(node),
true);
6559#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 7
6560template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
6561template <
class Args_01,
6569pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
6570map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
const key_type& key,
6579 int comparisonResult;
6580 BloombergLP::bslalg::RbTreeNode *insertLocation =
6581 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
6586 if (!comparisonResult) {
6587 return pair<iterator, bool>(iterator(insertLocation),
false);
6590#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
6591 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6592 std::piecewise_construct,
6593 std::forward_as_tuple(key),
6594 std::forward_as_tuple(
6603 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6614 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
6616 comparisonResult < 0,
6618 return pair<iterator, bool>(iterator(node),
true);
6622#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 8
6623template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
6624template <
class Args_01,
6633pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
6634map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
const key_type& key,
6644 int comparisonResult;
6645 BloombergLP::bslalg::RbTreeNode *insertLocation =
6646 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
6651 if (!comparisonResult) {
6652 return pair<iterator, bool>(iterator(insertLocation),
false);
6655#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
6656 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6657 std::piecewise_construct,
6658 std::forward_as_tuple(key),
6659 std::forward_as_tuple(
6669 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6681 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
6683 comparisonResult < 0,
6685 return pair<iterator, bool>(iterator(node),
true);
6689#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 9
6690template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
6691template <
class Args_01,
6701pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
6702map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
const key_type& key,
6713 int comparisonResult;
6714 BloombergLP::bslalg::RbTreeNode *insertLocation =
6715 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
6720 if (!comparisonResult) {
6721 return pair<iterator, bool>(iterator(insertLocation),
false);
6724#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
6725 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6726 std::piecewise_construct,
6727 std::forward_as_tuple(key),
6728 std::forward_as_tuple(
6739 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6752 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
6754 comparisonResult < 0,
6756 return pair<iterator, bool>(iterator(node),
true);
6760#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 10
6761template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
6762template <
class Args_01,
6773pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
6774map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
const key_type& key,
6786 int comparisonResult;
6787 BloombergLP::bslalg::RbTreeNode *insertLocation =
6788 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
6793 if (!comparisonResult) {
6794 return pair<iterator, bool>(iterator(insertLocation),
false);
6797#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
6798 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6799 std::piecewise_construct,
6800 std::forward_as_tuple(key),
6801 std::forward_as_tuple(
6813 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6827 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
6829 comparisonResult < 0,
6831 return pair<iterator, bool>(iterator(node),
true);
6836#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 0
6837template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
6839typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
6840map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(const_iterator hint,
6841 const key_type& key)
6843 BloombergLP::bslalg::RbTreeNode *hintNode =
6844 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
6845 int comparisonResult;
6846 BloombergLP::bslalg::RbTreeNode *insertLocation =
6847 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
6853 if (!comparisonResult) {
6854 return iterator(insertLocation);
6857#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
6858 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6859 std::piecewise_construct,
6860 std::forward_as_tuple(key),
6861 std::forward_as_tuple());
6863 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6868 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
6870 comparisonResult < 0,
6872 return iterator(node);
6876#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 1
6877template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
6878template <
class Args_01>
6880typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
6881map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(const_iterator hint,
6882 const key_type& key,
6885 BloombergLP::bslalg::RbTreeNode *hintNode =
6886 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
6887 int comparisonResult;
6888 BloombergLP::bslalg::RbTreeNode *insertLocation =
6889 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
6895 if (!comparisonResult) {
6896 return iterator(insertLocation);
6899#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
6900 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6901 std::piecewise_construct,
6902 std::forward_as_tuple(key),
6903 std::forward_as_tuple(
6906 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6911 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
6913 comparisonResult < 0,
6915 return iterator(node);
6919#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 2
6920template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
6921template <
class Args_01,
6924typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
6925map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(const_iterator hint,
6926 const key_type& key,
6930 BloombergLP::bslalg::RbTreeNode *hintNode =
6931 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
6932 int comparisonResult;
6933 BloombergLP::bslalg::RbTreeNode *insertLocation =
6934 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
6940 if (!comparisonResult) {
6941 return iterator(insertLocation);
6944#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
6945 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6946 std::piecewise_construct,
6947 std::forward_as_tuple(key),
6948 std::forward_as_tuple(
6952 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6958 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
6960 comparisonResult < 0,
6962 return iterator(node);
6966#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 3
6967template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
6968template <
class Args_01,
6972typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
6973map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(const_iterator hint,
6974 const key_type& key,
6979 BloombergLP::bslalg::RbTreeNode *hintNode =
6980 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
6981 int comparisonResult;
6982 BloombergLP::bslalg::RbTreeNode *insertLocation =
6983 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
6989 if (!comparisonResult) {
6990 return iterator(insertLocation);
6993#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
6994 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
6995 std::piecewise_construct,
6996 std::forward_as_tuple(key),
6997 std::forward_as_tuple(
7002 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7009 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
7011 comparisonResult < 0,
7013 return iterator(node);
7017#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 4
7018template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
7019template <
class Args_01,
7024typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
7025map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(const_iterator hint,
7026 const key_type& key,
7032 BloombergLP::bslalg::RbTreeNode *hintNode =
7033 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
7034 int comparisonResult;
7035 BloombergLP::bslalg::RbTreeNode *insertLocation =
7036 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
7042 if (!comparisonResult) {
7043 return iterator(insertLocation);
7046#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
7047 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7048 std::piecewise_construct,
7049 std::forward_as_tuple(key),
7050 std::forward_as_tuple(
7056 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7064 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
7066 comparisonResult < 0,
7068 return iterator(node);
7072#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 5
7073template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
7074template <
class Args_01,
7080typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
7081map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(const_iterator hint,
7082 const key_type& key,
7089 BloombergLP::bslalg::RbTreeNode *hintNode =
7090 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
7091 int comparisonResult;
7092 BloombergLP::bslalg::RbTreeNode *insertLocation =
7093 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
7099 if (!comparisonResult) {
7100 return iterator(insertLocation);
7103#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
7104 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7105 std::piecewise_construct,
7106 std::forward_as_tuple(key),
7107 std::forward_as_tuple(
7114 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7123 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
7125 comparisonResult < 0,
7127 return iterator(node);
7131#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 6
7132template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
7133template <
class Args_01,
7140typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
7141map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(const_iterator hint,
7142 const key_type& key,
7150 BloombergLP::bslalg::RbTreeNode *hintNode =
7151 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
7152 int comparisonResult;
7153 BloombergLP::bslalg::RbTreeNode *insertLocation =
7154 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
7160 if (!comparisonResult) {
7161 return iterator(insertLocation);
7164#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
7165 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7166 std::piecewise_construct,
7167 std::forward_as_tuple(key),
7168 std::forward_as_tuple(
7176 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7186 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
7188 comparisonResult < 0,
7190 return iterator(node);
7194#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 7
7195template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
7196template <
class Args_01,
7204typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
7205map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(const_iterator hint,
7206 const key_type& key,
7215 BloombergLP::bslalg::RbTreeNode *hintNode =
7216 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
7217 int comparisonResult;
7218 BloombergLP::bslalg::RbTreeNode *insertLocation =
7219 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
7225 if (!comparisonResult) {
7226 return iterator(insertLocation);
7229#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
7230 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7231 std::piecewise_construct,
7232 std::forward_as_tuple(key),
7233 std::forward_as_tuple(
7242 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7253 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
7255 comparisonResult < 0,
7257 return iterator(node);
7261#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 8
7262template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
7263template <
class Args_01,
7272typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
7273map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(const_iterator hint,
7274 const key_type& key,
7284 BloombergLP::bslalg::RbTreeNode *hintNode =
7285 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
7286 int comparisonResult;
7287 BloombergLP::bslalg::RbTreeNode *insertLocation =
7288 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
7294 if (!comparisonResult) {
7295 return iterator(insertLocation);
7298#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
7299 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7300 std::piecewise_construct,
7301 std::forward_as_tuple(key),
7302 std::forward_as_tuple(
7312 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7324 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
7326 comparisonResult < 0,
7328 return iterator(node);
7332#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 9
7333template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
7334template <
class Args_01,
7344typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
7345map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(const_iterator hint,
7346 const key_type& key,
7357 BloombergLP::bslalg::RbTreeNode *hintNode =
7358 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
7359 int comparisonResult;
7360 BloombergLP::bslalg::RbTreeNode *insertLocation =
7361 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
7367 if (!comparisonResult) {
7368 return iterator(insertLocation);
7371#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
7372 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7373 std::piecewise_construct,
7374 std::forward_as_tuple(key),
7375 std::forward_as_tuple(
7386 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7399 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
7401 comparisonResult < 0,
7403 return iterator(node);
7407#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 10
7408template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
7409template <
class Args_01,
7420typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
7421map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(const_iterator hint,
7422 const key_type& key,
7434 BloombergLP::bslalg::RbTreeNode *hintNode =
7435 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
7436 int comparisonResult;
7437 BloombergLP::bslalg::RbTreeNode *insertLocation =
7438 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
7444 if (!comparisonResult) {
7445 return iterator(insertLocation);
7448#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
7449 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7450 std::piecewise_construct,
7451 std::forward_as_tuple(key),
7452 std::forward_as_tuple(
7464 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7478 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
7480 comparisonResult < 0,
7482 return iterator(node);
7487#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 0
7488template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
7490pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
7491map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
7492 BloombergLP::bslmf::MovableRef<key_type> key)
7494 key_type& lvalue = key;
7496 int comparisonResult;
7497 BloombergLP::bslalg::RbTreeNode *insertLocation =
7498 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
7503 if (!comparisonResult) {
7504 return pair<iterator, bool>(iterator(insertLocation),
false);
7507#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
7508 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7509 std::piecewise_construct,
7511 std::forward_as_tuple());
7513 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7518 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
7520 comparisonResult < 0,
7523 return pair<iterator, bool>(iterator(node),
true);
7527#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 1
7528template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
7529template <
class Args_01>
7531pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
7532map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
7533 BloombergLP::bslmf::MovableRef<key_type> key,
7536 key_type& lvalue = key;
7538 int comparisonResult;
7539 BloombergLP::bslalg::RbTreeNode *insertLocation =
7540 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
7545 if (!comparisonResult) {
7546 return pair<iterator, bool>(iterator(insertLocation),
false);
7549#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
7550 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7551 std::piecewise_construct,
7553 std::forward_as_tuple(
7556 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7561 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
7563 comparisonResult < 0,
7566 return pair<iterator, bool>(iterator(node),
true);
7570#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 2
7571template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
7572template <
class Args_01,
7575pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
7576map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
7577 BloombergLP::bslmf::MovableRef<key_type> key,
7581 key_type& lvalue = key;
7583 int comparisonResult;
7584 BloombergLP::bslalg::RbTreeNode *insertLocation =
7585 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
7590 if (!comparisonResult) {
7591 return pair<iterator, bool>(iterator(insertLocation),
false);
7594#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
7595 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7596 std::piecewise_construct,
7598 std::forward_as_tuple(
7602 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7608 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
7610 comparisonResult < 0,
7613 return pair<iterator, bool>(iterator(node),
true);
7617#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 3
7618template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
7619template <
class Args_01,
7623pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
7624map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
7625 BloombergLP::bslmf::MovableRef<key_type> key,
7630 key_type& lvalue = key;
7632 int comparisonResult;
7633 BloombergLP::bslalg::RbTreeNode *insertLocation =
7634 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
7639 if (!comparisonResult) {
7640 return pair<iterator, bool>(iterator(insertLocation),
false);
7643#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
7644 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7645 std::piecewise_construct,
7647 std::forward_as_tuple(
7652 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7659 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
7661 comparisonResult < 0,
7664 return pair<iterator, bool>(iterator(node),
true);
7668#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 4
7669template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
7670template <
class Args_01,
7675pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
7676map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
7677 BloombergLP::bslmf::MovableRef<key_type> key,
7683 key_type& lvalue = key;
7685 int comparisonResult;
7686 BloombergLP::bslalg::RbTreeNode *insertLocation =
7687 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
7692 if (!comparisonResult) {
7693 return pair<iterator, bool>(iterator(insertLocation),
false);
7696#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
7697 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7698 std::piecewise_construct,
7700 std::forward_as_tuple(
7706 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7714 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
7716 comparisonResult < 0,
7719 return pair<iterator, bool>(iterator(node),
true);
7723#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 5
7724template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
7725template <
class Args_01,
7731pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
7732map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
7733 BloombergLP::bslmf::MovableRef<key_type> key,
7740 key_type& lvalue = key;
7742 int comparisonResult;
7743 BloombergLP::bslalg::RbTreeNode *insertLocation =
7744 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
7749 if (!comparisonResult) {
7750 return pair<iterator, bool>(iterator(insertLocation),
false);
7753#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
7754 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7755 std::piecewise_construct,
7757 std::forward_as_tuple(
7764 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7773 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
7775 comparisonResult < 0,
7778 return pair<iterator, bool>(iterator(node),
true);
7782#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 6
7783template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
7784template <
class Args_01,
7791pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
7792map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
7793 BloombergLP::bslmf::MovableRef<key_type> key,
7801 key_type& lvalue = key;
7803 int comparisonResult;
7804 BloombergLP::bslalg::RbTreeNode *insertLocation =
7805 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
7810 if (!comparisonResult) {
7811 return pair<iterator, bool>(iterator(insertLocation),
false);
7814#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
7815 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7816 std::piecewise_construct,
7818 std::forward_as_tuple(
7826 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7836 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
7838 comparisonResult < 0,
7841 return pair<iterator, bool>(iterator(node),
true);
7845#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 7
7846template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
7847template <
class Args_01,
7855pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
7856map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
7857 BloombergLP::bslmf::MovableRef<key_type> key,
7866 key_type& lvalue = key;
7868 int comparisonResult;
7869 BloombergLP::bslalg::RbTreeNode *insertLocation =
7870 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
7875 if (!comparisonResult) {
7876 return pair<iterator, bool>(iterator(insertLocation),
false);
7879#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
7880 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7881 std::piecewise_construct,
7883 std::forward_as_tuple(
7892 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7903 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
7905 comparisonResult < 0,
7908 return pair<iterator, bool>(iterator(node),
true);
7912#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 8
7913template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
7914template <
class Args_01,
7923pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
7924map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
7925 BloombergLP::bslmf::MovableRef<key_type> key,
7935 key_type& lvalue = key;
7937 int comparisonResult;
7938 BloombergLP::bslalg::RbTreeNode *insertLocation =
7939 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
7944 if (!comparisonResult) {
7945 return pair<iterator, bool>(iterator(insertLocation),
false);
7948#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
7949 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7950 std::piecewise_construct,
7952 std::forward_as_tuple(
7962 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
7974 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
7976 comparisonResult < 0,
7979 return pair<iterator, bool>(iterator(node),
true);
7983#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 9
7984template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
7985template <
class Args_01,
7995pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
7996map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
7997 BloombergLP::bslmf::MovableRef<key_type> key,
8008 key_type& lvalue = key;
8010 int comparisonResult;
8011 BloombergLP::bslalg::RbTreeNode *insertLocation =
8012 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
8017 if (!comparisonResult) {
8018 return pair<iterator, bool>(iterator(insertLocation),
false);
8021#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
8022 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8023 std::piecewise_construct,
8025 std::forward_as_tuple(
8036 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8049 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
8051 comparisonResult < 0,
8054 return pair<iterator, bool>(iterator(node),
true);
8058#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 10
8059template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
8060template <
class Args_01,
8071pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
8072map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
8073 BloombergLP::bslmf::MovableRef<key_type> key,
8085 key_type& lvalue = key;
8087 int comparisonResult;
8088 BloombergLP::bslalg::RbTreeNode *insertLocation =
8089 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
8094 if (!comparisonResult) {
8095 return pair<iterator, bool>(iterator(insertLocation),
false);
8098#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
8099 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8100 std::piecewise_construct,
8102 std::forward_as_tuple(
8114 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8128 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
8130 comparisonResult < 0,
8133 return pair<iterator, bool>(iterator(node),
true);
8138#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 0
8139template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
8141typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
8142map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
8143 const_iterator hint,
8144 BloombergLP::bslmf::MovableRef<key_type> key)
8146 key_type& lvalue = key;
8148 BloombergLP::bslalg::RbTreeNode *hintNode =
8149 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
8150 int comparisonResult;
8151 BloombergLP::bslalg::RbTreeNode *insertLocation =
8152 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
8158 if (!comparisonResult) {
8159 return iterator(insertLocation);
8162#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
8163 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8164 std::piecewise_construct,
8166 std::forward_as_tuple());
8168 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8173 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
8175 comparisonResult < 0,
8177 return iterator(node);
8181#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 1
8182template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
8183template <
class Args_01>
8185typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
8186map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
8187 const_iterator hint,
8188 BloombergLP::bslmf::MovableRef<key_type> key,
8191 key_type& lvalue = key;
8193 BloombergLP::bslalg::RbTreeNode *hintNode =
8194 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
8195 int comparisonResult;
8196 BloombergLP::bslalg::RbTreeNode *insertLocation =
8197 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
8203 if (!comparisonResult) {
8204 return iterator(insertLocation);
8207#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
8208 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8209 std::piecewise_construct,
8211 std::forward_as_tuple(
8214 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8219 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
8221 comparisonResult < 0,
8223 return iterator(node);
8227#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 2
8228template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
8229template <
class Args_01,
8232typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
8233map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
8234 const_iterator hint,
8235 BloombergLP::bslmf::MovableRef<key_type> key,
8239 key_type& lvalue = key;
8241 BloombergLP::bslalg::RbTreeNode *hintNode =
8242 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
8243 int comparisonResult;
8244 BloombergLP::bslalg::RbTreeNode *insertLocation =
8245 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
8251 if (!comparisonResult) {
8252 return iterator(insertLocation);
8255#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
8256 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8257 std::piecewise_construct,
8259 std::forward_as_tuple(
8263 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8269 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
8271 comparisonResult < 0,
8273 return iterator(node);
8277#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 3
8278template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
8279template <
class Args_01,
8283typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
8284map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
8285 const_iterator hint,
8286 BloombergLP::bslmf::MovableRef<key_type> key,
8291 key_type& lvalue = key;
8293 BloombergLP::bslalg::RbTreeNode *hintNode =
8294 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
8295 int comparisonResult;
8296 BloombergLP::bslalg::RbTreeNode *insertLocation =
8297 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
8303 if (!comparisonResult) {
8304 return iterator(insertLocation);
8307#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
8308 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8309 std::piecewise_construct,
8311 std::forward_as_tuple(
8316 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8323 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
8325 comparisonResult < 0,
8327 return iterator(node);
8331#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 4
8332template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
8333template <
class Args_01,
8338typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
8339map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
8340 const_iterator hint,
8341 BloombergLP::bslmf::MovableRef<key_type> key,
8347 key_type& lvalue = key;
8349 BloombergLP::bslalg::RbTreeNode *hintNode =
8350 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
8351 int comparisonResult;
8352 BloombergLP::bslalg::RbTreeNode *insertLocation =
8353 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
8359 if (!comparisonResult) {
8360 return iterator(insertLocation);
8363#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
8364 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8365 std::piecewise_construct,
8367 std::forward_as_tuple(
8373 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8381 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
8383 comparisonResult < 0,
8385 return iterator(node);
8389#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 5
8390template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
8391template <
class Args_01,
8397typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
8398map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
8399 const_iterator hint,
8400 BloombergLP::bslmf::MovableRef<key_type> key,
8407 key_type& lvalue = key;
8409 BloombergLP::bslalg::RbTreeNode *hintNode =
8410 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
8411 int comparisonResult;
8412 BloombergLP::bslalg::RbTreeNode *insertLocation =
8413 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
8419 if (!comparisonResult) {
8420 return iterator(insertLocation);
8423#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
8424 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8425 std::piecewise_construct,
8427 std::forward_as_tuple(
8434 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8443 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
8445 comparisonResult < 0,
8447 return iterator(node);
8451#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 6
8452template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
8453template <
class Args_01,
8460typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
8461map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
8462 const_iterator hint,
8463 BloombergLP::bslmf::MovableRef<key_type> key,
8471 key_type& lvalue = key;
8473 BloombergLP::bslalg::RbTreeNode *hintNode =
8474 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
8475 int comparisonResult;
8476 BloombergLP::bslalg::RbTreeNode *insertLocation =
8477 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
8483 if (!comparisonResult) {
8484 return iterator(insertLocation);
8487#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
8488 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8489 std::piecewise_construct,
8491 std::forward_as_tuple(
8499 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8509 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
8511 comparisonResult < 0,
8513 return iterator(node);
8517#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 7
8518template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
8519template <
class Args_01,
8527typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
8528map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
8529 const_iterator hint,
8530 BloombergLP::bslmf::MovableRef<key_type> key,
8539 key_type& lvalue = key;
8541 BloombergLP::bslalg::RbTreeNode *hintNode =
8542 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
8543 int comparisonResult;
8544 BloombergLP::bslalg::RbTreeNode *insertLocation =
8545 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
8551 if (!comparisonResult) {
8552 return iterator(insertLocation);
8555#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
8556 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8557 std::piecewise_construct,
8559 std::forward_as_tuple(
8568 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8579 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
8581 comparisonResult < 0,
8583 return iterator(node);
8587#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 8
8588template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
8589template <
class Args_01,
8598typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
8599map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
8600 const_iterator hint,
8601 BloombergLP::bslmf::MovableRef<key_type> key,
8611 key_type& lvalue = key;
8613 BloombergLP::bslalg::RbTreeNode *hintNode =
8614 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
8615 int comparisonResult;
8616 BloombergLP::bslalg::RbTreeNode *insertLocation =
8617 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
8623 if (!comparisonResult) {
8624 return iterator(insertLocation);
8627#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
8628 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8629 std::piecewise_construct,
8631 std::forward_as_tuple(
8641 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8653 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
8655 comparisonResult < 0,
8657 return iterator(node);
8661#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 9
8662template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
8663template <
class Args_01,
8673typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
8674map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
8675 const_iterator hint,
8676 BloombergLP::bslmf::MovableRef<key_type> key,
8687 key_type& lvalue = key;
8689 BloombergLP::bslalg::RbTreeNode *hintNode =
8690 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
8691 int comparisonResult;
8692 BloombergLP::bslalg::RbTreeNode *insertLocation =
8693 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
8699 if (!comparisonResult) {
8700 return iterator(insertLocation);
8703#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
8704 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8705 std::piecewise_construct,
8707 std::forward_as_tuple(
8718 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8731 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
8733 comparisonResult < 0,
8735 return iterator(node);
8739#if BSLSTL_MAP_VARIADIC_LIMIT_F >= 10
8740template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
8741template <
class Args_01,
8752typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
8753map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
8754 const_iterator hint,
8755 BloombergLP::bslmf::MovableRef<key_type> key,
8767 key_type& lvalue = key;
8769 BloombergLP::bslalg::RbTreeNode *hintNode =
8770 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
8771 int comparisonResult;
8772 BloombergLP::bslalg::RbTreeNode *insertLocation =
8773 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
8779 if (!comparisonResult) {
8780 return iterator(insertLocation);
8783#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
8784 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8785 std::piecewise_construct,
8787 std::forward_as_tuple(
8799 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8813 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
8815 comparisonResult < 0,
8817 return iterator(node);
8824template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
8825template <
class... Args>
8827pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
8828map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
const key_type& key,
8831 int comparisonResult;
8832 BloombergLP::bslalg::RbTreeNode *insertLocation =
8833 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
8838 if (!comparisonResult) {
8839 return pair<iterator, bool>(iterator(insertLocation),
false);
8842#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
8843 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8844 std::piecewise_construct,
8845 std::forward_as_tuple(key),
8848 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8853 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
8855 comparisonResult < 0,
8857 return pair<iterator, bool>(iterator(node),
true);
8860template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
8861template <
class... Args>
8863typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
8864map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(const_iterator hint,
8865 const key_type& key,
8868 BloombergLP::bslalg::RbTreeNode *hintNode =
8869 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
8870 int comparisonResult;
8871 BloombergLP::bslalg::RbTreeNode *insertLocation =
8872 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
8878 if (!comparisonResult) {
8879 return iterator(insertLocation);
8882#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
8883 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8884 std::piecewise_construct,
8885 std::forward_as_tuple(key),
8888 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8893 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
8895 comparisonResult < 0,
8897 return iterator(node);
8900template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
8901template <
class... Args>
8903pair<typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator,
bool>
8904map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
8905 BloombergLP::bslmf::MovableRef<key_type> key,
8908 key_type& lvalue = key;
8910 int comparisonResult;
8911 BloombergLP::bslalg::RbTreeNode *insertLocation =
8912 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
8917 if (!comparisonResult) {
8918 return pair<iterator, bool>(iterator(insertLocation),
false);
8921#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
8922 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8923 std::piecewise_construct,
8927 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8932 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
8934 comparisonResult < 0,
8937 return pair<iterator, bool>(iterator(node),
true);
8940template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
8941template <
class... Args>
8943typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
8944map<KEY, VALUE, COMPARATOR, ALLOCATOR>::try_emplace(
8945 const_iterator hint,
8946 BloombergLP::bslmf::MovableRef<key_type> key,
8949 key_type& lvalue = key;
8951 BloombergLP::bslalg::RbTreeNode *hintNode =
8952 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
8953 int comparisonResult;
8954 BloombergLP::bslalg::RbTreeNode *insertLocation =
8955 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
8961 if (!comparisonResult) {
8962 return iterator(insertLocation);
8965#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
8966 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8967 std::piecewise_construct,
8971 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
8976 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
8978 comparisonResult < 0,
8980 return iterator(node);
8985template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
8991 if (d_tree.rootNode()) {
8995 BloombergLP::bslalg::RbTreeUtil::deleteTree(&d_tree, &nodeFactory());
8997#if defined(BSLS_ASSERT_SAFE_IS_USED)
9006template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
9008typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::allocator_type
9009map<KEY, VALUE, COMPARATOR, ALLOCATOR>::get_allocator() const
9012 return nodeFactory().allocator();
9015template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
9017typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::const_iterator
9023template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
9025typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::const_iterator
9031template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
9033typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::const_reverse_iterator
9039template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
9041typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::const_reverse_iterator
9047template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
9049typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::const_iterator
9052 return const_iterator(d_tree.firstNode());
9055template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
9057typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::const_iterator
9060 return const_iterator(d_tree.sentinel());
9063template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
9065typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::const_reverse_iterator
9068 return const_reverse_iterator(
end());
9071template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
9073typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::const_reverse_iterator
9076 return const_reverse_iterator(
begin());
9079template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
9081bool map<KEY, VALUE, COMPARATOR, ALLOCATOR>::contains(
9082 const key_type& key)
const
9084 return find(key) !=
end();
9088template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
9090bool map<KEY, VALUE, COMPARATOR, ALLOCATOR>::empty() const
9093 return 0 == d_tree.numNodes();
9096template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
9098typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::size_type
9101 return d_tree.numNodes();
9104template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
9106typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::size_type
9109 return AllocatorTraits::max_size(get_allocator());
9112template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
9113typename add_lvalue_reference<const VALUE>::type
9114map<KEY, VALUE, COMPARATOR, ALLOCATOR>::at(
9115 const key_type& key)
const
9117 const BloombergLP::bslalg::RbTreeNode *node =
9118 BloombergLP::bslalg::RbTreeUtil::find(d_tree,
9121 if (d_tree.sentinel() == node) {
9122 BloombergLP::bslstl::StdExceptUtil::throwOutOfRange(
9123 "map<...>::at(key_type): invalid key value");
9125 return toNode(node)->value().second;
9128template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
9130typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::key_compare
9131map<KEY, VALUE, COMPARATOR, ALLOCATOR>::key_comp()
const
9133 return comparator().keyComparator();
9136template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
9138typename map<KEY, VALUE, COMPARATOR, ALLOCATOR>::value_compare
9139map<KEY, VALUE, COMPARATOR, ALLOCATOR>::value_comp()
const
9141 return value_compare(key_comp());
9147template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
9152 return BloombergLP::bslalg::RangeCompare::equal(lhs.
begin(),
9160#ifndef BSLS_COMPILERFEATURES_SUPPORT_THREE_WAY_COMPARISON
9161template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
9166 return !(lhs == rhs);
9170#ifdef BSLALG_SYNTHTHREEWAYUTIL_AVAILABLE
9172template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
9174BloombergLP::bslalg::SynthThreeWayUtil::Result<bsl::pair<const KEY, VALUE>>
9175bsl::operator<=>(
const map<KEY, VALUE, COMPARATOR, ALLOCATOR>& lhs,
9176 const map<KEY, VALUE, COMPARATOR, ALLOCATOR>& rhs)
9178 return bsl::lexicographical_compare_three_way(
9183 BloombergLP::bslalg::SynthThreeWayUtil::compare);
9188template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
9193 return 0 > BloombergLP::bslalg::RangeCompare::lexicographical(lhs.
begin(),
9201template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
9209template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
9214 return !(rhs < lhs);
9217template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
9222 return !(lhs < rhs);
9235bsl::erase_if(map<KEY, VALUE, COMPARATOR, ALLOCATOR>& m, PREDICATE predicate)
9237 return BloombergLP::bslstl::AlgorithmUtil::containerEraseIf(m, predicate);
9240template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
9262template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
9263struct HasStlIterators<
bsl::map<KEY, VALUE, COMPARATOR, ALLOCATOR> >
9272template <
class KEY,
class VALUE,
class COMPARATOR,
class ALLOCATOR>
9273struct UsesBslmaAllocator<
bsl::map<KEY, VALUE, COMPARATOR, ALLOCATOR> >
9283# error Not valid except when included from bslstl_map.h
Definition bslma_bslallocator.h:580
value_compare(COMPARATOR comparator)
Definition bslstl_map.h:2328
value_type second_argument_type
Definition bslstl_map.h:768
COMPARATOR comp
Definition bslstl_map.h:743
bool operator()(const value_type &x, const value_type &y) const
Definition bslstl_map.h:2337
value_type first_argument_type
Definition bslstl_map.h:763
value_compare & operator=(const value_compare &rhs)=default
friend class map
Definition bslstl_map.h:739
bool result_type
Definition bslstl_map.h:758
Definition bslstl_map.h:619
value_type & reference
Definition bslstl_map.h:713
iterator erase(const_iterator position)
Definition bslstl_map.h:3166
allocator_type get_allocator() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_map.h:3428
const_reverse_iterator crend() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_map.h:3493
map &operator=(BloombergLP::bslmf::MovableRef< map > rhs) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(AllocatorTraits add_lvalue_reference< VALUE >::type operator[](const key_type &key)
Definition bslstl_map.h:2680
bool contains(const key_type &key) const
Definition bslstl_map.h:3500
BloombergLP::bslstl::TreeIterator< const value_type, Node, difference_type > const_iterator
Definition bslstl_map.h:724
reverse_iterator rend() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_map.h:2775
pair< iterator, iterator > equal_range(const key_type &key)
Definition bslstl_map.h:1651
iterator upper_bound(const key_type &key)
Definition bslstl_map.h:1612
iterator end() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_map.h:2759
map()
Definition bslstl_map.h:2438
~map()
Destroy this object.
Definition bslstl_map.h:2611
const_reverse_iterator crbegin() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_map.h:3485
reverse_iterator rbegin() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_map.h:2767
iterator lower_bound(const key_type &key)
Definition bslstl_map.h:1575
size_type count(const key_type &key) const
Definition bslstl_map.h:1839
const value_type & const_reference
Definition bslstl_map.h:714
KEY key_type
Definition bslstl_map.h:708
AllocatorTraits::const_pointer const_pointer
Definition bslstl_map.h:719
add_lvalue_reference< VALUE >::type at(const key_type &key)
Definition bslstl_map.h:2737
pair< iterator, bool > emplace(Args &&... args)
bsl::reverse_iterator< iterator > reverse_iterator
Definition bslstl_map.h:725
iterator find(const key_type &key)
Definition bslstl_map.h:1542
void swap(map &other) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(AllocatorTraits pair< iterator, bool > try_emplace(const KEY &key, Args &&... args)
Definition bslstl_map.h:1416
ALLOCATOR allocator_type
Definition bslstl_map.h:712
map & operator=(const map &rhs)
Definition bslstl_map.h:2620
bool empty() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_map.h:3509
pair< iterator, bool > insert_or_assign(const KEY &key, BDE_OTHER_TYPE &&obj)
size_type size() const BSLS_KEYWORD_NOEXCEPT
Return the number of elements in this map.
Definition bslstl_map.h:3518
pair< iterator, bool > insert(const value_type &value)
Definition bslstl_map.h:2783
iterator begin() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_map.h:2751
VALUE mapped_type
Definition bslstl_map.h:709
void clear() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_map.h:3406
value_compare value_comp() const
Definition bslstl_map.h:3558
const_iterator cbegin() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_map.h:3469
size_type max_size() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_map.h:3526
bsl::reverse_iterator< const_iterator > const_reverse_iterator
Definition bslstl_map.h:726
AllocatorTraits::size_type size_type
Definition bslstl_map.h:716
iterator emplace_hint(const_iterator hint, Args &&... args)
Definition bslstl_map.h:3134
const_iterator cend() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_map.h:3477
BloombergLP::bslstl::TreeIterator< value_type, Node, difference_type > iterator
Definition bslstl_map.h:722
pair< const KEY, VALUE > value_type
Definition bslstl_map.h:710
AllocatorTraits::pointer pointer
Definition bslstl_map.h:718
AllocatorTraits::difference_type difference_type
Definition bslstl_map.h:717
key_compare key_comp() const
Definition bslstl_map.h:3550
COMPARATOR key_compare
Definition bslstl_map.h:711
#define BSLS_ASSERT_SAFE(X)
Definition bsls_assert.h:1762
#define BSLS_COMPILERFEATURES_FORWARD_REF(T)
Definition bsls_compilerfeatures.h:2012
#define BSLS_COMPILERFEATURES_FORWARD(T, V)
Definition bsls_compilerfeatures.h:2018
#define BSLS_KEYWORD_NOEXCEPT
Definition bsls_keyword.h:632
#define BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(...)
Definition bsls_keyword.h:634
void swap(OptionValue &a, OptionValue &b)
Definition bdlb_printmethods.h:283
void swap(array< VALUE_TYPE, SIZE > &lhs, array< VALUE_TYPE, SIZE > &rhs)
T::const_iterator cend(const T &container)
Definition bslstl_iterator.h:1611
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:1597
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)
deque< VALUE_TYPE, ALLOCATOR >::size_type erase(deque< VALUE_TYPE, ALLOCATOR > &deq, const BDE_OTHER_TYPE &value)
Definition bslstl_deque.h:4126
T::iterator begin(T &container)
Definition bslstl_iterator.h:1495
bool operator==(const memory_resource &a, const memory_resource &b)
T::const_iterator cbegin(const T &container)
Definition bslstl_iterator.h:1553
T::iterator end(T &container)
Definition bslstl_iterator.h:1523
deque< VALUE_TYPE, ALLOCATOR >::size_type erase_if(deque< VALUE_TYPE, ALLOCATOR > &deq, PREDICATE predicate)
Definition bslstl_deque.h:4135
bool operator!=(const memory_resource &a, const memory_resource &b)
T::const_reverse_iterator crend(const T &container)
Definition bslstl_iterator.h:1654
Definition bdlc_flathashmap.h:1805
Definition balxml_encoderoptions.h:68
Definition bdlbb_blob.h:576
t_TYPE & type
This typedef defines the return type of this meta function.
Definition bslmf_addlvaluereference.h:129
Definition bslma_allocatortraits.h:1061
BloombergLP::bslma::AllocatorTraits_ConstPointerType< ALLOCATOR >::type const_pointer
Definition bslma_allocatortraits.h:1152
BloombergLP::bslma::AllocatorTraits_SizeType< ALLOCATOR >::type size_type
Definition bslma_allocatortraits.h:1165
BloombergLP::bslma::AllocatorTraits_PointerType< ALLOCATOR >::type pointer
Definition bslma_allocatortraits.h:1149
BloombergLP::bslma::AllocatorTraits_DifferenceType< ALLOCATOR >::type difference_type
Definition bslma_allocatortraits.h:1162
Definition bslmf_enableif.h:525
Definition bslmf_isconvertible.h:867
t_TYPE type
Definition bslmf_typeidentity.h:216