diff --git a/stl/inc/memory b/stl/inc/memory index b65377e6390..13cd2bd7a72 100644 --- a/stl/inc/memory +++ b/stl/inc/memory @@ -2670,7 +2670,8 @@ private: this->~_Ref_count_unbounded_array_alloc(); - _Al.deallocate(_STD _Refancy<_Alloc_ptr_t<_Rebound_alloc>>(reinterpret_cast<_Storage*>(this)), _Storage_units); + _Al.deallocate(_STD _Refancy<_Alloc_ptr_t<_Rebound_alloc>>(reinterpret_cast<_Storage*>(this)), + static_cast<_Alloc_size_t<_Rebound_alloc>>(_Storage_units)); } }; @@ -2851,11 +2852,12 @@ struct _Allocate_n_ptr { _Alloc_ptr_t<_Alloc> _Ptr; size_t _Nx; - _Allocate_n_ptr(_Alloc& _Al_, const size_t _Nx_) : _Al(_Al_), _Ptr(_Al_.allocate(_Nx_)), _Nx(_Nx_) {} + _Allocate_n_ptr(_Alloc& _Al_, const size_t _Nx_) + : _Al(_Al_), _Ptr(_Al_.allocate(_Convert_size<_Alloc_size_t<_Alloc>>(_Nx_))), _Nx(_Nx_) {} ~_Allocate_n_ptr() { if (_Ptr) { - _Al.deallocate(_Ptr, _Nx); + _Al.deallocate(_Ptr, static_cast<_Alloc_size_t<_Alloc>>(_Nx)); } }