[committed] libstdc++: Use std::_Destroy in std::stacktrace
Checks
Commit Message
This benefits from the optimizations in std::_Destroy which avoid doing
any work when using std::allocator.
libstdc++-v3/ChangeLog:
* include/std/stacktrace (basic_stacktrace::_M_impl::_M_resize):
Use std::_Destroy to destroy removed elements.
---
Tested x86_64-linux. Pushed to trunk.
libstdc++-v3/include/std/stacktrace | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
@@ -601,8 +601,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
void
_M_resize(size_type __n, allocator_type& __alloc) noexcept
{
- for (size_type __i = __n; __i < _M_size; ++__i)
- _AllocTraits::destroy(__alloc, &_M_frames[__i]);
+ std::_Destroy(_M_frames + __n, _M_frames + _M_size, __alloc);
_M_size = __n;
}