summaryrefslogtreecommitdiffstats
path: root/libcxx/include/vector
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2019-12-16 18:23:39 -0500
committerEric Fiselier <eric@efcs.ca>2019-12-16 18:38:58 -0500
commit549545b64aab77d2a1784062451ee1c33f8324d2 (patch)
tree54085e795e52088e247d055f92782ad4e002d2e3 /libcxx/include/vector
parentf63b64c0c3b486f164c3c66cce9f13df2bac6b6e (diff)
downloadbcm5719-llvm-549545b64aab77d2a1784062451ee1c33f8324d2.tar.gz
bcm5719-llvm-549545b64aab77d2a1784062451ee1c33f8324d2.zip
[libc++] Rework compressed pair constructors.
This patch de-duplicates most compressed pair constructors to use the same code in C++11 and C++03. Part of doing that is deleting the "__second_tag()" and replacing it with a "__value_init_tag()" which has the same effect, but allows for the removal of the special "one-arg" first element constructor. This patch is intended to have no semantic change.
Diffstat (limited to 'libcxx/include/vector')
-rw-r--r--libcxx/include/vector14
1 files changed, 7 insertions, 7 deletions
diff --git a/libcxx/include/vector b/libcxx/include/vector
index a8289734e12..8366bb5d11e 100644
--- a/libcxx/include/vector
+++ b/libcxx/include/vector
@@ -433,7 +433,7 @@ __vector_base<_Tp, _Allocator>::__vector_base()
_NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
: __begin_(nullptr),
__end_(nullptr),
- __end_cap_(nullptr)
+ __end_cap_(nullptr, __default_init_tag())
{
}
@@ -2622,7 +2622,7 @@ vector<bool, _Allocator>::vector()
_NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
: __begin_(nullptr),
__size_(0),
- __cap_alloc_(0)
+ __cap_alloc_(0, __default_init_tag())
{
}
@@ -2644,7 +2644,7 @@ template <class _Allocator>
vector<bool, _Allocator>::vector(size_type __n)
: __begin_(nullptr),
__size_(0),
- __cap_alloc_(0)
+ __cap_alloc_(0, __default_init_tag())
{
if (__n > 0)
{
@@ -2672,7 +2672,7 @@ template <class _Allocator>
vector<bool, _Allocator>::vector(size_type __n, const value_type& __x)
: __begin_(nullptr),
__size_(0),
- __cap_alloc_(0)
+ __cap_alloc_(0, __default_init_tag())
{
if (__n > 0)
{
@@ -2701,7 +2701,7 @@ vector<bool, _Allocator>::vector(_InputIterator __first, _InputIterator __last,
!__is_cpp17_forward_iterator<_InputIterator>::value>::type*)
: __begin_(nullptr),
__size_(0),
- __cap_alloc_(0)
+ __cap_alloc_(0, __default_init_tag())
{
#ifndef _LIBCPP_NO_EXCEPTIONS
try
@@ -2754,7 +2754,7 @@ vector<bool, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __la
typename enable_if<__is_cpp17_forward_iterator<_ForwardIterator>::value>::type*)
: __begin_(nullptr),
__size_(0),
- __cap_alloc_(0)
+ __cap_alloc_(0, __default_init_tag())
{
size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
if (__n > 0)
@@ -2786,7 +2786,7 @@ template <class _Allocator>
vector<bool, _Allocator>::vector(initializer_list<value_type> __il)
: __begin_(nullptr),
__size_(0),
- __cap_alloc_(0)
+ __cap_alloc_(0, __default_init_tag())
{
size_type __n = static_cast<size_type>(__il.size());
if (__n > 0)
OpenPOWER on IntegriCloud