LWG Issue 2210 (Part #1): deque
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190251 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/deque b/include/deque
index 4faa87f..5bb8ff7 100644
--- a/include/deque
+++ b/include/deque
@@ -41,6 +41,7 @@
deque() noexcept(is_nothrow_default_constructible<allocator_type>::value);
explicit deque(const allocator_type& a);
explicit deque(size_type n);
+ explicit deque(size_type n, const Allocator& a); // C++14
deque(size_type n, const value_type& v);
deque(size_type n, const value_type& v, const allocator_type& a);
template <class InputIterator>
@@ -1209,6 +1210,9 @@
{}
_LIBCPP_INLINE_VISIBILITY deque(const allocator_type& __a) : __base(__a) {}
explicit deque(size_type __n);
+#if _LIBCPP_STD_VER > 11
+ explicit deque(size_type __n, const _Allocator& __a);
+#endif
deque(size_type __n, const value_type& __v);
deque(size_type __n, const value_type& __v, const allocator_type& __a);
template <class _InputIter>
@@ -1431,6 +1435,16 @@
__append(__n);
}
+#if _LIBCPP_STD_VER > 11
+template <class _Tp, class _Allocator>
+deque<_Tp, _Allocator>::deque(size_type __n, const _Allocator& __a)
+ : __base(__a)
+{
+ if (__n > 0)
+ __append(__n);
+}
+#endif
+
template <class _Tp, class _Allocator>
deque<_Tp, _Allocator>::deque(size_type __n, const value_type& __v)
{