11#ifndef INCLUDED_BSLSTL_LIST_CPP03
12#define INCLUDED_BSLSTL_LIST_CPP03
63#ifdef COMPILING_BSLSTL_LIST_H
88 template <
class LIST_VALUE,
class LIST_ALLOCATOR>
91 template <
class ITER_VALUE>
97 List_Node(
const List_Node&);
99 List_Node& operator=(
const List_Node&);
110#if defined(BSLS_LIBRARYFEATURES_STDCPP_LIBCSTD)
114template <
class VALUE>
116 public std::iterator<std::bidirectional_iterator_tag, VALUE> {
118template <
class VALUE>
125 typedef List_Iterator<NcType> NcIter;
126 typedef List_Node<NcType> Node;
132 template <
class LIST_VALUE,
class LIST_ALLOCATOR>
135 template <
class ITER_VALUE>
138 template <
class T1,
class T2>
139 friend bool operator==(List_Iterator<T1>, List_Iterator<T2>);
146 NcIter unconst()
const;
187#if defined(BSLS_COMPILERFEATURES_SUPPORT_DEFAULTED_FUNCTIONS)
257template <
class T1,
class T2>
260#ifndef BSLS_COMPILERFEATURES_SUPPORT_THREE_WAY_COMPARISON
271template <
class T1,
class T2>
286template <
class VALUE>
287struct List_DefaultLessThan {
293 bool operator()(
const VALUE& lhs,
const VALUE& rhs)
const;
307template <
class VALUE,
class ALLOCATOR>
308class List_AllocAndSizeWrapper :
public allocator_traits<ALLOCATOR>::
309 template rebind_traits<List_Node<VALUE> >::allocator_type {
312 typedef List_Node<VALUE> Node;
316 typedef typename allocator_traits<ALLOCATOR>::template rebind_traits<Node>
319 typedef typename AllocTraits::allocator_type NodeAlloc;
321 typedef typename AllocTraits::size_type size_type;
329 List_AllocAndSizeWrapper(
const List_AllocAndSizeWrapper&);
330 List_AllocAndSizeWrapper& operator=(
const List_AllocAndSizeWrapper&);
337 List_AllocAndSizeWrapper(
const NodeAlloc& basicAllocator,
352 const size_type&
size()
const;
356template <
class VALUE,
class ALLOCATOR>
367template <
class VALUE,
class ALLOCATOR>
368class List_NodeProctor {
371 typedef List_Node<VALUE> Node;
375 typedef typename allocator_traits<ALLOCATOR>::template rebind_traits<Node>
384 typedef typename AllocTraits::pointer NodePtr;
388 list<VALUE, ALLOCATOR> *d_list_p;
393 List_NodeProctor(
const List_NodeProctor&);
394 List_NodeProctor &operator=(
const List_NodeProctor&);
403 List_NodeProctor(list<VALUE, ALLOCATOR> *listPtr, NodePtr nodePtr);
427template <
class VALUE,
class ALLOCATOR = bsl::allocator<VALUE> >
433 typedef List_DefaultLessThan<VALUE> DefaultLessThan;
436 typedef List_Node<VALUE> Node;
439 typedef List_NodeProctor<VALUE, ALLOCATOR> NodeProctor;
442 typedef typename allocator_traits<ALLOCATOR>::template rebind_traits<Node>
446 typedef BloombergLP::bslmf::MovableRefUtil MoveUtil;
450 typedef List_AllocAndSizeWrapper<VALUE, ALLOCATOR>
454 typedef typename AllocTraits::allocator_type NodeAlloc;
459 typedef typename AllocTraits::pointer NodePtr;
464 typedef const VALUE& const_reference;
465 typedef List_Iterator<VALUE> iterator;
466 typedef List_Iterator<const VALUE> const_iterator;
467 typedef typename allocator_traits<ALLOCATOR>::pointer
pointer;
468 typedef typename allocator_traits<ALLOCATOR>::const_pointer
471 typedef typename allocator_traits<ALLOCATOR>::size_type size_type;
472 typedef typename allocator_traits<ALLOCATOR>::difference_type
475 typedef ALLOCATOR allocator_type;
476 typedef bsl::reverse_iterator<iterator> reverse_iterator;
477 typedef bsl::reverse_iterator<const_iterator> const_reverse_iterator;
482 AllocAndSizeWrapper d_alloc_and_size;
485 friend class List_NodeProctor<VALUE, ALLOCATOR>;
491 NodeAlloc& allocatorImp();
496 NodePtr allocateNode();
502 void createSentinel();
509 void deleteNode(NodePtr node);
522 void freeNode(NodePtr node);
529 iterator insertNode(const_iterator position, NodePtr node);
536 void linkNodes(NodePtr prev, NodePtr next);
551 template <
class COMPARE>
552 NodePtr mergeImp(NodePtr node1,
558 template <
class t_ITERATOR,
class t_SENTINEL>
559 void privateAppendRange(t_ITERATOR first, t_SENTINEL last);
566 void quickSwap(
list *other);
582 template <class COMPARE>
583 NodePtr sortImp(NodePtr *nodePtrPtr,
585 const COMPARE& comparator);
591 const NodeAlloc& allocatorImp() const;
595 NodePtr headNode() const;
599 const typename AllocTraits::size_type& sizeRef() const
613 explicit
list(const ALLOCATOR& basicAllocator);
623 explicit
list(size_type numElements);
633 list(size_type numElements,
634 const ALLOCATOR& basicAllocator);
648 list(size_type numElements,
650 const ALLOCATOR& basicAllocator = ALLOCATOR());
674 template <class INPUT_ITERATOR>
675 list(INPUT_ITERATOR first,
677 const ALLOCATOR& basicAllocator = ALLOCATOR(),
679 !is_arithmetic<INPUT_ITERATOR>::value &&
680 !is_enum<INPUT_ITERATOR>::value
682 : d_alloc_and_size(basicAllocator, size_type(-1))
693 list tmp(this->allocatorImp());
694 tmp.insert(tmp.cbegin(), first, last);
705 template <
class t_RANGE>
709 const ALLOCATOR& basicAllocator =
730 const typename type_identity<ALLOCATOR>::type& basicAllocator);
737 list(BloombergLP::bslmf::MovableRef<list> original);
750 list(BloombergLP::bslmf::MovableRef<list> original,
751 const typename type_identity<ALLOCATOR>::type& basicAllocator);
753#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
765 list(std::initializer_list<value_type> values,
766 const ALLOCATOR& basicAllocator = ALLOCATOR());
806 AllocTraits::is_always_equal::value);
808#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
837 template <
class INPUT_ITERATOR>
838 void assign(INPUT_ITERATOR first,
848 iterator dstIt = this->
begin();
849 const iterator dstEnd = this->
end();
851 for (; first != last && dstEnd != dstIt; ++first, ++dstIt) {
855 erase(dstIt, dstEnd);
857 for (; first != last; ++first) {
858 emplace(dstEnd, *first);
869#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
878 void assign(std::initializer_list<value_type> values);
886 template <
class t_RANGE>
922 void resize(size_type newSize);
923 void resize(size_type newSize, const
value_type& value);
960 iterator
erase(const_iterator position);
972 iterator
erase(const_iterator dstBegin, const_iterator dstEnd);
981 template <class t_RANGE>
985#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
988#ifndef BSLSTL_LIST_VARIADIC_LIMIT
989#define BSLSTL_LIST_VARIADIC_LIMIT 10
991#ifndef BSLSTL_LIST_VARIADIC_LIMIT_A
992#define BSLSTL_LIST_VARIADIC_LIMIT_A BSLSTL_LIST_VARIADIC_LIMIT
994#if BSLSTL_LIST_VARIADIC_LIMIT_A >= 0
999#if BSLSTL_LIST_VARIADIC_LIMIT_A >= 1
1000 template <
class ARGS_01>
1005#if BSLSTL_LIST_VARIADIC_LIMIT_A >= 2
1006 template <
class ARGS_01,
1013#if BSLSTL_LIST_VARIADIC_LIMIT_A >= 3
1014 template <
class ARGS_01,
1023#if BSLSTL_LIST_VARIADIC_LIMIT_A >= 4
1024 template <
class ARGS_01,
1035#if BSLSTL_LIST_VARIADIC_LIMIT_A >= 5
1036 template <
class ARGS_01,
1049#if BSLSTL_LIST_VARIADIC_LIMIT_A >= 6
1050 template <
class ARGS_01,
1065#if BSLSTL_LIST_VARIADIC_LIMIT_A >= 7
1066 template <
class ARGS_01,
1083#if BSLSTL_LIST_VARIADIC_LIMIT_A >= 8
1084 template <
class ARGS_01,
1103#if BSLSTL_LIST_VARIADIC_LIMIT_A >= 9
1104 template <
class ARGS_01,
1125#if BSLSTL_LIST_VARIADIC_LIMIT_A >= 10
1126 template <
class ARGS_01,
1152 template <
class... ARGS>
1158#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
1161#ifndef BSLSTL_LIST_VARIADIC_LIMIT
1162#define BSLSTL_LIST_VARIADIC_LIMIT 10
1164#ifndef BSLSTL_LIST_VARIADIC_LIMIT_B
1165#define BSLSTL_LIST_VARIADIC_LIMIT_B BSLSTL_LIST_VARIADIC_LIMIT
1167#if BSLSTL_LIST_VARIADIC_LIMIT_B >= 0
1172#if BSLSTL_LIST_VARIADIC_LIMIT_B >= 1
1173 template <
class ARGS_01>
1178#if BSLSTL_LIST_VARIADIC_LIMIT_B >= 2
1179 template <
class ARGS_01,
1186#if BSLSTL_LIST_VARIADIC_LIMIT_B >= 3
1187 template <
class ARGS_01,
1196#if BSLSTL_LIST_VARIADIC_LIMIT_B >= 4
1197 template <
class ARGS_01,
1208#if BSLSTL_LIST_VARIADIC_LIMIT_B >= 5
1209 template <
class ARGS_01,
1222#if BSLSTL_LIST_VARIADIC_LIMIT_B >= 6
1223 template <
class ARGS_01,
1238#if BSLSTL_LIST_VARIADIC_LIMIT_B >= 7
1239 template <
class ARGS_01,
1256#if BSLSTL_LIST_VARIADIC_LIMIT_B >= 8
1257 template <
class ARGS_01,
1276#if BSLSTL_LIST_VARIADIC_LIMIT_B >= 9
1277 template <
class ARGS_01,
1298#if BSLSTL_LIST_VARIADIC_LIMIT_B >= 10
1299 template <
class ARGS_01,
1325 template <
class... ARGS>
1336 template <
class t_RANGE>
1352 void push_back(BloombergLP::bslmf::MovableRef<value_type> value);
1366 void push_front(BloombergLP::bslmf::MovableRef<value_type> value);
1370#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
1373#ifndef BSLSTL_LIST_VARIADIC_LIMIT
1374#define BSLSTL_LIST_VARIADIC_LIMIT 10
1376#ifndef BSLSTL_LIST_VARIADIC_LIMIT_C
1377#define BSLSTL_LIST_VARIADIC_LIMIT_C BSLSTL_LIST_VARIADIC_LIMIT
1379#if BSLSTL_LIST_VARIADIC_LIMIT_C >= 0
1380 iterator emplace(const_iterator position);
1383#if BSLSTL_LIST_VARIADIC_LIMIT_C >= 1
1384 template <
class ARGS_01>
1385 iterator emplace(const_iterator position,
1389#if BSLSTL_LIST_VARIADIC_LIMIT_C >= 2
1390 template <
class ARGS_01,
1392 iterator emplace(const_iterator position,
1397#if BSLSTL_LIST_VARIADIC_LIMIT_C >= 3
1398 template <
class ARGS_01,
1401 iterator emplace(const_iterator position,
1407#if BSLSTL_LIST_VARIADIC_LIMIT_C >= 4
1408 template <
class ARGS_01,
1412 iterator emplace(const_iterator position,
1419#if BSLSTL_LIST_VARIADIC_LIMIT_C >= 5
1420 template <
class ARGS_01,
1425 iterator emplace(const_iterator position,
1433#if BSLSTL_LIST_VARIADIC_LIMIT_C >= 6
1434 template <
class ARGS_01,
1440 iterator emplace(const_iterator position,
1449#if BSLSTL_LIST_VARIADIC_LIMIT_C >= 7
1450 template <
class ARGS_01,
1457 iterator emplace(const_iterator position,
1467#if BSLSTL_LIST_VARIADIC_LIMIT_C >= 8
1468 template <
class ARGS_01,
1476 iterator emplace(const_iterator position,
1487#if BSLSTL_LIST_VARIADIC_LIMIT_C >= 9
1488 template <
class ARGS_01,
1497 iterator emplace(const_iterator position,
1509#if BSLSTL_LIST_VARIADIC_LIMIT_C >= 10
1510 template <
class ARGS_01,
1520 iterator emplace(const_iterator position,
1536 template <
class... ARGS>
1537 iterator emplace(const_iterator position,
1552 iterator insert(const_iterator dstPosition,
const value_type& value);
1565 iterator insert(const_iterator dstPosition,
1566 BloombergLP::bslmf::MovableRef<value_type> value);
1577 iterator insert(const_iterator dstPosition,
1578 size_type numElements,
1597 template <
class INPUT_ITERATOR>
1598 iterator insert(const_iterator dstPosition,
1599 INPUT_ITERATOR first,
1600 INPUT_ITERATOR last,
1609 if (first == last) {
1610 return dstPosition.unconst();
1616 iterator ret = insert(dstPosition, *first);
1617 for (++first; first != last; ++first) {
1618 insert(dstPosition, *first);
1624#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
1634 iterator insert(const_iterator dstPosition,
1635 std::initializer_list<value_type> values);
1643 template <
class t_RANGE>
1645 iterator insert_range(const_iterator position,
1658 void merge(
list& other);
1659 void merge(BloombergLP::bslmf::MovableRef<list> other);
1669 template <
class COMPARE>
1670 void merge(
list& other, COMPARE comparator);
1671 template <
class COMPARE>
1672 void merge(BloombergLP::bslmf::MovableRef<list> other, COMPARE comparator);
1680 template <
class PREDICATE>
1681 size_type remove_if(PREDICATE predicate);
1699 template <class COMPARE>
1700 void sort(COMPARE comparator);
1708 void splice(const_iterator dstPosition,
1710 void splice(const_iterator dstPosition,
1711 BloombergLP::
bslmf::MovableRef<
list> src);
1723 void splice(const_iterator dstPosition,
1725 const_iterator srcNode);
1726 void splice(const_iterator dstPosition,
1727 BloombergLP::
bslmf::MovableRef<
list> src,
1728 const_iterator srcNode);
1742 void splice(const_iterator dstPosition,
1744 const_iterator first,
1745 const_iterator last);
1746 void splice(const_iterator dstPosition,
1747 BloombergLP::
bslmf::MovableRef<
list> src,
1748 const_iterator first,
1749 const_iterator last);
1758 template <class EQ_PREDICATE>
1759 void unique(EQ_PREDICATE binaryPredicate);
1778 AllocTraits::is_always_equal::value);
1831 const_reference back() const;
1837 const_reference front() const;
1845#ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
1857 class = bsl::enable_if_t<
1858 bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>,
1859 class = bsl::enable_if_t<
1860 bsl::is_convertible_v<
1864list(SIZE_TYPE, VALUE, ALLOC *) -> list<VALUE>;
1869 class INPUT_ITERATOR,
1870 class VALUE =
typename
1871 BloombergLP::bslstl::IteratorUtil::IterVal_t<INPUT_ITERATOR>
1873list(INPUT_ITERATOR, INPUT_ITERATOR) -> list<VALUE>;
1881 class INPUT_ITERATOR,
1883 class VALUE =
typename
1884 BloombergLP::bslstl::IteratorUtil::IterVal_t<INPUT_ITERATOR>,
1885 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>>
1886list(INPUT_ITERATOR, INPUT_ITERATOR, ALLOCATOR) -> list<VALUE, ALLOCATOR>;
1893 class INPUT_ITERATOR,
1895 class VALUE =
typename
1896 BloombergLP::bslstl::IteratorUtil::IterVal_t<INPUT_ITERATOR>,
1898 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
1900list(INPUT_ITERATOR, INPUT_ITERATOR, ALLOC *)
1911 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
1913list(std::initializer_list<VALUE>, ALLOC *)
1916#if defined(BSLS_LIBRARYFEATURES_HAS_CPP20_CONCEPTS) \
1917 && defined(BSLS_LIBRARYFEATURES_HAS_CPP20_RANGES)
1920template <ranges::input_range t_RANGE,
1922 allocator<ranges::range_value_t<t_RANGE>>>
1923list(from_range_t, t_RANGE&&, t_ALLOCATOR = t_ALLOCATOR())
1924-> list<ranges::range_value_t<t_RANGE>, t_ALLOCATOR>;
1937template <
class VALUE,
class ALLOCATOR>
1939 const list<VALUE, ALLOCATOR>&
rhs);
1941#ifndef BSLS_COMPILERFEATURES_SUPPORT_THREE_WAY_COMPARISON
1951template <
class VALUE,
class ALLOCATOR>
1953 const list<VALUE, ALLOCATOR>&
rhs);
1957#ifdef BSLALG_SYNTHTHREEWAYUTIL_AVAILABLE
1962template <
class VALUE,
class ALLOCATOR>
1963BloombergLP::bslalg::SynthThreeWayUtil::Result<VALUE> operator<=>(
1964 const list<VALUE, ALLOCATOR>&
lhs,
1965 const list<VALUE, ALLOCATOR>&
rhs);
1979template <
class VALUE,
class ALLOCATOR>
1980bool operator< (
const list<VALUE, ALLOCATOR>&
lhs,
1981 const list<VALUE, ALLOCATOR>&
rhs);
1990template <
class VALUE,
class ALLOCATOR>
1991bool operator> (
const list<VALUE, ALLOCATOR>&
lhs,
1992 const list<VALUE, ALLOCATOR>&
rhs);
2002template <
class VALUE,
class ALLOCATOR>
2004 const list<VALUE, ALLOCATOR>&
rhs);
2014template <
class VALUE,
class ALLOCATOR>
2016 const list<VALUE, ALLOCATOR>&
rhs);
2024template <
class VALUE,
class ALLOCATOR,
class BDE_OTHER_TYPE>
2025typename list<VALUE, ALLOCATOR>::size_type
2026erase(list<VALUE, ALLOCATOR>& l,
const BDE_OTHER_TYPE& value);
2030template <
class VALUE,
class ALLOCATOR,
class PREDICATE>
2031typename list<VALUE, ALLOCATOR>::size_type
2032erase_if(list<VALUE, ALLOCATOR>& l, PREDICATE predicate);
2047template <
class VALUE,
class ALLOCATOR>
2048void swap(list<VALUE, ALLOCATOR>& a, list<VALUE, ALLOCATOR>& b)
2061template <
class VALUE>
2063typename List_Iterator<VALUE>::NcIter List_Iterator<VALUE>::unconst()
const
2065 return NcIter(d_node_p);
2069template <
class VALUE>
2076template <
class VALUE>
2078List_Iterator<VALUE>::List_Iterator(Node *nodePtr)
2083template <
class VALUE>
2085List_Iterator<VALUE>::List_Iterator(
const NcIter& other)
2086: d_node_p(other.d_node_p)
2091template <
class VALUE>
2093List_Iterator<VALUE>& List_Iterator<VALUE>::operator++()
2095 this->d_node_p = this->d_node_p->d_next_p;
2099template <
class VALUE>
2101List_Iterator<VALUE>& List_Iterator<VALUE>::operator--()
2103 this->d_node_p = this->d_node_p->d_prev_p;
2107template <
class VALUE>
2109List_Iterator<VALUE> List_Iterator<VALUE>::operator++(
int)
2111 List_Iterator temp = *
this;
2116template <
class VALUE>
2118List_Iterator<VALUE> List_Iterator<VALUE>::operator--(
int)
2120 List_Iterator temp = *
this;
2126template <
class VALUE>
2129 List_Iterator<VALUE>::operator*()
const
2131 return this->d_node_p->d_value;
2134template <
class VALUE>
2137 List_Iterator<VALUE>::operator->()
const
2139 return BloombergLP::bsls::Util::addressOf(this->d_node_p->d_value);
2143template <
class T1,
class T2>
2153 return lhs.d_node_p ==
rhs.d_node_p;
2156#ifndef BSLS_COMPILERFEATURES_SUPPORT_THREE_WAY_COMPARISON
2157template <
class T1,
class T2>
2176template <
class VALUE,
class ALLOCATOR>
2178List_AllocAndSizeWrapper<VALUE, ALLOCATOR>::List_AllocAndSizeWrapper(
2179 const NodeAlloc& basicAllocator,
2181: NodeAlloc(basicAllocator)
2187template <
class VALUE,
class ALLOCATOR>
2189typename List_AllocAndSizeWrapper<VALUE, ALLOCATOR>::size_type&
2190List_AllocAndSizeWrapper<VALUE, ALLOCATOR>::size()
2196template <
class VALUE,
class ALLOCATOR>
2198const typename List_AllocAndSizeWrapper<VALUE, ALLOCATOR>::size_type&
2199List_AllocAndSizeWrapper<VALUE, ALLOCATOR>::size()
const
2209template <
class VALUE,
class ALLOCATOR>
2211List_NodeProctor<VALUE, ALLOCATOR>::List_NodeProctor(
2212 list<VALUE, ALLOCATOR> *listPtr,
2221template <
class VALUE,
class ALLOCATOR>
2223List_NodeProctor<VALUE, ALLOCATOR>::~List_NodeProctor()
2226 d_list_p->freeNode(d_node_p);
2231template <
class VALUE,
class ALLOCATOR>
2233void List_NodeProctor<VALUE, ALLOCATOR>::release()
2243template <
class VALUE>
2245bool List_DefaultLessThan<VALUE>::operator()(
2246 const VALUE& lhs,
const VALUE& rhs)
const
2256template <
class VALUE,
class ALLOCATOR>
2258typename list<VALUE, ALLOCATOR>::NodeAlloc&
2259 list<VALUE, ALLOCATOR>::allocatorImp()
2261 return d_alloc_and_size;
2264template <
class VALUE,
class ALLOCATOR>
2266typename list<VALUE, ALLOCATOR>::NodePtr list<VALUE, ALLOCATOR>::allocateNode()
2268 NodePtr ret = AllocTraits::allocate(allocatorImp(), 1);
2274template <
class VALUE,
class ALLOCATOR>
2276void list<VALUE, ALLOCATOR>::createSentinel()
2280 d_sentinel = allocateNode();
2281 linkNodes(d_sentinel, d_sentinel);
2285template <
class VALUE,
class ALLOCATOR>
2287void list<VALUE, ALLOCATOR>::deleteNode(NodePtr node)
2291 AllocTraits::destroy(allocatorImp(),
2292 BloombergLP::bsls::Util::addressOf(node->d_value));
2293 AllocTraits::deallocate(allocatorImp(), node, 1);
2296template <
class VALUE,
class ALLOCATOR>
2298void list<VALUE, ALLOCATOR>::destroyAll()
2301 freeNode(d_sentinel);
2302 sizeRef() = size_type(-1);
2305template <
class VALUE,
class ALLOCATOR>
2307void list<VALUE, ALLOCATOR>::freeNode(NodePtr node)
2309 AllocTraits::deallocate(allocatorImp(), node, 1);
2312template <
class VALUE,
class ALLOCATOR>
2314typename list<VALUE, ALLOCATOR>::iterator
2315list<VALUE, ALLOCATOR>::insertNode(const_iterator position, NodePtr node)
2317 NodePtr next = position.d_node_p;
2318 NodePtr prev = next->d_prev_p;
2319 linkNodes(prev, node);
2320 linkNodes(node, next);
2322 return iterator(node);
2325template <
class VALUE,
class ALLOCATOR>
2327void list<VALUE, ALLOCATOR>::linkNodes(NodePtr prev, NodePtr next)
2329 prev->d_next_p = next;
2330 next->d_prev_p = prev;
2333template <
class VALUE,
class ALLOCATOR>
2334template <
class COMPARE>
2335typename list<VALUE, ALLOCATOR>::NodePtr
2336list<VALUE, ALLOCATOR>::mergeImp(NodePtr node1,
2341 NodePtr pre = node1->d_prev_p;
2355 while (node1 != node2 && node2 != finish) {
2361 if (comparator(node2->d_value, node1->d_value)) {
2367 NodePtr lastMove = node2;
2368 NodePtr next2 = node2->d_next_p;
2369 while (next2 != finish && comparator(next2->d_value,
2372 next2 = lastMove->d_next_p;
2375 linkNodes(node2->d_prev_p, next2);
2376 linkNodes(node1->d_prev_p, node2);
2377 linkNodes(lastMove, node1);
2386 node1 = node1->d_next_p;
2390 return pre->d_next_p;
2393template <
class VALUE,
class ALLOCATOR>
2394template <
class t_ITERATOR,
class t_SENTINEL>
2396void list<VALUE, ALLOCATOR>::privateAppendRange(t_ITERATOR first,
2399 for (; first != last; ++first) {
2400 emplace_back(*first);
2404template <
class VALUE,
class ALLOCATOR>
2406void list<VALUE, ALLOCATOR>::quickSwap(list *other)
2412 swap(d_sentinel, other->d_sentinel);
2413 swap(sizeRef(), other->sizeRef());
2416template <
class VALUE,
class ALLOCATOR>
2418typename list<VALUE, ALLOCATOR>::AllocTraits::size_type&
2421 return d_alloc_and_size.size();
2424template <
class VALUE,
class ALLOCATOR>
2425template <
class COMPARE>
2426typename list<VALUE, ALLOCATOR>::NodePtr
2427list<VALUE, ALLOCATOR>::sortImp(NodePtr *nodePtrPtr,
2429 const COMPARE& comparator)
2433 NodePtr node1 = *nodePtrPtr;
2435 return node1->d_next_p;
2438 size_type half =
size / 2;
2440 NodePtr node2 = sortImp(&node1, half, comparator);
2441 NodePtr next = sortImp(&node2, size - half, comparator);
2443 *nodePtrPtr = mergeImp(node1, node2, next, comparator);
2448template <
class VALUE,
class ALLOCATOR>
2450const typename list<VALUE, ALLOCATOR>::NodeAlloc&
2451 list<VALUE, ALLOCATOR>::allocatorImp()
const
2453 return d_alloc_and_size;
2456template <
class VALUE,
class ALLOCATOR>
2458typename list<VALUE, ALLOCATOR>::NodePtr list<VALUE, ALLOCATOR>::headNode()
2461 return d_sentinel->d_next_p;
2464template <
class VALUE,
class ALLOCATOR>
2466const typename list<VALUE, ALLOCATOR>::AllocTraits::size_type&
2469 return d_alloc_and_size.size();
2473template <
class VALUE,
class ALLOCATOR>
2474list<VALUE, ALLOCATOR>::list()
2476, d_alloc_and_size(ALLOCATOR(), 0)
2479 typename AllocTraits::size_type>::value));
2481 typename AllocTraits::difference_type>::value));
2485template <
class VALUE,
class ALLOCATOR>
2486list<VALUE, ALLOCATOR>::list(
const ALLOCATOR& basicAllocator)
2488, d_alloc_and_size(basicAllocator, 0)
2493template <
class VALUE,
class ALLOCATOR>
2494list<VALUE, ALLOCATOR>::list(size_type numElements)
2496, d_alloc_and_size(ALLOCATOR(), size_type(-1))
2500 list tmp(this->allocatorImp());
2505 iterator pos = tmp.end();
2506 for (size_type i = 0; i < numElements; ++i) {
2513template <
class VALUE,
class ALLOCATOR>
2514list<VALUE, ALLOCATOR>::list(size_type numElements,
2515 const ALLOCATOR& basicAllocator)
2517, d_alloc_and_size(basicAllocator, size_type(-1))
2521 list tmp(this->allocatorImp());
2526 const_iterator pos = tmp.cend();
2527 for (size_type i = 0; i < numElements; ++i) {
2534template <
class VALUE,
class ALLOCATOR>
2535list<VALUE, ALLOCATOR>::list(size_type numElements,
2537 const ALLOCATOR& basicAllocator)
2539, d_alloc_and_size(basicAllocator, size_type(-1))
2543 list tmp(this->allocatorImp());
2544 tmp.insert(tmp.cbegin(), numElements, value);
2549template <
class VALUE,
class ALLOCATOR>
2550template <
class t_RANGE>
2552list<VALUE, ALLOCATOR>::list(
2555 const ALLOCATOR& basicAllocator)
2557, d_alloc_and_size(basicAllocator, size_type(-1))
2559 list tmp(this->allocatorImp());
2564template <
class VALUE,
class ALLOCATOR>
2565list<VALUE, ALLOCATOR>::list(
const list& original)
2568 AllocTraits::select_on_container_copy_construction(original.allocatorImp()),
2571 list tmp(this->allocatorImp());
2573 tmp.insert(tmp.cbegin(), original.begin(), original.end());
2578template <
class VALUE,
class ALLOCATOR>
2579list<VALUE, ALLOCATOR>::list(
const list& original,
2580 const typename type_identity<ALLOCATOR>::type& basicAllocator)
2582, d_alloc_and_size(basicAllocator, size_type(-1))
2584 list tmp(this->allocatorImp());
2586 tmp.insert(tmp.cbegin(), original.begin(), original.end());
2591template <
class VALUE,
class ALLOCATOR>
2592list<VALUE, ALLOCATOR>::list(BloombergLP::bslmf::MovableRef<list> original)
2594, d_alloc_and_size(MoveUtil::access(original).allocatorImp(), 0)
2605 quickSwap(&MoveUtil::access(original));
2608template <
class VALUE,
class ALLOCATOR>
2609list<VALUE, ALLOCATOR>::list(
2610 BloombergLP::bslmf::MovableRef<list> original,
2611 const typename type_identity<ALLOCATOR>::type& basicAllocator)
2613, d_alloc_and_size(basicAllocator, size_type(-1))
2617 list& lvalue = original;
2618 if (this->allocatorImp() == lvalue.allocatorImp()) {
2627 list tmp(this->allocatorImp());
2632 NodePtr endPtr = lvalue.d_sentinel;
2633 for (NodePtr p = lvalue.headNode(); endPtr != p; p = p->d_next_p) {
2634 tmp.emplace_back(MoveUtil::move(p->d_value));
2643#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
2644template <
class VALUE,
class ALLOCATOR>
2646list<VALUE, ALLOCATOR>::list(std::initializer_list<VALUE> values,
2647 const ALLOCATOR& basicAllocator)
2648: d_alloc_and_size(basicAllocator, size_type(-1))
2656 list tmp(this->allocatorImp());
2657 tmp.insert(tmp.cbegin(), values.begin(), values.end());
2663template <
class VALUE,
class ALLOCATOR>
2664list<VALUE, ALLOCATOR>::~list()
2669 if (sizeRef() != size_type(-1)) {
2678template <
class VALUE,
class ALLOCATOR>
2679list<VALUE, ALLOCATOR>& list<VALUE, ALLOCATOR>::operator=(
const list& rhs)
2682 AllocTraits::propagate_on_container_copy_assignment Propagate;
2685 if (Propagate::value && allocatorImp() !=
rhs.allocatorImp()) {
2689 BloombergLP::bslma::AllocatorUtil::assign(&allocatorImp(),
2700template <
class VALUE,
class ALLOCATOR>
2701list<VALUE, ALLOCATOR>& list<VALUE, ALLOCATOR>::operator=(
2702 BloombergLP::bslmf::MovableRef<list> rhs)
2706 AllocTraits::propagate_on_container_move_assignment Propagate;
2710 if (
this == &lvalue) {
2714 if (this->allocatorImp() == lvalue.allocatorImp()) {
2719 else if (Propagate::value) {
2733 list other(MoveUtil::move(lvalue));
2736 using BloombergLP::bslma::AllocatorUtil;
2738 AllocatorUtil::swap(
2739 &allocatorImp(), &other.allocatorImp(), Propagate());
2740 swap(d_sentinel, other.d_sentinel);
2741 swap(sizeRef(), other.sizeRef());
2749 NodePtr dstPtr = this->headNode();
2750 const const_iterator dstEnd = this->
cend();
2751 const NodePtr dstEndPtr = dstEnd.d_node_p;
2753 NodePtr srcPtr = lvalue.headNode();
2754 const NodePtr srcEndPtr = lvalue.d_sentinel;
2756 for (; srcEndPtr != srcPtr && dstEndPtr != dstPtr;
2757 srcPtr = srcPtr->d_next_p, dstPtr = dstPtr->d_next_p) {
2758 dstPtr->d_value = MoveUtil::move(srcPtr->d_value);
2761 erase(const_iterator(dstPtr), dstEnd);
2763 for (; srcEndPtr != srcPtr; srcPtr = srcPtr->d_next_p) {
2764 emplace(dstEnd, MoveUtil::move(srcPtr->d_value));
2771#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
2772template <
class VALUE,
class ALLOCATOR>
2774list<VALUE, ALLOCATOR>& list<VALUE, ALLOCATOR>::operator=(
2775 std::initializer_list<VALUE> rhs)
2782template <
class VALUE,
class ALLOCATOR>
2783void list<VALUE, ALLOCATOR>::assign(size_type numElements,
const VALUE& value)
2785 NodePtr dst_p = this->headNode();
2786 const const_iterator dstEnd = this->
cend();
2787 const NodePtr dstEnd_p = dstEnd.d_node_p;
2789 for (; 0 < numElements && dstEnd_p != dst_p;
2790 --numElements, dst_p = dst_p->d_next_p) {
2791 dst_p->d_value = value;
2794 erase(const_iterator(dst_p), dstEnd);
2796 for (; 0 < numElements; --numElements) {
2797 insert(dstEnd, value);
2801#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
2802template <
class VALUE,
class ALLOCATOR>
2804void list<VALUE, ALLOCATOR>::assign(std::initializer_list<VALUE> values)
2806 assign(values.begin(), values.end());
2810template <
class VALUE,
class ALLOCATOR>
2811template <
class t_RANGE>
2813void list<VALUE, ALLOCATOR>::assign_range(
2822template <
class VALUE,
class ALLOCATOR>
2824typename list<VALUE, ALLOCATOR>::iterator list<VALUE, ALLOCATOR>::begin()
2827 return iterator(headNode());
2830template <
class VALUE,
class ALLOCATOR>
2832typename list<VALUE, ALLOCATOR>::iterator list<VALUE, ALLOCATOR>::end()
2835 return iterator(d_sentinel);
2838template <
class VALUE,
class ALLOCATOR>
2840typename list<VALUE, ALLOCATOR>::reverse_iterator
2843 return reverse_iterator(
end());
2846template <
class VALUE,
class ALLOCATOR>
2848typename list<VALUE, ALLOCATOR>::reverse_iterator
2851 return reverse_iterator(
begin());
2856template <
class VALUE,
class ALLOCATOR>
2860 const NodePtr e = d_sentinel;
2861 for (NodePtr p = d_sentinel->d_next_p; e != p; ) {
2862 NodePtr condemned = p;
2864 deleteNode(condemned);
2867 linkNodes(d_sentinel, d_sentinel);
2871template <
class VALUE,
class ALLOCATOR>
2872void list<VALUE, ALLOCATOR>::resize(size_type newSize)
2874 if (newSize > sizeRef()) {
2875 const_iterator ce =
cend();
2878 }
while (newSize > sizeRef());
2881 NodePtr e = d_sentinel;
2882 NodePtr p = e->d_prev_p;
2883 for (size_type d = sizeRef() - newSize; d > 0; --d) {
2884 NodePtr condemned = p;
2886 deleteNode(condemned);
2889 sizeRef() = newSize;
2893template <
class VALUE,
class ALLOCATOR>
2894void list<VALUE, ALLOCATOR>::resize(size_type newSize,
const VALUE& value)
2896 if (newSize > sizeRef()) {
2897 const_iterator ce =
cend();
2900 }
while (newSize > sizeRef());
2903 NodePtr e = d_sentinel;
2904 NodePtr p = e->d_prev_p;
2905 for (size_type d = sizeRef() - newSize; d > 0; --d) {
2906 NodePtr condemned = p;
2908 deleteNode(condemned);
2911 sizeRef() = newSize;
2917template <
class VALUE,
class ALLOCATOR>
2919typename list<VALUE, ALLOCATOR>::reference
2920list<VALUE, ALLOCATOR>::back()
2924 return d_sentinel->d_prev_p->d_value;
2927template <
class VALUE,
class ALLOCATOR>
2929typename list<VALUE, ALLOCATOR>::reference
2930list<VALUE, ALLOCATOR>::front()
2934 return headNode()->d_value;
2939template <
class VALUE,
class ALLOCATOR>
2941void list<VALUE, ALLOCATOR>::pop_back()
2948template <
class VALUE,
class ALLOCATOR>
2950void list<VALUE, ALLOCATOR>::pop_front()
2959template <
class VALUE,
class ALLOCATOR>
2960typename list<VALUE, ALLOCATOR>::iterator
2961list<VALUE, ALLOCATOR>::erase(const_iterator position)
2965 NodePtr condemned = position.d_node_p;
2966 iterator ret(condemned->d_next_p);
2968 linkNodes(condemned->d_prev_p, condemned->d_next_p);
2969 deleteNode(condemned);
2974template <
class VALUE,
class ALLOCATOR>
2975typename list<VALUE, ALLOCATOR>::iterator
2976list<VALUE, ALLOCATOR>::erase(const_iterator dstBegin, const_iterator dstEnd)
2978 NodePtr p = dstBegin.d_node_p;
2979 const NodePtr e = dstEnd. d_node_p;
2981 linkNodes(p->d_prev_p, e);
2983 size_type numDeleted = 0;
2984 for (; e != p; ++numDeleted) {
2985 NodePtr condemned = p;
2987 deleteNode(condemned);
2990 sizeRef() -= numDeleted;
2998template <
class VALUE,
class ALLOCATOR>
2999template <
class t_RANGE>
3001void list<VALUE, ALLOCATOR>::append_range(
3004 privateAppendRange(ranges::begin(range), ranges::end(range));
3007#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
3010#ifndef BSLSTL_LIST_VARIADIC_LIMIT
3011#define BSLSTL_LIST_VARIADIC_LIMIT 10
3013#ifndef BSLSTL_LIST_VARIADIC_LIMIT_D
3014#define BSLSTL_LIST_VARIADIC_LIMIT_D BSLSTL_LIST_VARIADIC_LIMIT
3016#if BSLSTL_LIST_VARIADIC_LIMIT_D >= 0
3017template <
class VALUE,
class ALLOCATOR>
3019typename list<VALUE, ALLOCATOR>::reference
3020list<VALUE, ALLOCATOR>::emplace_back(
3028#if BSLSTL_LIST_VARIADIC_LIMIT_D >= 1
3029template <
class VALUE,
class ALLOCATOR>
3030template <
class ARGS_01>
3032typename list<VALUE, ALLOCATOR>::reference
3033list<VALUE, ALLOCATOR>::emplace_back(
3041#if BSLSTL_LIST_VARIADIC_LIMIT_D >= 2
3042template <
class VALUE,
class ALLOCATOR>
3043template <
class ARGS_01,
3046typename list<VALUE, ALLOCATOR>::reference
3047list<VALUE, ALLOCATOR>::emplace_back(
3057#if BSLSTL_LIST_VARIADIC_LIMIT_D >= 3
3058template <
class VALUE,
class ALLOCATOR>
3059template <
class ARGS_01,
3063typename list<VALUE, ALLOCATOR>::reference
3064list<VALUE, ALLOCATOR>::emplace_back(
3076#if BSLSTL_LIST_VARIADIC_LIMIT_D >= 4
3077template <
class VALUE,
class ALLOCATOR>
3078template <
class ARGS_01,
3083typename list<VALUE, ALLOCATOR>::reference
3084list<VALUE, ALLOCATOR>::emplace_back(
3098#if BSLSTL_LIST_VARIADIC_LIMIT_D >= 5
3099template <
class VALUE,
class ALLOCATOR>
3100template <
class ARGS_01,
3106typename list<VALUE, ALLOCATOR>::reference
3107list<VALUE, ALLOCATOR>::emplace_back(
3123#if BSLSTL_LIST_VARIADIC_LIMIT_D >= 6
3124template <
class VALUE,
class ALLOCATOR>
3125template <
class ARGS_01,
3132typename list<VALUE, ALLOCATOR>::reference
3133list<VALUE, ALLOCATOR>::emplace_back(
3151#if BSLSTL_LIST_VARIADIC_LIMIT_D >= 7
3152template <
class VALUE,
class ALLOCATOR>
3153template <
class ARGS_01,
3161typename list<VALUE, ALLOCATOR>::reference
3162list<VALUE, ALLOCATOR>::emplace_back(
3182#if BSLSTL_LIST_VARIADIC_LIMIT_D >= 8
3183template <
class VALUE,
class ALLOCATOR>
3184template <
class ARGS_01,
3193typename list<VALUE, ALLOCATOR>::reference
3194list<VALUE, ALLOCATOR>::emplace_back(
3216#if BSLSTL_LIST_VARIADIC_LIMIT_D >= 9
3217template <
class VALUE,
class ALLOCATOR>
3218template <
class ARGS_01,
3228typename list<VALUE, ALLOCATOR>::reference
3229list<VALUE, ALLOCATOR>::emplace_back(
3253#if BSLSTL_LIST_VARIADIC_LIMIT_D >= 10
3254template <
class VALUE,
class ALLOCATOR>
3255template <
class ARGS_01,
3266typename list<VALUE, ALLOCATOR>::reference
3267list<VALUE, ALLOCATOR>::emplace_back(
3296template <
class VALUE,
class ALLOCATOR>
3297template <
class... ARGS>
3299typename list<VALUE, ALLOCATOR>::reference
3300list<VALUE, ALLOCATOR>::emplace_back(
3309#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
3312#ifndef BSLSTL_LIST_VARIADIC_LIMIT
3313#define BSLSTL_LIST_VARIADIC_LIMIT 10
3315#ifndef BSLSTL_LIST_VARIADIC_LIMIT_E
3316#define BSLSTL_LIST_VARIADIC_LIMIT_E BSLSTL_LIST_VARIADIC_LIMIT
3318#if BSLSTL_LIST_VARIADIC_LIMIT_E >= 0
3319template <
class VALUE,
class ALLOCATOR>
3321typename list<VALUE, ALLOCATOR>::reference
3322list<VALUE, ALLOCATOR>::emplace_front(
3330#if BSLSTL_LIST_VARIADIC_LIMIT_E >= 1
3331template <
class VALUE,
class ALLOCATOR>
3332template <
class ARGS_01>
3334typename list<VALUE, ALLOCATOR>::reference
3335list<VALUE, ALLOCATOR>::emplace_front(
3343#if BSLSTL_LIST_VARIADIC_LIMIT_E >= 2
3344template <
class VALUE,
class ALLOCATOR>
3345template <
class ARGS_01,
3348typename list<VALUE, ALLOCATOR>::reference
3349list<VALUE, ALLOCATOR>::emplace_front(
3359#if BSLSTL_LIST_VARIADIC_LIMIT_E >= 3
3360template <
class VALUE,
class ALLOCATOR>
3361template <
class ARGS_01,
3365typename list<VALUE, ALLOCATOR>::reference
3366list<VALUE, ALLOCATOR>::emplace_front(
3378#if BSLSTL_LIST_VARIADIC_LIMIT_E >= 4
3379template <
class VALUE,
class ALLOCATOR>
3380template <
class ARGS_01,
3385typename list<VALUE, ALLOCATOR>::reference
3386list<VALUE, ALLOCATOR>::emplace_front(
3400#if BSLSTL_LIST_VARIADIC_LIMIT_E >= 5
3401template <
class VALUE,
class ALLOCATOR>
3402template <
class ARGS_01,
3408typename list<VALUE, ALLOCATOR>::reference
3409list<VALUE, ALLOCATOR>::emplace_front(
3425#if BSLSTL_LIST_VARIADIC_LIMIT_E >= 6
3426template <
class VALUE,
class ALLOCATOR>
3427template <
class ARGS_01,
3434typename list<VALUE, ALLOCATOR>::reference
3435list<VALUE, ALLOCATOR>::emplace_front(
3453#if BSLSTL_LIST_VARIADIC_LIMIT_E >= 7
3454template <
class VALUE,
class ALLOCATOR>
3455template <
class ARGS_01,
3463typename list<VALUE, ALLOCATOR>::reference
3464list<VALUE, ALLOCATOR>::emplace_front(
3484#if BSLSTL_LIST_VARIADIC_LIMIT_E >= 8
3485template <
class VALUE,
class ALLOCATOR>
3486template <
class ARGS_01,
3495typename list<VALUE, ALLOCATOR>::reference
3496list<VALUE, ALLOCATOR>::emplace_front(
3518#if BSLSTL_LIST_VARIADIC_LIMIT_E >= 9
3519template <
class VALUE,
class ALLOCATOR>
3520template <
class ARGS_01,
3530typename list<VALUE, ALLOCATOR>::reference
3531list<VALUE, ALLOCATOR>::emplace_front(
3555#if BSLSTL_LIST_VARIADIC_LIMIT_E >= 10
3556template <
class VALUE,
class ALLOCATOR>
3557template <
class ARGS_01,
3568typename list<VALUE, ALLOCATOR>::reference
3569list<VALUE, ALLOCATOR>::emplace_front(
3598template <
class VALUE,
class ALLOCATOR>
3599template <
class... ARGS>
3601typename list<VALUE, ALLOCATOR>::reference
3602list<VALUE, ALLOCATOR>::emplace_front(
3611template <
class VALUE,
class ALLOCATOR>
3612template <
class t_RANGE>
3614void list<VALUE, ALLOCATOR>::prepend_range(
3620template <
class VALUE,
class ALLOCATOR>
3622void list<VALUE, ALLOCATOR>::push_back(
const VALUE& value)
3624 emplace(
cend(), value);
3627template <
class VALUE,
class ALLOCATOR>
3629void list<VALUE, ALLOCATOR>::push_back(
3630 BloombergLP::bslmf::MovableRef<VALUE> value)
3632 emplace(
cend(), MoveUtil::move(value));
3635template <
class VALUE,
class ALLOCATOR>
3637void list<VALUE, ALLOCATOR>::push_front(
const VALUE& value)
3639 emplace(
cbegin(), value);
3642template <
class VALUE,
class ALLOCATOR>
3644void list<VALUE, ALLOCATOR>::push_front(
3645 BloombergLP::bslmf::MovableRef<VALUE> value)
3647 emplace(
cbegin(), MoveUtil::move(value));
3652#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
3655#ifndef BSLSTL_LIST_VARIADIC_LIMIT
3656#define BSLSTL_LIST_VARIADIC_LIMIT 10
3658#ifndef BSLSTL_LIST_VARIADIC_LIMIT_F
3659#define BSLSTL_LIST_VARIADIC_LIMIT_F BSLSTL_LIST_VARIADIC_LIMIT
3661#if BSLSTL_LIST_VARIADIC_LIMIT_F >= 0
3662template <
class VALUE,
class ALLOCATOR>
3663typename list<VALUE, ALLOCATOR>::iterator
3664list<VALUE, ALLOCATOR>::emplace(const_iterator position)
3666 NodePtr p = allocateNode();
3667 NodeProctor proctor(
this, p);
3668 AllocTraits::construct(allocatorImp(),
3669 BloombergLP::bsls::Util::addressOf(p->d_value));
3671 return insertNode(position, p);
3675#if BSLSTL_LIST_VARIADIC_LIMIT_F >= 1
3676template <
class VALUE,
class ALLOCATOR>
3677template <
class ARGS_01>
3678typename list<VALUE, ALLOCATOR>::iterator
3679list<VALUE, ALLOCATOR>::emplace(const_iterator position,
3682 NodePtr p = allocateNode();
3683 NodeProctor proctor(
this, p);
3684 AllocTraits::construct(allocatorImp(),
3685 BloombergLP::bsls::Util::addressOf(p->d_value),
3688 return insertNode(position, p);
3692#if BSLSTL_LIST_VARIADIC_LIMIT_F >= 2
3693template <
class VALUE,
class ALLOCATOR>
3694template <
class ARGS_01,
3696typename list<VALUE, ALLOCATOR>::iterator
3697list<VALUE, ALLOCATOR>::emplace(const_iterator position,
3701 NodePtr p = allocateNode();
3702 NodeProctor proctor(
this, p);
3703 AllocTraits::construct(allocatorImp(),
3704 BloombergLP::bsls::Util::addressOf(p->d_value),
3708 return insertNode(position, p);
3712#if BSLSTL_LIST_VARIADIC_LIMIT_F >= 3
3713template <
class VALUE,
class ALLOCATOR>
3714template <
class ARGS_01,
3717typename list<VALUE, ALLOCATOR>::iterator
3718list<VALUE, ALLOCATOR>::emplace(const_iterator position,
3723 NodePtr p = allocateNode();
3724 NodeProctor proctor(
this, p);
3725 AllocTraits::construct(allocatorImp(),
3726 BloombergLP::bsls::Util::addressOf(p->d_value),
3731 return insertNode(position, p);
3735#if BSLSTL_LIST_VARIADIC_LIMIT_F >= 4
3736template <
class VALUE,
class ALLOCATOR>
3737template <
class ARGS_01,
3741typename list<VALUE, ALLOCATOR>::iterator
3742list<VALUE, ALLOCATOR>::emplace(const_iterator position,
3748 NodePtr p = allocateNode();
3749 NodeProctor proctor(
this, p);
3750 AllocTraits::construct(allocatorImp(),
3751 BloombergLP::bsls::Util::addressOf(p->d_value),
3757 return insertNode(position, p);
3761#if BSLSTL_LIST_VARIADIC_LIMIT_F >= 5
3762template <
class VALUE,
class ALLOCATOR>
3763template <
class ARGS_01,
3768typename list<VALUE, ALLOCATOR>::iterator
3769list<VALUE, ALLOCATOR>::emplace(const_iterator position,
3776 NodePtr p = allocateNode();
3777 NodeProctor proctor(
this, p);
3778 AllocTraits::construct(allocatorImp(),
3779 BloombergLP::bsls::Util::addressOf(p->d_value),
3786 return insertNode(position, p);
3790#if BSLSTL_LIST_VARIADIC_LIMIT_F >= 6
3791template <
class VALUE,
class ALLOCATOR>
3792template <
class ARGS_01,
3798typename list<VALUE, ALLOCATOR>::iterator
3799list<VALUE, ALLOCATOR>::emplace(const_iterator position,
3807 NodePtr p = allocateNode();
3808 NodeProctor proctor(
this, p);
3809 AllocTraits::construct(allocatorImp(),
3810 BloombergLP::bsls::Util::addressOf(p->d_value),
3818 return insertNode(position, p);
3822#if BSLSTL_LIST_VARIADIC_LIMIT_F >= 7
3823template <
class VALUE,
class ALLOCATOR>
3824template <
class ARGS_01,
3831typename list<VALUE, ALLOCATOR>::iterator
3832list<VALUE, ALLOCATOR>::emplace(const_iterator position,
3841 NodePtr p = allocateNode();
3842 NodeProctor proctor(
this, p);
3843 AllocTraits::construct(allocatorImp(),
3844 BloombergLP::bsls::Util::addressOf(p->d_value),
3853 return insertNode(position, p);
3857#if BSLSTL_LIST_VARIADIC_LIMIT_F >= 8
3858template <
class VALUE,
class ALLOCATOR>
3859template <
class ARGS_01,
3867typename list<VALUE, ALLOCATOR>::iterator
3868list<VALUE, ALLOCATOR>::emplace(const_iterator position,
3878 NodePtr p = allocateNode();
3879 NodeProctor proctor(
this, p);
3880 AllocTraits::construct(allocatorImp(),
3881 BloombergLP::bsls::Util::addressOf(p->d_value),
3891 return insertNode(position, p);
3895#if BSLSTL_LIST_VARIADIC_LIMIT_F >= 9
3896template <
class VALUE,
class ALLOCATOR>
3897template <
class ARGS_01,
3906typename list<VALUE, ALLOCATOR>::iterator
3907list<VALUE, ALLOCATOR>::emplace(const_iterator position,
3918 NodePtr p = allocateNode();
3919 NodeProctor proctor(
this, p);
3920 AllocTraits::construct(allocatorImp(),
3921 BloombergLP::bsls::Util::addressOf(p->d_value),
3932 return insertNode(position, p);
3936#if BSLSTL_LIST_VARIADIC_LIMIT_F >= 10
3937template <
class VALUE,
class ALLOCATOR>
3938template <
class ARGS_01,
3948typename list<VALUE, ALLOCATOR>::iterator
3949list<VALUE, ALLOCATOR>::emplace(const_iterator position,
3961 NodePtr p = allocateNode();
3962 NodeProctor proctor(
this, p);
3963 AllocTraits::construct(allocatorImp(),
3964 BloombergLP::bsls::Util::addressOf(p->d_value),
3976 return insertNode(position, p);
3983template <
class VALUE,
class ALLOCATOR>
3984template <
class... ARGS>
3985typename list<VALUE, ALLOCATOR>::iterator
3986list<VALUE, ALLOCATOR>::emplace(const_iterator position,
3989 NodePtr p = allocateNode();
3990 NodeProctor proctor(
this, p);
3991 AllocTraits::construct(allocatorImp(),
3992 BloombergLP::bsls::Util::addressOf(p->d_value),
3995 return insertNode(position, p);
4000template <
class VALUE,
class ALLOCATOR>
4001typename list<VALUE, ALLOCATOR>::iterator
4002list<VALUE, ALLOCATOR>::insert(const_iterator dstPosition,
const VALUE& value)
4004 return emplace(dstPosition, value);
4007template <
class VALUE,
class ALLOCATOR>
4008typename list<VALUE, ALLOCATOR>::iterator
4009list<VALUE, ALLOCATOR>::insert(
4010 const_iterator dstPosition,
4011 BloombergLP::bslmf::MovableRef<VALUE> value)
4013 return emplace(dstPosition, MoveUtil::move(value));
4016template <
class VALUE,
class ALLOCATOR>
4017typename list<VALUE, ALLOCATOR>::iterator
4018list<VALUE, ALLOCATOR>::insert(const_iterator dstPosition,
4019 size_type numElements,
4022 if (0 == numElements) {
4023 return dstPosition.unconst();
4028 iterator ret = emplace(dstPosition, value);
4032 for (--numElements; numElements > 0; --numElements) {
4033 emplace(dstPosition, value);
4039#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
4040template <
class VALUE,
class ALLOCATOR>
4041typename list<VALUE, ALLOCATOR>::iterator
4042list<VALUE, ALLOCATOR>::insert(const_iterator dstPosition,
4043 std::initializer_list<VALUE> values)
4045 return insert(dstPosition, values.begin(), values.end());
4049template <
class VALUE,
class ALLOCATOR>
4050template <
class t_RANGE>
4052typename list<VALUE, ALLOCATOR>::iterator
4053list<VALUE, ALLOCATOR>::insert_range(
4054 const_iterator position,
4057 list tmp(from_range,
4060 iterator it = !tmp.empty() ? tmp.begin() : position.unconst();
4061 splice(position, tmp);
4067template <
class VALUE,
class ALLOCATOR>
4069void list<VALUE, ALLOCATOR>::merge(list& other)
4073 merge(other, DefaultLessThan());
4076template <
class VALUE,
class ALLOCATOR>
4078void list<VALUE, ALLOCATOR>::merge(BloombergLP::bslmf::MovableRef<list> other)
4080 list& lvalue = other;
4084 merge(lvalue, DefaultLessThan());
4087template <
class VALUE,
class ALLOCATOR>
4088template <
class COMPARE>
4089void list<VALUE, ALLOCATOR>::merge(list& other, COMPARE comparator)
4091 if (&other ==
this) {
4095 BSLS_ASSERT(this->allocatorImp() == other.allocatorImp());
4097 if (other.empty()) {
4106 NodePtr xfirst = other.d_sentinel->d_next_p;
4107 splice(
end(), other);
4113 mergeImp(d_sentinel->d_next_p, xfirst, d_sentinel, comparator);
4116template <
class VALUE,
class ALLOCATOR>
4117template <
class COMPARE>
4119void list<VALUE, ALLOCATOR>::merge(
4120 BloombergLP::bslmf::MovableRef<list> other,
4123 list& lvalue = other;
4127 merge(lvalue, comparator);
4130template <
class VALUE,
class ALLOCATOR>
4131typename list<VALUE, ALLOCATOR>::size_type
4132list<VALUE, ALLOCATOR>::remove(
const VALUE& value)
4134 const size_type origSize = this->size();
4135 const const_iterator e =
cend();
4136 for (const_iterator i =
cbegin(); e != i; ) {
4147 return origSize - this->size();
4150template <
class VALUE,
class ALLOCATOR>
4151template <
class PREDICATE>
4152typename list<VALUE, ALLOCATOR>::size_type
4153list<VALUE, ALLOCATOR>::remove_if(PREDICATE predicate)
4155 const size_type origSize = this->size();
4156 const iterator e =
end();
4157 for (iterator i =
begin(); e != i; ) {
4158 if (predicate(*i)) {
4166 return origSize - this->size();
4169template <
class VALUE,
class ALLOCATOR>
4172 NodePtr sentinel = d_sentinel;
4173 NodePtr p = sentinel;
4176 NodePtr tmp = p->d_next_p;
4177 p->d_next_p = p->d_prev_p;
4180 }
while (p != sentinel);
4183template <
class VALUE,
class ALLOCATOR>
4185void list<VALUE, ALLOCATOR>::sort()
4187 sort(DefaultLessThan());
4190template <
class VALUE,
class ALLOCATOR>
4191template <
class COMPARE>
4192void list<VALUE, ALLOCATOR>::sort(COMPARE comparator)
4194 if (sizeRef() < 2) {
4197 NodePtr node1 = d_sentinel->d_next_p;
4198 sortImp(&node1,
size(), comparator);
4201template <
class VALUE,
class ALLOCATOR>
4202void list<VALUE, ALLOCATOR>::splice(const_iterator dstPosition, list& src)
4204 BSLS_ASSERT(allocatorImp() == src.allocatorImp());
4211 NodePtr pPos = dstPosition.d_node_p;
4212 NodePtr pFirst = src.headNode();
4213 NodePtr pLast = src.d_sentinel->d_prev_p;
4214 size_type n = src.sizeRef();
4218 linkNodes(src.d_sentinel, src.d_sentinel);
4223 linkNodes(pPos->d_prev_p, pFirst);
4224 linkNodes(pLast, pPos);
4228template <
class VALUE,
class ALLOCATOR>
4230void list<VALUE, ALLOCATOR>::splice(
4231 const_iterator dstPosition,
4232 BloombergLP::bslmf::MovableRef<list> src)
4234 splice(dstPosition, MoveUtil::access(src));
4237template <
class VALUE,
class ALLOCATOR>
4238void list<VALUE, ALLOCATOR>::splice(const_iterator dstPosition,
4240 const_iterator srcNode)
4242 BSLS_ASSERT(allocatorImp() == src.allocatorImp());
4244 NodePtr pPos = dstPosition.d_node_p;
4245 NodePtr pSrcNode = srcNode.d_node_p;
4246 NodePtr pAfterSrcNode = pSrcNode->d_next_p;
4248 if (pPos == pSrcNode || pPos == pAfterSrcNode) {
4254 linkNodes(pSrcNode->d_prev_p, pAfterSrcNode);
4259 linkNodes(pPos->d_prev_p, pSrcNode);
4260 linkNodes(pSrcNode, pPos);
4264template <
class VALUE,
class ALLOCATOR>
4266void list<VALUE, ALLOCATOR>::splice(
4267 const_iterator dstPosition,
4268 BloombergLP::bslmf::MovableRef<list> src,
4269 const_iterator srcNode)
4271 splice(dstPosition, MoveUtil::access(src), srcNode);
4274template <
class VALUE,
class ALLOCATOR>
4275void list<VALUE, ALLOCATOR>::splice(const_iterator dstPosition,
4277 const_iterator first,
4278 const_iterator last)
4280 BSLS_ASSERT(allocatorImp() == src.allocatorImp());
4282 size_type n = bsl::distance(first, last);
4288 NodePtr pPos = dstPosition.d_node_p;
4289 NodePtr pFirst = first.d_node_p;
4290 NodePtr pLast = last.d_node_p;
4291 NodePtr pSrcLast = pLast->d_prev_p;
4295 linkNodes(pFirst->d_prev_p, pLast);
4300 linkNodes(pPos->d_prev_p, pFirst);
4301 linkNodes(pSrcLast, pPos);
4305template <
class VALUE,
class ALLOCATOR>
4307void list<VALUE, ALLOCATOR>::splice(
4308 const_iterator dstPosition,
4309 BloombergLP::bslmf::MovableRef<list> src,
4310 const_iterator first,
4311 const_iterator last)
4313 splice(dstPosition, MoveUtil::access(src), first, last);
4316template <
class VALUE,
class ALLOCATOR>
4317void list<VALUE, ALLOCATOR>::unique()
4323 iterator i =
begin();
4326 reference match = *i++;
4327 while (i != e && *i == match) {
4333template <
class VALUE,
class ALLOCATOR>
4334template <
class EQ_PREDICATE>
4335void list<VALUE, ALLOCATOR>::unique(EQ_PREDICATE binaryPredicate)
4341 iterator i =
begin();
4344 reference match = *i++;
4345 while (i != e && binaryPredicate(*i, match)) {
4353template <
class VALUE,
class ALLOCATOR>
4354void list<VALUE, ALLOCATOR>::swap(list& other)
4360 typedef typename AllocTraits::propagate_on_container_swap Propagate;
4362 if (Propagate::value) {
4364 using BloombergLP::bslma::AllocatorUtil;
4366 AllocatorUtil::swap(
4367 &allocatorImp(), &other.allocatorImp(), Propagate());
4368 swap(d_sentinel, other.d_sentinel);
4369 swap(sizeRef(), other.sizeRef());
4372 allocatorImp() == other.allocatorImp())) {
4386 list toOtherCopy(MoveUtil::move(*
this), other.allocatorImp());
4387 list toThisCopy( MoveUtil::move(other), this->allocatorImp());
4389 toOtherCopy.quickSwap(&other);
4390 toThisCopy .quickSwap(
this);
4398template <
class VALUE,
class ALLOCATOR>
4400typename list<VALUE, ALLOCATOR>::const_iterator
4403 return const_iterator(headNode());
4406template <
class VALUE,
class ALLOCATOR>
4408typename list<VALUE, ALLOCATOR>::const_iterator
4411 return const_iterator(d_sentinel);
4414template <
class VALUE,
class ALLOCATOR>
4416typename list<VALUE, ALLOCATOR>::const_iterator
4422template <
class VALUE,
class ALLOCATOR>
4424typename list<VALUE, ALLOCATOR>::const_iterator
4430template <
class VALUE,
class ALLOCATOR>
4432typename list<VALUE, ALLOCATOR>::const_reverse_iterator
4438template <
class VALUE,
class ALLOCATOR>
4440typename list<VALUE, ALLOCATOR>::const_reverse_iterator
4446template <
class VALUE,
class ALLOCATOR>
4448typename list<VALUE, ALLOCATOR>::const_reverse_iterator
4451 return const_reverse_iterator(
end());
4454template <
class VALUE,
class ALLOCATOR>
4456typename list<VALUE, ALLOCATOR>::const_reverse_iterator
4459 return const_reverse_iterator(
begin());
4464template <
class VALUE,
class ALLOCATOR>
4468 return 0 == sizeRef();
4471template <
class VALUE,
class ALLOCATOR>
4473typename list<VALUE, ALLOCATOR>::size_type
4476 return AllocTraits::max_size(allocatorImp());
4479template <
class VALUE,
class ALLOCATOR>
4481typename list<VALUE, ALLOCATOR>::size_type list<VALUE, ALLOCATOR>::size() const
4489template <
class VALUE,
class ALLOCATOR>
4491typename list<VALUE, ALLOCATOR>::const_reference
4492list<VALUE, ALLOCATOR>::back()
const
4496 return d_sentinel->d_prev_p->d_value;
4499template <
class VALUE,
class ALLOCATOR>
4501typename list<VALUE, ALLOCATOR>::const_reference
4502list<VALUE, ALLOCATOR>::front()
const
4506 return headNode()->d_value;
4511template <
class VALUE,
class ALLOCATOR>
4515 return allocatorImp();
4521template <
class VALUE,
class ALLOCATOR>
4524 const list<VALUE, ALLOCATOR>& rhs)
4526 return BloombergLP::bslalg::RangeCompare::equal(
lhs.begin(),
4534#ifndef BSLS_COMPILERFEATURES_SUPPORT_THREE_WAY_COMPARISON
4536template <
class VALUE,
class ALLOCATOR>
4539 const list<VALUE, ALLOCATOR>& rhs)
4546#ifdef BSLALG_SYNTHTHREEWAYUTIL_AVAILABLE
4548template <
class VALUE,
class ALLOCATOR>
4550BloombergLP::bslalg::SynthThreeWayUtil::Result<VALUE> bsl::operator<=>(
4551 const list<VALUE, ALLOCATOR>& lhs,
4552 const list<VALUE, ALLOCATOR>& rhs)
4554 return bsl::lexicographical_compare_three_way(
4559 BloombergLP::bslalg::SynthThreeWayUtil::compare);
4564template <
class VALUE,
class ALLOCATOR>
4566bool bsl::operator< (
const list<VALUE, ALLOCATOR>& lhs,
4567 const list<VALUE, ALLOCATOR>& rhs)
4569 return 0 > BloombergLP::bslalg::RangeCompare::lexicographical(
lhs.begin(),
4577template <
class VALUE,
class ALLOCATOR>
4579bool bsl::operator> (
const list<VALUE, ALLOCATOR>& lhs,
4580 const list<VALUE, ALLOCATOR>& rhs)
4585template <
class VALUE,
class ALLOCATOR>
4588 const list<VALUE, ALLOCATOR>& rhs)
4593template <
class VALUE,
class ALLOCATOR>
4596 const list<VALUE, ALLOCATOR>& rhs)
4604template <
class VALUE,
class ALLOCATOR,
class BDE_OTHER_TYPE>
4606bsl::erase(list<VALUE, ALLOCATOR>& l,
const BDE_OTHER_TYPE& value)
4611 typename list<VALUE, ALLOCATOR>::size_type oldSize = l.size();
4612 for (
typename list<VALUE, ALLOCATOR>::iterator it = l.begin();
4622 return oldSize - l.size();
4625template <
class VALUE,
class ALLOCATOR,
class PREDICATE>
4627bsl::erase_if(list<VALUE, ALLOCATOR>& l, PREDICATE predicate)
4629 return BloombergLP::bslstl::AlgorithmUtil::containerEraseIf(l, predicate);
4632template <
class VALUE,
class ALLOCATOR>
4634void bsl::swap(list<VALUE, ALLOCATOR>& a, list<VALUE, ALLOCATOR>& b)
4654template <
class VALUE,
class ALLOCATOR>
4655struct HasStlIterators<
bsl::list<VALUE, ALLOCATOR> >
4663template <
class VALUE,
class ALLOCATOR>
4664struct UsesBslmaAllocator<
bsl::list<VALUE, ALLOCATOR> >
4674template <
class VALUE,
class ALLOCATOR>
4675struct IsBitwiseMoveable<
bsl::list<VALUE, ALLOCATOR> >
4676 : BloombergLP::bslmf::IsBitwiseMoveable<ALLOCATOR>
4683# error Not valid except when included from bslstl_list.h
Definition bslstl_list.h:769
List_Iterator & operator--()
Definition bslstl_list.h:2282
friend class list
Definition bslstl_list.h:783
VALUE * pointer
Definition bslstl_list.h:803
List_Iterator & operator++()
Definition bslstl_list.h:2274
friend class List_Iterator
Definition bslstl_list.h:786
reference operator*() const
Definition bslstl_list.h:2310
friend bool operator==(List_Iterator< T1 >, List_Iterator< T2 >)
Definition bslstl_list.h:2326
std::bidirectional_iterator_tag iterator_category
Definition bslstl_list.h:800
VALUE & reference
Definition bslstl_list.h:804
NcType value_type
Definition bslstl_list.h:801
List_Iterator & operator=(const List_Iterator &)=default
BloombergLP::bsls::Types::IntPtr difference_type
Definition bslstl_list.h:802
pointer operator->() const
Definition bslstl_list.h:2318
friend class list
Definition bslstl_list.h:739
friend class List_Iterator
Definition bslstl_list.h:742
Definition bslma_bslallocator.h:588
allocator_traits< ALLOCATOR >::size_type size_type
Definition bslstl_list.h:1121
#define BSLMF_ASSERT(expr)
Definition bslmf_assert.h:231
static const bool value
Definition bslmf_integralconstant.h:267
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1976
#define BSLS_ASSERT_SAFE(X)
Definition bsls_assert.h:1917
#define BSLS_COMPILERFEATURES_FORWARD_REF(T)
Definition bsls_compilerfeatures.h:2343
#define BSLS_COMPILERFEATURES_FORWARD(T, V)
Definition bsls_compilerfeatures.h:2349
#define BSLS_KEYWORD_NOEXCEPT_OPERATOR(...)
Definition bsls_keyword.h:677
#define BSLS_KEYWORD_NOEXCEPT
Definition bsls_keyword.h:674
#define BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(...)
Definition bsls_keyword.h:676
#define BSLSTL_LIST_REQUIRES_CONTAINER_COMPATIBLE_RANGE(R, T)
Definition bslstl_list.h:699
bool operator!=(const FileCleanerConfiguration &lhs, const FileCleanerConfiguration &rhs)
bool operator==(const FileCleanerConfiguration &lhs, const FileCleanerConfiguration &rhs)
void swap(OptionValue &a, OptionValue &b)
bsl::size_t size(const TYPE &array)
Return the number of elements in the specified array.
int assign(LHS_TYPE *lhs, const RHS_TYPE &rhs)
TransformIterator< FUNCTOR, ITERATOR > operator--(TransformIterator< FUNCTOR, ITERATOR > &iterator, int)
bool operator>=(const Guid &lhs, const Guid &rhs)
FunctionOutputIterator< FUNCTION > & operator++(FunctionOutputIterator< FUNCTION > &iterator)
Do nothing and return specified iterator.
Definition bdlb_functionoutputiterator.h:408
bool operator<=(const Guid &lhs, const Guid &rhs)
Definition bdlat_valuetypefunctions.h:939
T::reverse_iterator rend(T &container)
Definition bslstl_iterator.h:1723
void swap(array< VALUE_TYPE, SIZE > &lhs, array< VALUE_TYPE, SIZE > &rhs)
T::const_iterator cend(const T &container)
Definition bslstl_iterator.h:1709
T::reverse_iterator rbegin(T &container)
Definition bslstl_iterator.h:1665
bool operator>=(const array< VALUE_TYPE, SIZE > &lhs, const array< VALUE_TYPE, SIZE > &rhs)
bool operator<=(const array< VALUE_TYPE, SIZE > &lhs, const array< VALUE_TYPE, SIZE > &rhs)
ALLOCATOR const STRING_VIEW_LIKE_TYPE & rhs
Definition bslstl_string.h:3918
deque< VALUE_TYPE, ALLOCATOR >::size_type erase(deque< VALUE_TYPE, ALLOCATOR > &deq, const BDE_OTHER_TYPE &value)
Definition bslstl_deque.h:4424
T::iterator begin(T &container)
Definition bslstl_iterator.h:1593
bool operator==(const memory_resource &a, const memory_resource &b)
T::const_iterator cbegin(const T &container)
Definition bslstl_iterator.h:1651
ALLOCATOR & lhs
Definition bslstl_string.h:3917
T::iterator end(T &container)
Definition bslstl_iterator.h:1621
deque< VALUE_TYPE, ALLOCATOR >::size_type erase_if(deque< VALUE_TYPE, ALLOCATOR > &deq, PREDICATE predicate)
Definition bslstl_deque.h:4433
bool operator!=(const memory_resource &a, const memory_resource &b)
Definition bdlc_flathashmap.h:2218
Definition baljsn_encoder_testtypes.h:76
Definition bdlbb_blob.h:579
BloombergLP::bslma::AllocatorTraits_SizeType< ALLOCATOR_TYPE >::type size_type
Definition bslma_allocatortraits.h:1196
Definition bslmf_isconvertible.h:875
Definition bslmf_issame.h:146
remove_const< typenameremove_volatile< t_TYPE >::type >::type type
Definition bslmf_removecv.h:128