[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.
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 549545b64aab77d2a1784062451ee1c33f8324d2
diff --git a/include/future b/include/future
index deb7725..751d122 100644
--- a/include/future
+++ b/include/future
@@ -1767,9 +1767,9 @@
__compressed_pair<_Fp, _Alloc> __f_;
public:
_LIBCPP_INLINE_VISIBILITY
- explicit __packaged_task_func(const _Fp& __f) : __f_(__f) {}
+ explicit __packaged_task_func(const _Fp& __f) : __f_(__f, __default_init_tag()) {}
_LIBCPP_INLINE_VISIBILITY
- explicit __packaged_task_func(_Fp&& __f) : __f_(_VSTD::move(__f)) {}
+ explicit __packaged_task_func(_Fp&& __f) : __f_(_VSTD::move(__f), __default_init_tag()) {}
_LIBCPP_INLINE_VISIBILITY
__packaged_task_func(const _Fp& __f, const _Alloc& __a)
: __f_(__f, __a) {}