@@ -144,45 +144,46 @@ class __default_alloc_func;
144144
145145template  <class  _Fp , class  _Ap , class  _Rp , class ... _ArgTypes>
146146class  __alloc_func <_Fp, _Ap, _Rp(_ArgTypes...)> {
147-   __compressed_pair< _Fp, _Ap> __f_ ;
147+   _LIBCPP_COMPRESSED_PAIR ( _Fp, __func_,  _Ap, __alloc_) ;
148148
149149public: 
150150  typedef  _LIBCPP_NODEBUG _Fp _Target;
151151  typedef  _LIBCPP_NODEBUG _Ap _Alloc;
152152
153-   _LIBCPP_HIDE_FROM_ABI const  _Target& __target () const  { return  __f_. first () ; }
153+   _LIBCPP_HIDE_FROM_ABI const  _Target& __target () const  { return  __func_ ; }
154154
155155  //  WIN32 APIs may define __allocator, so use __get_allocator instead.
156-   _LIBCPP_HIDE_FROM_ABI const  _Alloc& __get_allocator () const  { return  __f_. second () ; }
156+   _LIBCPP_HIDE_FROM_ABI const  _Alloc& __get_allocator () const  { return  __alloc_ ; }
157157
158-   _LIBCPP_HIDE_FROM_ABI explicit  __alloc_func (_Target&& __f)
159-       : __f_(piecewise_construct, std::forward_as_tuple(std::move(__f)), std::forward_as_tuple()) {}
158+   _LIBCPP_HIDE_FROM_ABI explicit  __alloc_func (_Target&& __f) : __func_(std::move(__f)), __alloc_() {}
160159
161-   _LIBCPP_HIDE_FROM_ABI explicit  __alloc_func (const  _Target& __f, const  _Alloc& __a)
162-       : __f_(piecewise_construct, std::forward_as_tuple(__f), std::forward_as_tuple(__a)) {}
160+   _LIBCPP_HIDE_FROM_ABI explicit  __alloc_func (const  _Target& __f, const  _Alloc& __a) : __func_(__f), __alloc_(__a) {}
163161
164162  _LIBCPP_HIDE_FROM_ABI explicit  __alloc_func (const  _Target& __f, _Alloc&& __a)
165-       : __f_(piecewise_construct, std::forward_as_tuple( __f), std::forward_as_tuple (std::move(__a) )) {}
163+       : __func_( __f), __alloc_ (std::move(__a)) {}
166164
167165  _LIBCPP_HIDE_FROM_ABI explicit  __alloc_func (_Target&& __f, _Alloc&& __a)
168-       : __f_(piecewise_construct,  std::forward_as_tuple(std:: move(__f)), std::forward_as_tuple (std::move(__a) )) {}
166+       : __func_( std::move(__f)), __alloc_ (std::move(__a)) {}
169167
170168  _LIBCPP_HIDE_FROM_ABI _Rp operator ()(_ArgTypes&&... __arg) {
171169    typedef  __invoke_void_return_wrapper<_Rp> _Invoker;
172-     return  _Invoker::__call (__f_. first () , std::forward<_ArgTypes>(__arg)...);
170+     return  _Invoker::__call (__func_ , std::forward<_ArgTypes>(__arg)...);
173171  }
174172
175173  _LIBCPP_HIDE_FROM_ABI __alloc_func* __clone () const  {
176174    typedef  allocator_traits<_Alloc> __alloc_traits;
177175    typedef  __rebind_alloc<__alloc_traits, __alloc_func> _AA;
178-     _AA __a (__f_. second () );
176+     _AA __a (__alloc_ );
179177    typedef  __allocator_destructor<_AA> _Dp;
180178    unique_ptr<__alloc_func, _Dp> __hold (__a.allocate (1 ), _Dp (__a, 1 ));
181-     ::new  ((void *)__hold.get ()) __alloc_func (__f_. first () , _Alloc (__a));
179+     ::new  ((void *)__hold.get ()) __alloc_func (__func_ , _Alloc (__a));
182180    return  __hold.release ();
183181  }
184182
185-   _LIBCPP_HIDE_FROM_ABI void  destroy () _NOEXCEPT { __f_.~__compressed_pair<_Target, _Alloc>(); }
183+   _LIBCPP_HIDE_FROM_ABI void  destroy () _NOEXCEPT {
184+     __func_.~_Fp ();
185+     __alloc_.~_Alloc ();
186+   }
186187
187188  _LIBCPP_HIDE_FROM_ABI static  void  __destroy_and_delete (__alloc_func* __f) {
188189    typedef  allocator_traits<_Alloc> __alloc_traits;
0 commit comments