11#ifndef INCLUDED_BSLSTL_SET_CPP03
12#define INCLUDED_BSLSTL_SET_CPP03
63#ifdef COMPILING_BSLSTL_SET_H
85 class COMPARATOR = std::less<KEY>,
86 class ALLOCATOR = allocator<KEY> >
93 typedef const KEY ValueType;
97 typedef BloombergLP::bslstl::SetComparator<KEY, COMPARATOR> Comparator;
101 typedef BloombergLP::bslstl::TreeNode<KEY> Node;
105 typedef BloombergLP::bslstl::TreeNodePool<KEY, ALLOCATOR> NodeFactory;
113 typedef BloombergLP::bslmf::MovableRefUtil MoveUtil;
124 class DataWrapper :
public Comparator {
131 DataWrapper(
const DataWrapper&);
132 DataWrapper& operator=(
const DataWrapper&);
140 explicit DataWrapper(
const COMPARATOR& comparator,
141 const ALLOCATOR& basicAllocator);
149 BloombergLP::bslmf::MovableRef<DataWrapper> original);
155 NodeFactory& nodeFactory();
161 const NodeFactory& nodeFactory()
const;
165 DataWrapper d_compAndAlloc;
169 BloombergLP::bslalg::RbTreeAnchor d_tree;
187 typedef BloombergLP::bslstl::TreeIterator<
const value_type,
190 typedef BloombergLP::bslstl::TreeIterator<
const value_type,
201 NodeFactory& nodeFactory();
205 Comparator& comparator();
212 void quickSwapExchangeAllocators(
set& other);
220 void quickSwapRetainAllocators(
set& other);
226 const NodeFactory& nodeFactory()
const;
230 const Comparator& comparator()
const;
247 explicit set(
const COMPARATOR& comparator,
248 const ALLOCATOR& basicAllocator = ALLOCATOR())
249 : d_compAndAlloc(comparator, basicAllocator),
265 explicit set(
const ALLOCATOR& basicAllocator);
283 set(BloombergLP::bslmf::MovableRef<set> original);
308 set(BloombergLP::bslmf::MovableRef<set> original,
337 template <
class INPUT_ITERATOR>
338 set(INPUT_ITERATOR first,
340 const COMPARATOR& comparator = COMPARATOR(),
341 const ALLOCATOR& basicAllocator = ALLOCATOR());
342 template <
class INPUT_ITERATOR>
343 set(INPUT_ITERATOR first,
345 const ALLOCATOR& basicAllocator);
347#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
348 set(std::initializer_list<KEY> values,
349 const COMPARATOR& comparator = COMPARATOR(),
350 const ALLOCATOR& basicAllocator = ALLOCATOR());
369 set(std::initializer_list<KEY> values,
370 const ALLOCATOR& basicAllocator);
403 AllocatorTraits::is_always_equal::value
404 && std::is_nothrow_move_assignable<COMPARATOR>::value);
406#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
504 template <class INPUT_ITERATOR>
505 void insert(INPUT_ITERATOR first, INPUT_ITERATOR last);
507#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
513 void insert(std::initializer_list<KEY> values);
516#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
519#ifndef BSLSTL_SET_VARIADIC_LIMIT
520#define BSLSTL_SET_VARIADIC_LIMIT 10
522#ifndef BSLSTL_SET_VARIADIC_LIMIT_A
523#define BSLSTL_SET_VARIADIC_LIMIT_A BSLSTL_SET_VARIADIC_LIMIT
526#if BSLSTL_SET_VARIADIC_LIMIT_A >= 0
531#if BSLSTL_SET_VARIADIC_LIMIT_A >= 1
532 template <
class Args_01>
537#if BSLSTL_SET_VARIADIC_LIMIT_A >= 2
538 template <
class Args_01,
545#if BSLSTL_SET_VARIADIC_LIMIT_A >= 3
546 template <
class Args_01,
555#if BSLSTL_SET_VARIADIC_LIMIT_A >= 4
556 template <
class Args_01,
567#if BSLSTL_SET_VARIADIC_LIMIT_A >= 5
568 template <
class Args_01,
581#if BSLSTL_SET_VARIADIC_LIMIT_A >= 6
582 template <
class Args_01,
597#if BSLSTL_SET_VARIADIC_LIMIT_A >= 7
598 template <
class Args_01,
615#if BSLSTL_SET_VARIADIC_LIMIT_A >= 8
616 template <
class Args_01,
635#if BSLSTL_SET_VARIADIC_LIMIT_A >= 9
636 template <
class Args_01,
657#if BSLSTL_SET_VARIADIC_LIMIT_A >= 10
658 template <
class Args_01,
682#if BSLSTL_SET_VARIADIC_LIMIT_A >= 0
686#if BSLSTL_SET_VARIADIC_LIMIT_A >= 1
687 template <
class Args_01>
692#if BSLSTL_SET_VARIADIC_LIMIT_A >= 2
693 template <
class Args_01,
700#if BSLSTL_SET_VARIADIC_LIMIT_A >= 3
701 template <
class Args_01,
710#if BSLSTL_SET_VARIADIC_LIMIT_A >= 4
711 template <
class Args_01,
722#if BSLSTL_SET_VARIADIC_LIMIT_A >= 5
723 template <
class Args_01,
736#if BSLSTL_SET_VARIADIC_LIMIT_A >= 6
737 template <
class Args_01,
752#if BSLSTL_SET_VARIADIC_LIMIT_A >= 7
753 template <
class Args_01,
770#if BSLSTL_SET_VARIADIC_LIMIT_A >= 8
771 template <
class Args_01,
790#if BSLSTL_SET_VARIADIC_LIMIT_A >= 9
791 template <
class Args_01,
812#if BSLSTL_SET_VARIADIC_LIMIT_A >= 10
813 template <
class Args_01,
840 template <
class... Args>
844 template <
class... Args>
897 AllocatorTraits::is_always_equal::value
898 && bsl::is_nothrow_swappable<COMPARATOR>::value);
916 return iterator(BloombergLP::bslalg::RbTreeUtil::find(
917 d_tree, this->comparator(), key));
926 template <
class LOOKUP_KEY>
928 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
931 find(
const LOOKUP_KEY& key)
933 return iterator(BloombergLP::bslalg::RbTreeUtil::find(
934 d_tree, this->comparator(), key));
949 return iterator(BloombergLP::bslalg::RbTreeUtil::lowerBound(
950 d_tree, this->comparator(), key));
963 template <
class LOOKUP_KEY>
965 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
970 return iterator(BloombergLP::bslalg::RbTreeUtil::lowerBound(
971 d_tree, this->comparator(), key));
985 return iterator(BloombergLP::bslalg::RbTreeUtil::upperBound(
986 d_tree, this->comparator(), key));
998 template <
class LOOKUP_KEY>
1000 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1005 return iterator(BloombergLP::bslalg::RbTreeUtil::upperBound(
1006 d_tree, this->comparator(), key));
1025 if (endIt !=
end() && !comparator()(key, *endIt.node())) {
1028 return pair<iterator, iterator>(startIt, endIt);
1046 template <
class LOOKUP_KEY>
1048 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1050 pair<iterator, iterator> >::type
1055 if (endIt !=
end() && !comparator()(key, *endIt.node())) {
1063 if (endIt !=
end() && !comparator()(key, *endIt.node())) {
1067 return pair<iterator, iterator>(startIt, endIt);
1126 template <class LOOKUP_KEY>
1127 typename
bsl::enable_if<
1128 BloombergLP::
bslmf::IsTransparentPredicate<COMPARATOR,
1131 contains(const LOOKUP_KEY& key)
const
1174 d_tree, this->comparator(), key));
1183 template <
class LOOKUP_KEY>
1185 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1188 find(
const LOOKUP_KEY& key)
const
1191 d_tree, this->comparator(), key));
1201 return (
find(key) !=
end()) ? 1 : 0;
1212 template <
class LOOKUP_KEY>
1214 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1217 count(
const LOOKUP_KEY& key)
const
1222 while (it !=
end() && !comparator()(key, *it.node())) {
1241 return const_iterator(BloombergLP::bslalg::RbTreeUtil::lowerBound(
1242 d_tree, this->comparator(), key));
1255 template <
class LOOKUP_KEY>
1257 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1262 return const_iterator(BloombergLP::bslalg::RbTreeUtil::lowerBound(
1263 d_tree, this->comparator(), key));
1278 return const_iterator(BloombergLP::bslalg::RbTreeUtil::upperBound(
1279 d_tree, this->comparator(), key));
1292 template <
class LOOKUP_KEY>
1294 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1299 return const_iterator(BloombergLP::bslalg::RbTreeUtil::upperBound(
1300 d_tree, this->comparator(), key));
1319 if (endIt !=
end() && !comparator()(key, *endIt.node())) {
1322 return pair<const_iterator, const_iterator>(startIt, endIt);
1340 template <
class LOOKUP_KEY>
1342 BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
1344 pair<const_iterator, const_iterator> >::type
1349 if (endIt !=
end() && !comparator()(key, *endIt.node())) {
1357 if (endIt !=
end() && !comparator()(key, *endIt.node())) {
1361 return pair<const_iterator, const_iterator>(startIt, endIt);
1367#ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
1377 class INPUT_ITERATOR,
1378 class KEY =
typename bsl::iterator_traits<INPUT_ITERATOR>::value_type,
1379 class COMPARATOR = std::less<KEY>,
1381 class = bsl::enable_if_t<!bsl::IsStdAllocator_v<COMPARATOR>>,
1382 class = bsl::enable_if_t<
bsl::IsStdAllocator_v<ALLOCATOR>>
1386 COMPARATOR = COMPARATOR(),
1387 ALLOCATOR = ALLOCATOR())
1388-> set<KEY, COMPARATOR, ALLOCATOR>;
1396 class INPUT_ITERATOR,
1400 typename BloombergLP::bslstl::IteratorUtil::IterVal_t<INPUT_ITERATOR>,
1401 class DEFAULT_ALLOCATOR = bsl::allocator<KEY>,
1402 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
1404set(INPUT_ITERATOR, INPUT_ITERATOR, COMPARATOR, ALLOC *)
1405-> set<KEY, COMPARATOR>;
1413 class INPUT_ITERATOR,
1416 typename BloombergLP::bslstl::IteratorUtil::IterVal_t<INPUT_ITERATOR>,
1417 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
1419set(INPUT_ITERATOR, INPUT_ITERATOR, ALLOCATOR)
1420-> set<KEY, std::less<KEY>, ALLOCATOR>;
1427 class INPUT_ITERATOR,
1430 typename BloombergLP::bslstl::IteratorUtil::IterVal_t<INPUT_ITERATOR>,
1431 class DEFAULT_ALLOCATOR = bsl::allocator<KEY>,
1432 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
1434set(INPUT_ITERATOR, INPUT_ITERATOR, ALLOC *)
1443 class COMPARATOR = std::less<KEY>,
1444 class ALLOCATOR = bsl::allocator<KEY>,
1445 class = bsl::enable_if_t<!bsl::IsStdAllocator_v<COMPARATOR>>,
1446 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
1448set(std::initializer_list<KEY>,
1449 COMPARATOR = COMPARATOR(),
1450 ALLOCATOR = ALLOCATOR())
1451-> set<KEY, COMPARATOR, ALLOCATOR>;
1462 class DEFAULT_ALLOCATOR = bsl::allocator<KEY>,
1463 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
1465set(std::initializer_list<KEY>, COMPARATOR, ALLOC *)
1466-> set<KEY, COMPARATOR>;
1475 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
1477set(std::initializer_list<KEY>, ALLOCATOR)
1478-> set<KEY, std::less<KEY>, ALLOCATOR>;
1487 class DEFAULT_ALLOCATOR = bsl::allocator<KEY>,
1488 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
1490set(std::initializer_list<KEY>, ALLOC *)
1504template <class KEY, class COMPARATOR, class ALLOCATOR>
1505bool operator==(const set<KEY, COMPARATOR, ALLOCATOR>& lhs,
1506 const set<KEY, COMPARATOR, ALLOCATOR>& rhs);
1508#ifndef BSLS_COMPILERFEATURES_SUPPORT_THREE_WAY_COMPARISON
1516template <class KEY, class COMPARATOR, class ALLOCATOR>
1517bool operator!=(const set<KEY, COMPARATOR, ALLOCATOR>& lhs,
1518 const set<KEY, COMPARATOR, ALLOCATOR>& rhs);
1521#ifdef BSLALG_SYNTHTHREEWAYUTIL_AVAILABLE
1526template <class KEY, class COMPARATOR, class ALLOCATOR>
1527BloombergLP::bslalg::SynthThreeWayUtil::Result<KEY>
1528operator<=>(const set<KEY, COMPARATOR, ALLOCATOR>& lhs,
1529 const set<KEY, COMPARATOR, ALLOCATOR>& rhs);
1544template <class KEY, class COMPARATOR, class ALLOCATOR>
1545bool operator< (const set<KEY, COMPARATOR, ALLOCATOR>& lhs,
1546 const set<KEY, COMPARATOR, ALLOCATOR>& rhs);
1555template <class KEY, class COMPARATOR, class ALLOCATOR>
1556bool operator> (const set<KEY, COMPARATOR, ALLOCATOR>& lhs,
1557 const set<KEY, COMPARATOR, ALLOCATOR>& rhs);
1566template <class KEY, class COMPARATOR, class ALLOCATOR>
1567bool operator<=(const set<KEY, COMPARATOR, ALLOCATOR>& lhs,
1568 const set<KEY, COMPARATOR, ALLOCATOR>& rhs);
1577template <class KEY, class COMPARATOR, class ALLOCATOR>
1578bool operator>=(const set<KEY, COMPARATOR, ALLOCATOR>& lhs,
1579 const set<KEY, COMPARATOR, ALLOCATOR>& rhs);
1587template <class KEY, class COMPARATOR, class ALLOCATOR, class PREDICATE>
1588typename set<KEY, COMPARATOR, ALLOCATOR>::size_type
1589erase_if(set<KEY, COMPARATOR, ALLOCATOR>& s, PREDICATE predicate);
1608template <class KEY, class COMPARATOR, class ALLOCATOR>
1609void
swap(set<KEY, COMPARATOR, ALLOCATOR>& a,
1610 set<KEY, COMPARATOR, ALLOCATOR>& b)
1612 BSLS_KEYWORD_NOEXCEPT_OPERATOR(a.swap(b)));
1623template <class KEY, class COMPARATOR, class ALLOCATOR>
1625set<KEY, COMPARATOR, ALLOCATOR>::DataWrapper::DataWrapper(
1626 const COMPARATOR& comparator,
1627 const ALLOCATOR& basicAllocator)
1628:
::bsl::set<KEY, COMPARATOR, ALLOCATOR>::Comparator(comparator)
1629, d_pool(basicAllocator)
1633template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1635set<KEY, COMPARATOR, ALLOCATOR>::DataWrapper::DataWrapper(
1636 BloombergLP::bslmf::MovableRef<DataWrapper> original)
1637: ::
bsl::set<KEY, COMPARATOR, ALLOCATOR>::Comparator(
1638 MoveUtil::access(original).keyComparator())
1639, d_pool(MoveUtil::move(MoveUtil::access(original).d_pool))
1643template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1645typename set<KEY, COMPARATOR, ALLOCATOR>::NodeFactory&
1646set<KEY, COMPARATOR, ALLOCATOR>::DataWrapper::nodeFactory()
1651template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1653const typename set<KEY, COMPARATOR, ALLOCATOR>::NodeFactory&
1654set<KEY, COMPARATOR, ALLOCATOR>::DataWrapper::nodeFactory()
const
1664template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1666typename set<KEY, COMPARATOR, ALLOCATOR>::NodeFactory&
1667set<KEY, COMPARATOR, ALLOCATOR>::nodeFactory()
1669 return d_compAndAlloc.nodeFactory();
1672template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1674typename set<KEY, COMPARATOR, ALLOCATOR>::Comparator&
1675set<KEY, COMPARATOR, ALLOCATOR>::comparator()
1677 return d_compAndAlloc;
1680template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1682void set<KEY, COMPARATOR, ALLOCATOR>::quickSwapExchangeAllocators(set& other)
1684 BloombergLP::bslalg::RbTreeUtil::swap(&d_tree, &other.d_tree);
1685 nodeFactory().swapExchangeAllocators(other.nodeFactory());
1693 if (
sizeof(NodeFactory) !=
sizeof(DataWrapper)) {
1694 comparator().swap(other.comparator());
1698template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1700void set<KEY, COMPARATOR, ALLOCATOR>::quickSwapRetainAllocators(set& other)
1702 BloombergLP::bslalg::RbTreeUtil::swap(&d_tree, &other.d_tree);
1703 nodeFactory().swapRetainAllocators(other.nodeFactory());
1707 if (
sizeof(NodeFactory) !=
sizeof(DataWrapper)) {
1708 comparator().swap(other.comparator());
1713template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1715const typename set<KEY, COMPARATOR, ALLOCATOR>::NodeFactory&
1716set<KEY, COMPARATOR, ALLOCATOR>::nodeFactory()
const
1718 return d_compAndAlloc.nodeFactory();
1721template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1723const typename set<KEY, COMPARATOR, ALLOCATOR>::Comparator&
1724set<KEY, COMPARATOR, ALLOCATOR>::comparator()
const
1726 return d_compAndAlloc;
1730template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1732set<KEY, COMPARATOR, ALLOCATOR>::set()
1733: d_compAndAlloc(COMPARATOR(), ALLOCATOR())
1738template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1740set<KEY, COMPARATOR, ALLOCATOR>::set(
const ALLOCATOR& basicAllocator)
1741: d_compAndAlloc(COMPARATOR(), basicAllocator)
1746template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1748set<KEY, COMPARATOR, ALLOCATOR>::set(
const set& original)
1749: d_compAndAlloc(original.comparator().keyComparator(),
1750 AllocatorTraits::select_on_container_copy_construction(
1751 original.nodeFactory().allocator()))
1754 if (0 < original.size()) {
1755 nodeFactory().reserveNodes(original.size());
1756 BloombergLP::bslalg::RbTreeUtil::copyTree(&d_tree,
1762template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1764set<KEY, COMPARATOR, ALLOCATOR>::set(
1765 BloombergLP::bslmf::MovableRef<set> original)
1766: d_compAndAlloc(MoveUtil::move(MoveUtil::access(original).d_compAndAlloc))
1769 set& lvalue = original;
1770 BloombergLP::bslalg::RbTreeUtil::swap(&d_tree, &lvalue.d_tree);
1773template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1775set<KEY, COMPARATOR, ALLOCATOR>::set(
1776 const set& original,
1777 const typename type_identity<ALLOCATOR>::type& basicAllocator)
1778: d_compAndAlloc(original.comparator().keyComparator(), basicAllocator)
1781 if (0 < original.size()) {
1782 nodeFactory().reserveNodes(original.size());
1783 BloombergLP::bslalg::RbTreeUtil::copyTree(&d_tree,
1789template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1791set<KEY, COMPARATOR, ALLOCATOR>::set(
1792 BloombergLP::bslmf::MovableRef<set> original,
1793 const typename type_identity<ALLOCATOR>::type& basicAllocator)
1794: d_compAndAlloc(MoveUtil::access(original).comparator().keyComparator(),
1798 set& lvalue = original;
1801 nodeFactory().allocator() == lvalue.nodeFactory().allocator())) {
1802 d_compAndAlloc.nodeFactory().adopt(
1803 MoveUtil::move(lvalue.d_compAndAlloc.nodeFactory()));
1804 BloombergLP::bslalg::RbTreeUtil::swap(&d_tree, &lvalue.d_tree);
1807 if (0 < lvalue.size()) {
1808 nodeFactory().reserveNodes(lvalue.size());
1809 BloombergLP::bslalg::RbTreeUtil::moveTree(&d_tree,
1812 &lvalue.nodeFactory());
1817template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1818template <
class INPUT_ITERATOR>
1820set<KEY, COMPARATOR, ALLOCATOR>::set(INPUT_ITERATOR first,
1821 INPUT_ITERATOR last,
1822 const COMPARATOR& comparator,
1823 const ALLOCATOR& basicAllocator)
1824: d_compAndAlloc(comparator, basicAllocator)
1827 if (first != last) {
1829 size_type numElements =
1830 BloombergLP::bslstl::IteratorUtil::insertDistance(first, last);
1832 if (0 < numElements) {
1833 nodeFactory().reserveNodes(numElements);
1836 BloombergLP::bslalg::RbTreeUtilTreeProctor<NodeFactory> proctor(
1847 BloombergLP::bslalg::RbTreeNode *prevNode = d_tree.rootNode();
1848 while (++first != last) {
1851 const value_type& value = *first;
1852 if (this->comparator()(value, *prevNode)) {
1854 insert(++first, last);
1858 if (this->comparator()(*prevNode, value)) {
1859 BloombergLP::bslalg::RbTreeNode *node =
1860 nodeFactory().emplaceIntoNewNode(value);
1861 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
1873template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1874template <
class INPUT_ITERATOR>
1876set<KEY, COMPARATOR, ALLOCATOR>::set(INPUT_ITERATOR first,
1877 INPUT_ITERATOR last,
1878 const ALLOCATOR& basicAllocator)
1879: d_compAndAlloc(COMPARATOR(), basicAllocator)
1882 if (first != last) {
1884 size_type numElements =
1885 BloombergLP::bslstl::IteratorUtil::insertDistance(first, last);
1887 if (0 < numElements) {
1888 nodeFactory().reserveNodes(numElements);
1891 BloombergLP::bslalg::RbTreeUtilTreeProctor<NodeFactory> proctor(
1902 BloombergLP::bslalg::RbTreeNode *prevNode = d_tree.rootNode();
1903 while (++first != last) {
1906 const value_type& value = *first;
1907 if (this->comparator()(value, *prevNode)) {
1909 insert(++first, last);
1913 if (this->comparator()(*prevNode, value)) {
1914 BloombergLP::bslalg::RbTreeNode *node =
1915 nodeFactory().emplaceIntoNewNode(value);
1916 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
1928#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
1929template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1931set<KEY, COMPARATOR, ALLOCATOR>::set(std::initializer_list<KEY> values,
1932 const COMPARATOR& comparator,
1933 const ALLOCATOR& basicAllocator)
1934: set(values.
begin(), values.
end(), comparator, basicAllocator)
1938template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1940set<KEY, COMPARATOR, ALLOCATOR>::set(std::initializer_list<KEY> values,
1941 const ALLOCATOR& basicAllocator)
1942: set(values.
begin(), values.
end(), COMPARATOR(), basicAllocator)
1947template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1949set<KEY, COMPARATOR, ALLOCATOR>::~set()
1955template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1957set<KEY, COMPARATOR, ALLOCATOR>&
1958set<KEY, COMPARATOR, ALLOCATOR>::operator=(
const set& rhs)
1961 if (AllocatorTraits::propagate_on_container_copy_assignment::value) {
1962 set other(rhs, rhs.nodeFactory().allocator());
1963 quickSwapExchangeAllocators(other);
1966 set other(rhs, nodeFactory().allocator());
1967 quickSwapRetainAllocators(other);
1973template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
1975set<KEY, COMPARATOR, ALLOCATOR>&
1976set<KEY, COMPARATOR, ALLOCATOR>::operator=(
1977 BloombergLP::bslmf::MovableRef<set> rhs)
1979 AllocatorTraits::is_always_equal::value
1980 && std::is_nothrow_move_assignable<COMPARATOR>::value)
1985 if (nodeFactory().allocator() == lvalue.nodeFactory().allocator()) {
1986 set other(MoveUtil::move(lvalue));
1987 quickSwapRetainAllocators(other);
1990 AllocatorTraits::propagate_on_container_move_assignment::value) {
1991 set other(MoveUtil::move(lvalue));
1992 quickSwapExchangeAllocators(other);
1995 set other(MoveUtil::move(lvalue), nodeFactory().allocator());
1996 quickSwapRetainAllocators(other);
2002#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
2003template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2005set<KEY, COMPARATOR, ALLOCATOR>&
2006set<KEY, COMPARATOR, ALLOCATOR>::operator=(std::initializer_list<KEY> values)
2009 insert(values.begin(), values.end());
2014template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2016typename set<KEY, COMPARATOR, ALLOCATOR>::iterator
2019 return iterator(d_tree.firstNode());
2022template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2024typename set<KEY, COMPARATOR, ALLOCATOR>::iterator
2027 return iterator(d_tree.sentinel());
2030template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2032typename set<KEY, COMPARATOR, ALLOCATOR>::reverse_iterator
2035 return reverse_iterator(
end());
2038template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2040typename set<KEY, COMPARATOR, ALLOCATOR>::reverse_iterator
2043 return reverse_iterator(
begin());
2046template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2048pair<typename set<KEY, COMPARATOR, ALLOCATOR>::iterator,
bool>
2049set<KEY, COMPARATOR, ALLOCATOR>::insert(
const value_type& value)
2051 int comparisonResult;
2052 BloombergLP::bslalg::RbTreeNode *insertLocation =
2053 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2058 if (!comparisonResult) {
2059 return pair<iterator, bool>(iterator(insertLocation),
false);
2062 BloombergLP::bslalg::RbTreeNode *node =
2063 nodeFactory().emplaceIntoNewNode(value);
2064 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2066 comparisonResult < 0,
2068 return pair<iterator, bool>(iterator(node),
true);
2071template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2073pair<typename set<KEY, COMPARATOR, ALLOCATOR>::iterator,
bool>
2074set<KEY, COMPARATOR, ALLOCATOR>::insert(
2075 BloombergLP::bslmf::MovableRef<value_type> value)
2077 value_type& lvalue = value;
2078 int comparisonResult;
2079 BloombergLP::bslalg::RbTreeNode *insertLocation =
2080 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2085 if (!comparisonResult) {
2086 return pair<iterator, bool>(iterator(insertLocation),
false);
2089 BloombergLP::bslalg::RbTreeNode *node =
2090 nodeFactory().emplaceIntoNewNode(MoveUtil::move(lvalue));
2091 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2093 comparisonResult < 0,
2095 return pair<iterator, bool>(iterator(node),
true);
2098template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2100typename set<KEY, COMPARATOR, ALLOCATOR>::iterator
2101set<KEY, COMPARATOR, ALLOCATOR>::insert(const_iterator hint,
2102 const value_type& value)
2104 BloombergLP::bslalg::RbTreeNode *hintNode =
2105 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
2106 int comparisonResult;
2107 BloombergLP::bslalg::RbTreeNode *insertLocation =
2108 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2114 if (!comparisonResult) {
2115 return iterator(insertLocation);
2118 BloombergLP::bslalg::RbTreeNode *node =
2119 nodeFactory().emplaceIntoNewNode(value);
2120 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2122 comparisonResult < 0,
2124 return iterator(node);
2127template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2129typename set<KEY, COMPARATOR, ALLOCATOR>::iterator
2130set<KEY, COMPARATOR, ALLOCATOR>::insert(const_iterator hint,
2131 BloombergLP::bslmf::MovableRef<value_type> value)
2133 value_type& lvalue = value;
2134 BloombergLP::bslalg::RbTreeNode *hintNode =
2135 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
2136 int comparisonResult;
2137 BloombergLP::bslalg::RbTreeNode *insertLocation =
2138 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2144 if (!comparisonResult) {
2145 return iterator(insertLocation);
2148 BloombergLP::bslalg::RbTreeNode *node =
2149 nodeFactory().emplaceIntoNewNode(MoveUtil::move(lvalue));
2151 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2153 comparisonResult < 0,
2155 return iterator(node);
2158template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2159template <
class INPUT_ITERATOR>
2161void set<KEY, COMPARATOR, ALLOCATOR>::insert(INPUT_ITERATOR first,
2162 INPUT_ITERATOR last)
2176 const bool canCalculateInsertDistance =
2177 is_convertible<
typename
2178 iterator_traits<INPUT_ITERATOR>::iterator_category,
2179 forward_iterator_tag>::value;
2181 while (first != last) {
2182 if (canCalculateInsertDistance
2184 !nodeFactory().hasFreeNodes())) {
2185 const size_type numElements =
2186 BloombergLP::bslstl::IteratorUtil::insertDistance(first, last);
2188 nodeFactory().reserveNodes(numElements);
2195#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
2196template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2198void set<KEY, COMPARATOR, ALLOCATOR>::insert(std::initializer_list<KEY> values)
2200 insert(values.begin(), values.end());
2204#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
2207#ifndef BSLSTL_SET_VARIADIC_LIMIT
2208#define BSLSTL_SET_VARIADIC_LIMIT 10
2210#ifndef BSLSTL_SET_VARIADIC_LIMIT_B
2211#define BSLSTL_SET_VARIADIC_LIMIT_B BSLSTL_SET_VARIADIC_LIMIT
2213#if BSLSTL_SET_VARIADIC_LIMIT_B >= 0
2214template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2216pair<typename set<KEY, COMPARATOR, ALLOCATOR>::iterator,
bool>
2217set<KEY, COMPARATOR, ALLOCATOR>::emplace(
2220 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2222 int comparisonResult;
2223 BloombergLP::bslalg::RbTreeNode *insertLocation =
2224 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2228 static_cast<const Node *
>(node)->value());
2229 if (!comparisonResult) {
2230 nodeFactory().deleteNode(node);
2231 return pair<iterator, bool>(iterator(insertLocation),
false);
2233 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2235 comparisonResult < 0,
2237 return pair<iterator, bool>(iterator(node),
true);
2241#if BSLSTL_SET_VARIADIC_LIMIT_B >= 1
2242template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2243template <
class Args_01>
2245pair<typename set<KEY, COMPARATOR, ALLOCATOR>::iterator,
bool>
2246set<KEY, COMPARATOR, ALLOCATOR>::emplace(
2249 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2251 int comparisonResult;
2252 BloombergLP::bslalg::RbTreeNode *insertLocation =
2253 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2257 static_cast<const Node *
>(node)->value());
2258 if (!comparisonResult) {
2259 nodeFactory().deleteNode(node);
2260 return pair<iterator, bool>(iterator(insertLocation),
false);
2262 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2264 comparisonResult < 0,
2266 return pair<iterator, bool>(iterator(node),
true);
2270#if BSLSTL_SET_VARIADIC_LIMIT_B >= 2
2271template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2272template <
class Args_01,
2275pair<typename set<KEY, COMPARATOR, ALLOCATOR>::iterator,
bool>
2276set<KEY, COMPARATOR, ALLOCATOR>::emplace(
2280 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2283 int comparisonResult;
2284 BloombergLP::bslalg::RbTreeNode *insertLocation =
2285 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2289 static_cast<const Node *
>(node)->value());
2290 if (!comparisonResult) {
2291 nodeFactory().deleteNode(node);
2292 return pair<iterator, bool>(iterator(insertLocation),
false);
2294 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2296 comparisonResult < 0,
2298 return pair<iterator, bool>(iterator(node),
true);
2302#if BSLSTL_SET_VARIADIC_LIMIT_B >= 3
2303template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2304template <
class Args_01,
2308pair<typename set<KEY, COMPARATOR, ALLOCATOR>::iterator,
bool>
2309set<KEY, COMPARATOR, ALLOCATOR>::emplace(
2314 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2318 int comparisonResult;
2319 BloombergLP::bslalg::RbTreeNode *insertLocation =
2320 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2324 static_cast<const Node *
>(node)->value());
2325 if (!comparisonResult) {
2326 nodeFactory().deleteNode(node);
2327 return pair<iterator, bool>(iterator(insertLocation),
false);
2329 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2331 comparisonResult < 0,
2333 return pair<iterator, bool>(iterator(node),
true);
2337#if BSLSTL_SET_VARIADIC_LIMIT_B >= 4
2338template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2339template <
class Args_01,
2344pair<typename set<KEY, COMPARATOR, ALLOCATOR>::iterator,
bool>
2345set<KEY, COMPARATOR, ALLOCATOR>::emplace(
2351 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2356 int comparisonResult;
2357 BloombergLP::bslalg::RbTreeNode *insertLocation =
2358 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2362 static_cast<const Node *
>(node)->value());
2363 if (!comparisonResult) {
2364 nodeFactory().deleteNode(node);
2365 return pair<iterator, bool>(iterator(insertLocation),
false);
2367 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2369 comparisonResult < 0,
2371 return pair<iterator, bool>(iterator(node),
true);
2375#if BSLSTL_SET_VARIADIC_LIMIT_B >= 5
2376template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2377template <
class Args_01,
2383pair<typename set<KEY, COMPARATOR, ALLOCATOR>::iterator,
bool>
2384set<KEY, COMPARATOR, ALLOCATOR>::emplace(
2391 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2397 int comparisonResult;
2398 BloombergLP::bslalg::RbTreeNode *insertLocation =
2399 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2403 static_cast<const Node *
>(node)->value());
2404 if (!comparisonResult) {
2405 nodeFactory().deleteNode(node);
2406 return pair<iterator, bool>(iterator(insertLocation),
false);
2408 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2410 comparisonResult < 0,
2412 return pair<iterator, bool>(iterator(node),
true);
2416#if BSLSTL_SET_VARIADIC_LIMIT_B >= 6
2417template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2418template <
class Args_01,
2425pair<typename set<KEY, COMPARATOR, ALLOCATOR>::iterator,
bool>
2426set<KEY, COMPARATOR, ALLOCATOR>::emplace(
2434 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2441 int comparisonResult;
2442 BloombergLP::bslalg::RbTreeNode *insertLocation =
2443 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2447 static_cast<const Node *
>(node)->value());
2448 if (!comparisonResult) {
2449 nodeFactory().deleteNode(node);
2450 return pair<iterator, bool>(iterator(insertLocation),
false);
2452 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2454 comparisonResult < 0,
2456 return pair<iterator, bool>(iterator(node),
true);
2460#if BSLSTL_SET_VARIADIC_LIMIT_B >= 7
2461template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2462template <
class Args_01,
2470pair<typename set<KEY, COMPARATOR, ALLOCATOR>::iterator,
bool>
2471set<KEY, COMPARATOR, ALLOCATOR>::emplace(
2480 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2488 int comparisonResult;
2489 BloombergLP::bslalg::RbTreeNode *insertLocation =
2490 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2494 static_cast<const Node *
>(node)->value());
2495 if (!comparisonResult) {
2496 nodeFactory().deleteNode(node);
2497 return pair<iterator, bool>(iterator(insertLocation),
false);
2499 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2501 comparisonResult < 0,
2503 return pair<iterator, bool>(iterator(node),
true);
2507#if BSLSTL_SET_VARIADIC_LIMIT_B >= 8
2508template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2509template <
class Args_01,
2518pair<typename set<KEY, COMPARATOR, ALLOCATOR>::iterator,
bool>
2519set<KEY, COMPARATOR, ALLOCATOR>::emplace(
2529 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2538 int comparisonResult;
2539 BloombergLP::bslalg::RbTreeNode *insertLocation =
2540 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2544 static_cast<const Node *
>(node)->value());
2545 if (!comparisonResult) {
2546 nodeFactory().deleteNode(node);
2547 return pair<iterator, bool>(iterator(insertLocation),
false);
2549 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2551 comparisonResult < 0,
2553 return pair<iterator, bool>(iterator(node),
true);
2557#if BSLSTL_SET_VARIADIC_LIMIT_B >= 9
2558template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2559template <
class Args_01,
2569pair<typename set<KEY, COMPARATOR, ALLOCATOR>::iterator,
bool>
2570set<KEY, COMPARATOR, ALLOCATOR>::emplace(
2581 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2591 int comparisonResult;
2592 BloombergLP::bslalg::RbTreeNode *insertLocation =
2593 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2597 static_cast<const Node *
>(node)->value());
2598 if (!comparisonResult) {
2599 nodeFactory().deleteNode(node);
2600 return pair<iterator, bool>(iterator(insertLocation),
false);
2602 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2604 comparisonResult < 0,
2606 return pair<iterator, bool>(iterator(node),
true);
2610#if BSLSTL_SET_VARIADIC_LIMIT_B >= 10
2611template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2612template <
class Args_01,
2623pair<typename set<KEY, COMPARATOR, ALLOCATOR>::iterator,
bool>
2624set<KEY, COMPARATOR, ALLOCATOR>::emplace(
2636 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2647 int comparisonResult;
2648 BloombergLP::bslalg::RbTreeNode *insertLocation =
2649 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2653 static_cast<const Node *
>(node)->value());
2654 if (!comparisonResult) {
2655 nodeFactory().deleteNode(node);
2656 return pair<iterator, bool>(iterator(insertLocation),
false);
2658 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2660 comparisonResult < 0,
2662 return pair<iterator, bool>(iterator(node),
true);
2667#if BSLSTL_SET_VARIADIC_LIMIT_B >= 0
2668template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2670typename set<KEY, COMPARATOR, ALLOCATOR>::iterator
2671set<KEY, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint)
2673 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2675 BloombergLP::bslalg::RbTreeNode *hintNode =
2676 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
2677 int comparisonResult;
2678 BloombergLP::bslalg::RbTreeNode *insertLocation =
2679 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2683 static_cast<const Node *
>(node)->value(),
2685 if (!comparisonResult) {
2686 nodeFactory().deleteNode(node);
2687 return iterator(insertLocation);
2690 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2692 comparisonResult < 0,
2694 return iterator(node);
2698#if BSLSTL_SET_VARIADIC_LIMIT_B >= 1
2699template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2700template <
class Args_01>
2702typename set<KEY, COMPARATOR, ALLOCATOR>::iterator
2703set<KEY, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
2706 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2708 BloombergLP::bslalg::RbTreeNode *hintNode =
2709 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
2710 int comparisonResult;
2711 BloombergLP::bslalg::RbTreeNode *insertLocation =
2712 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2716 static_cast<const Node *
>(node)->value(),
2718 if (!comparisonResult) {
2719 nodeFactory().deleteNode(node);
2720 return iterator(insertLocation);
2723 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2725 comparisonResult < 0,
2727 return iterator(node);
2731#if BSLSTL_SET_VARIADIC_LIMIT_B >= 2
2732template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2733template <
class Args_01,
2736typename set<KEY, COMPARATOR, ALLOCATOR>::iterator
2737set<KEY, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
2741 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2744 BloombergLP::bslalg::RbTreeNode *hintNode =
2745 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
2746 int comparisonResult;
2747 BloombergLP::bslalg::RbTreeNode *insertLocation =
2748 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2752 static_cast<const Node *
>(node)->value(),
2754 if (!comparisonResult) {
2755 nodeFactory().deleteNode(node);
2756 return iterator(insertLocation);
2759 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2761 comparisonResult < 0,
2763 return iterator(node);
2767#if BSLSTL_SET_VARIADIC_LIMIT_B >= 3
2768template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2769template <
class Args_01,
2773typename set<KEY, COMPARATOR, ALLOCATOR>::iterator
2774set<KEY, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
2779 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2783 BloombergLP::bslalg::RbTreeNode *hintNode =
2784 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
2785 int comparisonResult;
2786 BloombergLP::bslalg::RbTreeNode *insertLocation =
2787 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2791 static_cast<const Node *
>(node)->value(),
2793 if (!comparisonResult) {
2794 nodeFactory().deleteNode(node);
2795 return iterator(insertLocation);
2798 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2800 comparisonResult < 0,
2802 return iterator(node);
2806#if BSLSTL_SET_VARIADIC_LIMIT_B >= 4
2807template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2808template <
class Args_01,
2813typename set<KEY, COMPARATOR, ALLOCATOR>::iterator
2814set<KEY, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
2820 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2825 BloombergLP::bslalg::RbTreeNode *hintNode =
2826 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
2827 int comparisonResult;
2828 BloombergLP::bslalg::RbTreeNode *insertLocation =
2829 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2833 static_cast<const Node *
>(node)->value(),
2835 if (!comparisonResult) {
2836 nodeFactory().deleteNode(node);
2837 return iterator(insertLocation);
2840 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2842 comparisonResult < 0,
2844 return iterator(node);
2848#if BSLSTL_SET_VARIADIC_LIMIT_B >= 5
2849template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2850template <
class Args_01,
2856typename set<KEY, COMPARATOR, ALLOCATOR>::iterator
2857set<KEY, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
2864 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2870 BloombergLP::bslalg::RbTreeNode *hintNode =
2871 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
2872 int comparisonResult;
2873 BloombergLP::bslalg::RbTreeNode *insertLocation =
2874 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2878 static_cast<const Node *
>(node)->value(),
2880 if (!comparisonResult) {
2881 nodeFactory().deleteNode(node);
2882 return iterator(insertLocation);
2885 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2887 comparisonResult < 0,
2889 return iterator(node);
2893#if BSLSTL_SET_VARIADIC_LIMIT_B >= 6
2894template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2895template <
class Args_01,
2902typename set<KEY, COMPARATOR, ALLOCATOR>::iterator
2903set<KEY, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
2911 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2918 BloombergLP::bslalg::RbTreeNode *hintNode =
2919 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
2920 int comparisonResult;
2921 BloombergLP::bslalg::RbTreeNode *insertLocation =
2922 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2926 static_cast<const Node *
>(node)->value(),
2928 if (!comparisonResult) {
2929 nodeFactory().deleteNode(node);
2930 return iterator(insertLocation);
2933 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2935 comparisonResult < 0,
2937 return iterator(node);
2941#if BSLSTL_SET_VARIADIC_LIMIT_B >= 7
2942template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2943template <
class Args_01,
2951typename set<KEY, COMPARATOR, ALLOCATOR>::iterator
2952set<KEY, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
2961 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
2969 BloombergLP::bslalg::RbTreeNode *hintNode =
2970 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
2971 int comparisonResult;
2972 BloombergLP::bslalg::RbTreeNode *insertLocation =
2973 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
2977 static_cast<const Node *
>(node)->value(),
2979 if (!comparisonResult) {
2980 nodeFactory().deleteNode(node);
2981 return iterator(insertLocation);
2984 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
2986 comparisonResult < 0,
2988 return iterator(node);
2992#if BSLSTL_SET_VARIADIC_LIMIT_B >= 8
2993template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
2994template <
class Args_01,
3003typename set<KEY, COMPARATOR, ALLOCATOR>::iterator
3004set<KEY, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
3014 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
3023 BloombergLP::bslalg::RbTreeNode *hintNode =
3024 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
3025 int comparisonResult;
3026 BloombergLP::bslalg::RbTreeNode *insertLocation =
3027 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
3031 static_cast<const Node *
>(node)->value(),
3033 if (!comparisonResult) {
3034 nodeFactory().deleteNode(node);
3035 return iterator(insertLocation);
3038 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
3040 comparisonResult < 0,
3042 return iterator(node);
3046#if BSLSTL_SET_VARIADIC_LIMIT_B >= 9
3047template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3048template <
class Args_01,
3058typename set<KEY, COMPARATOR, ALLOCATOR>::iterator
3059set<KEY, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
3070 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
3080 BloombergLP::bslalg::RbTreeNode *hintNode =
3081 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
3082 int comparisonResult;
3083 BloombergLP::bslalg::RbTreeNode *insertLocation =
3084 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
3088 static_cast<const Node *
>(node)->value(),
3090 if (!comparisonResult) {
3091 nodeFactory().deleteNode(node);
3092 return iterator(insertLocation);
3095 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
3097 comparisonResult < 0,
3099 return iterator(node);
3103#if BSLSTL_SET_VARIADIC_LIMIT_B >= 10
3104template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3105template <
class Args_01,
3116typename set<KEY, COMPARATOR, ALLOCATOR>::iterator
3117set<KEY, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
3129 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
3140 BloombergLP::bslalg::RbTreeNode *hintNode =
3141 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
3142 int comparisonResult;
3143 BloombergLP::bslalg::RbTreeNode *insertLocation =
3144 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
3148 static_cast<const Node *
>(node)->value(),
3150 if (!comparisonResult) {
3151 nodeFactory().deleteNode(node);
3152 return iterator(insertLocation);
3155 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
3157 comparisonResult < 0,
3159 return iterator(node);
3166template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3167template <
class... Args>
3169pair<typename set<KEY, COMPARATOR, ALLOCATOR>::iterator,
bool>
3170set<KEY, COMPARATOR, ALLOCATOR>::emplace(
3173 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
3175 int comparisonResult;
3176 BloombergLP::bslalg::RbTreeNode *insertLocation =
3177 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
3181 static_cast<const Node *
>(node)->value());
3182 if (!comparisonResult) {
3183 nodeFactory().deleteNode(node);
3184 return pair<iterator, bool>(iterator(insertLocation),
false);
3186 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
3188 comparisonResult < 0,
3190 return pair<iterator, bool>(iterator(node),
true);
3193template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3194template <
class... Args>
3196typename set<KEY, COMPARATOR, ALLOCATOR>::iterator
3197set<KEY, COMPARATOR, ALLOCATOR>::emplace_hint(const_iterator hint,
3200 BloombergLP::bslalg::RbTreeNode *node = nodeFactory().emplaceIntoNewNode(
3202 BloombergLP::bslalg::RbTreeNode *hintNode =
3203 const_cast<BloombergLP::bslalg::RbTreeNode *
>(hint.node());
3204 int comparisonResult;
3205 BloombergLP::bslalg::RbTreeNode *insertLocation =
3206 BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation(
3210 static_cast<const Node *
>(node)->value(),
3212 if (!comparisonResult) {
3213 nodeFactory().deleteNode(node);
3214 return iterator(insertLocation);
3217 BloombergLP::bslalg::RbTreeUtil::insertAt(&d_tree,
3219 comparisonResult < 0,
3221 return iterator(node);
3226template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3228typename set<KEY, COMPARATOR, ALLOCATOR>::iterator
3229set<KEY, COMPARATOR, ALLOCATOR>::erase(const_iterator position)
3233 BloombergLP::bslalg::RbTreeNode *node =
3234 const_cast<BloombergLP::bslalg::RbTreeNode *
>(position.node());
3235 BloombergLP::bslalg::RbTreeNode *result =
3236 BloombergLP::bslalg::RbTreeUtil::next(node);
3237 BloombergLP::bslalg::RbTreeUtil::remove(&d_tree, node);
3238 nodeFactory().deleteNode(node);
3239 return iterator(result);
3242template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3244typename set<KEY, COMPARATOR, ALLOCATOR>::size_type
3245set<KEY, COMPARATOR, ALLOCATOR>::erase(
const key_type& key)
3247 const_iterator it = find(key);
3255template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3257typename set<KEY, COMPARATOR, ALLOCATOR>::iterator
3258set<KEY, COMPARATOR, ALLOCATOR>::erase(const_iterator first,
3259 const_iterator last)
3261 while (first != last) {
3262 first =
erase(first);
3264 return iterator(last.node());
3267template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3269void set<KEY, COMPARATOR, ALLOCATOR>::swap(set& other)
3271 AllocatorTraits::is_always_equal::value
3272 && bsl::is_nothrow_swappable<COMPARATOR>::value)
3274 if (AllocatorTraits::propagate_on_container_swap::value) {
3275 quickSwapExchangeAllocators(other);
3282 nodeFactory().allocator() == other.nodeFactory().allocator())) {
3283 quickSwapRetainAllocators(other);
3288 set toOtherCopy(MoveUtil::move(*
this),
3289 other.nodeFactory().allocator());
3290 set toThisCopy(MoveUtil::move(other), nodeFactory().allocator());
3292 this->quickSwapRetainAllocators(toThisCopy);
3293 other.quickSwapRetainAllocators(toOtherCopy);
3298template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3304 if (d_tree.rootNode()) {
3308 BloombergLP::bslalg::RbTreeUtil::deleteTree(&d_tree, &nodeFactory());
3310#if defined(BSLS_ASSERT_SAFE_IS_USED)
3319template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3321typename set<KEY, COMPARATOR, ALLOCATOR>::allocator_type
3324 return nodeFactory().allocator();
3327template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3329typename set<KEY, COMPARATOR, ALLOCATOR>::const_iterator
3335template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3337typename set<KEY, COMPARATOR, ALLOCATOR>::const_iterator
3343template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3345typename set<KEY, COMPARATOR, ALLOCATOR>::const_reverse_iterator
3351template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3353typename set<KEY, COMPARATOR, ALLOCATOR>::const_reverse_iterator
3359template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3361typename set<KEY, COMPARATOR, ALLOCATOR>::const_iterator
3364 return const_iterator(d_tree.firstNode());
3367template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3369typename set<KEY, COMPARATOR, ALLOCATOR>::const_iterator
3372 return const_iterator(d_tree.sentinel());
3375template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3377typename set<KEY, COMPARATOR, ALLOCATOR>::const_reverse_iterator
3380 return const_reverse_iterator(
end());
3383template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3385typename set<KEY, COMPARATOR, ALLOCATOR>::const_reverse_iterator
3388 return const_reverse_iterator(
begin());
3391template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3393bool set<KEY, COMPARATOR, ALLOCATOR>::contains(
const key_type& key)
const
3395 return find(key) !=
end();
3400template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3404 return 0 == d_tree.numNodes();
3407template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3409typename set<KEY, COMPARATOR, ALLOCATOR>::size_type
3412 return d_tree.numNodes();
3416template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3418typename set<KEY, COMPARATOR, ALLOCATOR>::size_type
3421 return AllocatorTraits::max_size(get_allocator());
3424template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3426typename set<KEY, COMPARATOR, ALLOCATOR>::key_compare
3427set<KEY, COMPARATOR, ALLOCATOR>::key_comp()
const
3429 return comparator().keyComparator();
3432template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3434typename set<KEY, COMPARATOR, ALLOCATOR>::value_compare
3435set<KEY, COMPARATOR, ALLOCATOR>::value_comp()
const
3437 return value_compare(key_comp());
3443template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3448 return BloombergLP::bslalg::RangeCompare::equal(lhs.
begin(),
3456#ifndef BSLS_COMPILERFEATURES_SUPPORT_THREE_WAY_COMPARISON
3457template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3462 return !(lhs == rhs);
3466#ifdef BSLALG_SYNTHTHREEWAYUTIL_AVAILABLE
3468template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3470BloombergLP::bslalg::SynthThreeWayUtil::Result<KEY>
3471bsl::operator<=>(
const set<KEY, COMPARATOR, ALLOCATOR>& lhs,
3472 const set<KEY, COMPARATOR, ALLOCATOR>& rhs)
3474 return bsl::lexicographical_compare_three_way(
3479 BloombergLP::bslalg::SynthThreeWayUtil::compare);
3484template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3489 return 0 > BloombergLP::bslalg::RangeCompare::lexicographical(lhs.
begin(),
3497template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3505template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3510 return !(rhs < lhs);
3514template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3519 return !(lhs < rhs);
3525template <
class KEY,
class COMPARATOR,
class ALLOCATOR,
class PREDICATE>
3528bsl::erase_if(set<KEY, COMPARATOR, ALLOCATOR>& s, PREDICATE predicate)
3530 return BloombergLP::bslstl::AlgorithmUtil::containerEraseIf(s, predicate);
3533template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3556template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3557struct HasStlIterators<
bsl::set<KEY, COMPARATOR, ALLOCATOR> >
3565template <
class KEY,
class COMPARATOR,
class ALLOCATOR>
3566struct UsesBslmaAllocator<
bsl::set<KEY, COMPARATOR, ALLOCATOR> >
3575# error Not valid except when included from bslstl_set.h
Definition bslma_bslallocator.h:580
Definition bslstl_set.h:657
pair< iterator, bool > insert(const value_type &value)
Definition bslstl_set.h:2326
bool empty() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_set.h:2717
iterator lower_bound(const key_type &key)
Definition bslstl_set.h:1224
void swap(set &other) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(AllocatorTraits void clear() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_set.h:1179
set &operator=(BloombergLP::bslmf::MovableRef< set > rhs) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(AllocatorTraits iterator begin() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_set.h:2294
size_type size() const BSLS_KEYWORD_NOEXCEPT
Return the number of elements in this set.
Definition bslstl_set.h:2725
iterator find(const key_type &key)
Definition bslstl_set.h:1191
const value_type & const_reference
Definition bslstl_set.h:750
const_reverse_iterator crbegin() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_set.h:2693
ALLOCATOR allocator_type
Definition bslstl_set.h:748
set & operator=(const set &rhs)
Definition bslstl_set.h:2235
value_type & reference
Definition bslstl_set.h:749
reverse_iterator rbegin() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_set.h:2310
KEY key_type
Definition bslstl_set.h:744
BloombergLP::bslstl::TreeIterator< const value_type, Node, difference_type > iterator
Definition bslstl_set.h:759
size_type max_size() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_set.h:2734
const_reverse_iterator crend() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_set.h:2701
value_compare value_comp() const
Definition bslstl_set.h:2750
AllocatorTraits::pointer pointer
Definition bslstl_set.h:754
AllocatorTraits::difference_type difference_type
Definition bslstl_set.h:753
AllocatorTraits::size_type size_type
Definition bslstl_set.h:752
reverse_iterator rend() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_set.h:2318
~set()
Destroy this object.
Definition bslstl_set.h:2226
BloombergLP::bslstl::TreeIterator< const value_type, Node, difference_type > const_iterator
Definition bslstl_set.h:762
COMPARATOR key_compare
Definition bslstl_set.h:746
key_compare key_comp() const
Definition bslstl_set.h:2742
allocator_type get_allocator() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_set.h:2637
iterator end() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_set.h:2302
pair< iterator, iterator > equal_range(const key_type &key)
Definition bslstl_set.h:1298
const_iterator cbegin() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_set.h:2677
bsl::reverse_iterator< const_iterator > const_reverse_iterator
Definition bslstl_set.h:764
bool contains(const key_type &key) const
Definition bslstl_set.h:2708
set()
Definition bslstl_set.h:2009
bsl::reverse_iterator< iterator > reverse_iterator
Definition bslstl_set.h:763
iterator upper_bound(const key_type &key)
Definition bslstl_set.h:1260
size_type count(const key_type &key) const
Definition bslstl_set.h:1476
AllocatorTraits::const_pointer const_pointer
Definition bslstl_set.h:755
COMPARATOR value_compare
Definition bslstl_set.h:747
iterator emplace_hint(const_iterator hint, Args &&... arguments)
Definition bslstl_set.h:2513
KEY value_type
Definition bslstl_set.h:745
pair< iterator, bool > emplace(Args &&... arguments)
iterator erase(const_iterator position)
Definition bslstl_set.h:2544
const_iterator cend() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_set.h:2685
#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_OPERATOR(...)
Definition bsls_keyword.h:635
#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
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