_LIBCPP_INLINE_VISIBILITY
const _Target& __target() const { return __f_.first(); }
+ // WIN32 APIs may define __allocator, so use __get_allocator instead.
_LIBCPP_INLINE_VISIBILITY
- const _Alloc& __allocator() const { return __f_.second(); }
+ const _Alloc& __get_allocator() const { return __f_.second(); }
_LIBCPP_INLINE_VISIBILITY
explicit __alloc_func(_Target&& __f)
{
typedef allocator_traits<_Alloc> __alloc_traits;
typedef typename __rebind_alloc_helper<__alloc_traits, __func>::type _Ap;
- _Ap __a(__f_.__allocator());
+ _Ap __a(__f_.__get_allocator());
typedef __allocator_destructor<_Ap> _Dp;
unique_ptr<__func, _Dp> __hold(__a.allocate(1), _Dp(__a, 1));
::new ((void*)__hold.get()) __func(__f_.__target(), _Alloc(__a));
void
__func<_Fp, _Alloc, _Rp(_ArgTypes...)>::__clone(__base<_Rp(_ArgTypes...)>* __p) const
{
- ::new (__p) __func(__f_.__target(), __f_.__allocator());
+ ::new (__p) __func(__f_.__target(), __f_.__get_allocator());
}
template<class _Fp, class _Alloc, class _Rp, class ..._ArgTypes>
{
typedef allocator_traits<_Alloc> __alloc_traits;
typedef typename __rebind_alloc_helper<__alloc_traits, __func>::type _Ap;
- _Ap __a(__f_.__allocator());
+ _Ap __a(__f_.__get_allocator());
__f_.destroy();
__a.deallocate(this, 1);
}
typedef typename __rebind_alloc_helper<__alloc_traits, _Fun>::type
_FunAlloc;
_Fun* __f = static_cast<_Fun*>(__s);
- _FunAlloc __a(__f->__allocator());
+ _FunAlloc __a(__f->__get_allocator());
__f->destroy();
__a.deallocate(__f, 1);
}