From 549545b64aab77d2a1784062451ee1c33f8324d2 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Mon, 16 Dec 2019 18:23:39 -0500 Subject: [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. --- libcxx/include/__split_buffer | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libcxx/include/__split_buffer') diff --git a/libcxx/include/__split_buffer b/libcxx/include/__split_buffer index d70c0a7f166..fce209f8287 100644 --- a/libcxx/include/__split_buffer +++ b/libcxx/include/__split_buffer @@ -324,7 +324,7 @@ template inline __split_buffer<_Tp, _Allocator>::__split_buffer() _NOEXCEPT_(is_nothrow_default_constructible::value) - : __first_(nullptr), __begin_(nullptr), __end_(nullptr), __end_cap_(nullptr) + : __first_(nullptr), __begin_(nullptr), __end_(nullptr), __end_cap_(nullptr, __default_init_tag()) { } @@ -368,7 +368,7 @@ __split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c) template __split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c, const __alloc_rr& __a) - : __end_cap_(__second_tag(), __a) + : __end_cap_(nullptr, __a) { if (__a == __c.__alloc()) { -- cgit v1.2.3