@@ -143,45 +143,46 @@ class __default_alloc_func;
143143
144144template <class _Fp , class _Ap , class _Rp , class ... _ArgTypes>
145145class __alloc_func <_Fp, _Ap, _Rp(_ArgTypes...)> {
146- __compressed_pair< _Fp, _Ap> __f_ ;
146+ _LIBCPP_COMPRESSED_PAIR ( _Fp, __func_, _Ap, __alloc_) ;
147147
148148public:
149149 typedef _LIBCPP_NODEBUG _Fp _Target;
150150 typedef _LIBCPP_NODEBUG _Ap _Alloc;
151151
152- _LIBCPP_HIDE_FROM_ABI const _Target& __target () const { return __f_. first () ; }
152+ _LIBCPP_HIDE_FROM_ABI const _Target& __target () const { return __func_ ; }
153153
154154 // WIN32 APIs may define __allocator, so use __get_allocator instead.
155- _LIBCPP_HIDE_FROM_ABI const _Alloc& __get_allocator () const { return __f_. second () ; }
155+ _LIBCPP_HIDE_FROM_ABI const _Alloc& __get_allocator () const { return __alloc_ ; }
156156
157- _LIBCPP_HIDE_FROM_ABI explicit __alloc_func (_Target&& __f)
158- : __f_(piecewise_construct, std::forward_as_tuple(std::move(__f)), std::forward_as_tuple()) {}
157+ _LIBCPP_HIDE_FROM_ABI explicit __alloc_func (_Target&& __f) : __func_(std::move(__f)), __alloc_() {}
159158
160- _LIBCPP_HIDE_FROM_ABI explicit __alloc_func (const _Target& __f, const _Alloc& __a)
161- : __f_(piecewise_construct, std::forward_as_tuple(__f), std::forward_as_tuple(__a)) {}
159+ _LIBCPP_HIDE_FROM_ABI explicit __alloc_func (const _Target& __f, const _Alloc& __a) : __func_(__f), __alloc_(__a) {}
162160
163161 _LIBCPP_HIDE_FROM_ABI explicit __alloc_func (const _Target& __f, _Alloc&& __a)
164- : __f_(piecewise_construct, std::forward_as_tuple( __f), std::forward_as_tuple (std::move(__a) )) {}
162+ : __func_( __f), __alloc_ (std::move(__a)) {}
165163
166164 _LIBCPP_HIDE_FROM_ABI explicit __alloc_func (_Target&& __f, _Alloc&& __a)
167- : __f_(piecewise_construct, std::forward_as_tuple(std:: move(__f)), std::forward_as_tuple (std::move(__a) )) {}
165+ : __func_( std::move(__f)), __alloc_ (std::move(__a)) {}
168166
169167 _LIBCPP_HIDE_FROM_ABI _Rp operator ()(_ArgTypes&&... __arg) {
170168 typedef __invoke_void_return_wrapper<_Rp> _Invoker;
171- return _Invoker::__call (__f_. first () , std::forward<_ArgTypes>(__arg)...);
169+ return _Invoker::__call (__func_ , std::forward<_ArgTypes>(__arg)...);
172170 }
173171
174172 _LIBCPP_HIDE_FROM_ABI __alloc_func* __clone () const {
175173 typedef allocator_traits<_Alloc> __alloc_traits;
176174 typedef __rebind_alloc<__alloc_traits, __alloc_func> _AA;
177- _AA __a (__f_. second () );
175+ _AA __a (__alloc_ );
178176 typedef __allocator_destructor<_AA> _Dp;
179177 unique_ptr<__alloc_func, _Dp> __hold (__a.allocate (1 ), _Dp (__a, 1 ));
180- ::new ((void *)__hold.get ()) __alloc_func (__f_. first () , _Alloc (__a));
178+ ::new ((void *)__hold.get ()) __alloc_func (__func_ , _Alloc (__a));
181179 return __hold.release ();
182180 }
183181
184- _LIBCPP_HIDE_FROM_ABI void destroy () _NOEXCEPT { __f_.~__compressed_pair<_Target, _Alloc>(); }
182+ _LIBCPP_HIDE_FROM_ABI void destroy () _NOEXCEPT {
183+ __func_.~_Fp ();
184+ __alloc_.~_Alloc ();
185+ }
185186
186187 _LIBCPP_HIDE_FROM_ABI static void __destroy_and_delete (__alloc_func* __f) {
187188 typedef allocator_traits<_Alloc> __alloc_traits;
0 commit comments