diff options
Diffstat (limited to 'libcxx/include/experimental/dynarray')
-rw-r--r-- | libcxx/include/experimental/dynarray | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libcxx/include/experimental/dynarray b/libcxx/include/experimental/dynarray index a60c87c3f97..e2bfa2e437b 100644 --- a/libcxx/include/experimental/dynarray +++ b/libcxx/include/experimental/dynarray @@ -145,8 +145,8 @@ private: } static inline _LIBCPP_INLINE_VISIBILITY - void __deallocate_value(value_type* __ptr ) noexcept { - _VSTD::__libcpp_deallocate(static_cast<void *>(__ptr), __alignof(value_type)); + void __deallocate_value(value_type* __ptr, size_t __count) noexcept { + _VSTD::__libcpp_deallocate(static_cast<void *>(__ptr), sizeof(value_type) * __count, __alignof(value_type)); } public: @@ -266,7 +266,7 @@ dynarray<_Tp>::~dynarray() value_type *__data = data () + __size_; for ( size_t i = 0; i < __size_; ++i ) (--__data)->value_type::~value_type(); - __deallocate_value( __base_ ); + __deallocate_value(__base_, __size_); } template <class _Tp> |