summaryrefslogtreecommitdiff
path: root/include/memory
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2015-07-16 03:05:06 +0000
committerMarshall Clow <mclow.lists@gmail.com>2015-07-16 03:05:06 +0000
commitcd6ed54fedd042d301b19b484ceb14b7d83b3ede (patch)
treee2072cb37cf36f6141fb187951f44e9b0cc12d00 /include/memory
parent73f131f21076c5d10851cfdcbad2c52856c073a5 (diff)
Make sure that __libcpp_compressed_pair_imp default-constructs its' members, rather than value-initializing them. Fixes PR#24137
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@242377 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/memory')
-rw-r--r--include/memory14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/memory b/include/memory
index 9c1eef765..22311aaac 100644
--- a/include/memory
+++ b/include/memory
@@ -2035,11 +2035,11 @@ public:
typedef const typename remove_reference<_T1>::type& _T1_const_reference;
typedef const typename remove_reference<_T2>::type& _T2_const_reference;
- _LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp() {}
+ _LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp() : __first_(), __second_() {}
_LIBCPP_INLINE_VISIBILITY explicit __libcpp_compressed_pair_imp(_T1_param __t1)
- : __first_(_VSTD::forward<_T1_param>(__t1)) {}
+ : __first_(_VSTD::forward<_T1_param>(__t1)), __second_() {}
_LIBCPP_INLINE_VISIBILITY explicit __libcpp_compressed_pair_imp(_T2_param __t2)
- : __second_(_VSTD::forward<_T2_param>(__t2)) {}
+ : __first_(), __second_(_VSTD::forward<_T2_param>(__t2)) {}
_LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp(_T1_param __t1, _T2_param __t2)
: __first_(_VSTD::forward<_T1_param>(__t1)), __second_(_VSTD::forward<_T2_param>(__t2)) {}
@@ -2128,9 +2128,9 @@ public:
typedef const _T1& _T1_const_reference;
typedef const typename remove_reference<_T2>::type& _T2_const_reference;
- _LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp() {}
+ _LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp() : __second_() {}
_LIBCPP_INLINE_VISIBILITY explicit __libcpp_compressed_pair_imp(_T1_param __t1)
- : _T1(_VSTD::forward<_T1_param>(__t1)) {}
+ : _T1(_VSTD::forward<_T1_param>(__t1)), __second_() {}
_LIBCPP_INLINE_VISIBILITY explicit __libcpp_compressed_pair_imp(_T2_param __t2)
: __second_(_VSTD::forward<_T2_param>(__t2)) {}
_LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp(_T1_param __t1, _T2_param __t2)
@@ -2218,11 +2218,11 @@ public:
typedef const typename remove_reference<_T1>::type& _T1_const_reference;
typedef const _T2& _T2_const_reference;
- _LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp() {}
+ _LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp() : __first_() {}
_LIBCPP_INLINE_VISIBILITY explicit __libcpp_compressed_pair_imp(_T1_param __t1)
: __first_(_VSTD::forward<_T1_param>(__t1)) {}
_LIBCPP_INLINE_VISIBILITY explicit __libcpp_compressed_pair_imp(_T2_param __t2)
- : _T2(_VSTD::forward<_T2_param>(__t2)) {}
+ : _T2(_VSTD::forward<_T2_param>(__t2)), __first_() {}
_LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp(_T1_param __t1, _T2_param __t2)
_NOEXCEPT_(is_nothrow_move_constructible<_T1>::value &&
is_nothrow_move_constructible<_T2>::value)