diff --git a/stl/inc/memory b/stl/inc/memory index 08c513e7b1..48ec38fa61 100644 --- a/stl/inc/memory +++ b/stl/inc/memory @@ -2693,15 +2693,16 @@ private: void _Delete_this() noexcept override { // destroy self constexpr size_t _Align = alignof(_Ref_count_unbounded_array_alloc); using _Storage = _Alignas_storage_unit<_Align>; + using _Rebound_alloc = _Rebind_alloc_t<_Alloc, _Storage>; - _Rebind_alloc_t<_Alloc, _Storage> _Al(this->_Get_val()); + _Rebound_alloc _Al(this->_Get_val()); const size_t _Bytes = _Calculate_bytes_for_flexible_array<_Ref_count_unbounded_array_alloc, _Check_overflow::_Nope>(_Size); const size_t _Storage_units = _Bytes / sizeof(_Storage); this->~_Ref_count_unbounded_array_alloc(); - _Al.deallocate(reinterpret_cast<_Storage*>(this), _Storage_units); + _Al.deallocate(_STD _Refancy<_Alloc_ptr_t<_Rebound_alloc>>(reinterpret_cast<_Storage*>(this)), _Storage_units); } }; diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index 99f0b15afb..7330472596 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -1155,7 +1155,6 @@ std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.inv/invok std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.inv/invoke.pass.cpp:1 FAIL std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp:0 FAIL std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp:1 FAIL -std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared.array.unbounded.pass.cpp FAIL std/utilities/meta/meta.logical/conjunction.compile.pass.cpp FAIL std/utilities/meta/meta.logical/disjunction.compile.pass.cpp FAIL std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_assignable.pass.cpp:0 FAIL