libstdc++
GNU C++ library
Loading...
Searching...
No Matches

◆ _M_destroy_node()

template<typename _Tp, typename _Alloc>
void std::_List_base< _Tp, _Alloc >::_M_destroy_node ( _Node_ptr __p)
inlineprotectedinherited

Definition at line 839 of file stl_list.h.

840 {
841 // Destroy the element
842#if __cplusplus < 201103L
843 _Tp_alloc_type(_M_impl).destroy(__p->_M_valptr());
844#else
846 // Only destroy the node if the pointers require it.
847 using _Node = typename _Node_traits::_Node;
849#pragma GCC diagnostic push
850#pragma GCC diagnostic ignored "-Wc++17-extensions" // if constexpr
852 __p->~_Node();
853#pragma GCC diagnostic pop
854#endif
855 this->_M_put_node(__p);
856 }
void _M_put_node(_Node_ptr __p) noexcept
Definition stl_list.h:817
_List_impl _M_impl
Definition stl_list.h:794
__gnu_cxx::__alloc_traits< _Alloc >::template rebind< _Tp >::other _Tp_alloc_type
Definition stl_list.h:752
See bits/stl_deque.h's _Deque_base for an explanation.
Definition stl_list.h:749
static constexpr std::__enable_if_t< __is_custom_pointer< _Ptr >::value > destroy(_Node_alloc_type &__a, _Ptr __p) noexcept(noexcept(_Base_type::destroy(__a, std::__to_address(__p))))

References _M_impl, _M_put_node(), and __gnu_cxx::__alloc_traits< _Node_alloc_type >::destroy().

Referenced by _M_clear().

Here is the call graph for this function:
Here is the caller graph for this function: