https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110057
--- Comment #23 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #14) > So something like this, and then use it in containers instead of > _Alloc_traits::destroy > > template<typename _Tp, typename _Allocator> > _GLIBCXX20_CONSTEXPR > void > _Destroy_static_type(_Tp* __p, _Allocator& __alloc) > { > #if __cplusplus >= 201103L > if constexpr (__allocator_traits_base::__has_destroy<_Allocator, _Tp>) > allocator_traits<_Allocator>::destroy(__alloc, __p); > else > #endif > __p->_Tp::~_Tp(); > } Patch posted: https://gcc.gnu.org/pipermail/gcc-patches/2024-October/664288.html