aboutsummaryrefslogtreecommitdiffstats
path: root/include/deque
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-07-28 11:07:56 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-07-28 11:07:56 +0000
commitf36202620b428c45a1c8d91743727c9313424fb2 (patch)
tree14928d8970ba4890a6370aca4c38fc832d45f21f /include/deque
parent0294ba5648d889e48ffee8ddad25944e258940ae (diff)
downloadsrc-f36202620b428c45a1c8d91743727c9313424fb2.tar.gz
src-f36202620b428c45a1c8d91743727c9313424fb2.zip
Vendor import of libc++ trunk r338150:vendor/libc++/libc++-trunk-r338150
Notes
Notes: svn path=/vendor/libc++/dist/; revision=336819 svn path=/vendor/libc++/libc++-trunk-r338150/; revision=336820; tag=vendor/libc++/libc++-trunk-r338150
Diffstat (limited to 'include/deque')
-rw-r--r--include/deque29
1 files changed, 26 insertions, 3 deletions
diff --git a/include/deque b/include/deque
index 08cb295408be..bfbd3a5ef543 100644
--- a/include/deque
+++ b/include/deque
@@ -128,6 +128,10 @@ public:
void clear() noexcept;
};
+template <class InputIterator, class Allocator = allocator<typename iterator_traits<InputIterator>::value_type>>
+ deque(InputIterator, InputIterator, Allocator = Allocator())
+ -> deque<typename iterator_traits<InputIterator>::value_type, Allocator>;
+
template <class T, class Allocator>
bool operator==(const deque<T,Allocator>& x, const deque<T,Allocator>& y);
template <class T, class Allocator>
@@ -921,13 +925,14 @@ class __deque_base
{
__deque_base(const __deque_base& __c);
__deque_base& operator=(const __deque_base& __c);
-protected:
- typedef _Tp value_type;
+public:
typedef _Allocator allocator_type;
typedef allocator_traits<allocator_type> __alloc_traits;
+ typedef typename __alloc_traits::size_type size_type;
+protected:
+ typedef _Tp value_type;
typedef value_type& reference;
typedef const value_type& const_reference;
- typedef typename __alloc_traits::size_type size_type;
typedef typename __alloc_traits::difference_type difference_type;
typedef typename __alloc_traits::pointer pointer;
typedef typename __alloc_traits::const_pointer const_pointer;
@@ -946,6 +951,7 @@ protected:
typedef __deque_iterator<value_type, const_pointer, const_reference, __map_const_pointer,
difference_type> const_iterator;
+protected:
__map __map_;
size_type __start_;
__compressed_pair<size_type, allocator_type> __size_;
@@ -1461,6 +1467,23 @@ private:
void __move_assign(deque& __c, false_type);
};
+#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES
+template<class _InputIterator,
+ class _Alloc = typename std::allocator<typename iterator_traits<_InputIterator>::value_type>,
+ class = typename enable_if<__is_allocator<_Alloc>::value, void>::type
+ >
+deque(_InputIterator, _InputIterator)
+ -> deque<typename iterator_traits<_InputIterator>::value_type, _Alloc>;
+
+template<class _InputIterator,
+ class _Alloc,
+ class = typename enable_if<__is_allocator<_Alloc>::value, void>::type
+ >
+deque(_InputIterator, _InputIterator, _Alloc)
+ -> deque<typename iterator_traits<_InputIterator>::value_type, _Alloc>;
+#endif
+
+
template <class _Tp, class _Allocator>
deque<_Tp, _Allocator>::deque(size_type __n)
{