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

◆ _M_extract()

template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc = allocator<_Val>>
_Base_ptr std::_Rb_tree< _Key, _Val, _KeyOfValue, _Compare, _Alloc >::_Reuse_or_alloc_node::_M_extract ( )
inlineprivate

Definition at line 1088 of file stl_tree.h.

1089 {
1090 if (!_M_nodes)
1091 return _M_nodes;
1092
1094 _M_nodes = _M_nodes->_M_parent;
1095 if (_M_nodes)
1096 {
1097 if (_M_nodes->_M_right == __node)
1098 {
1099 _M_nodes->_M_right = _Base_ptr();
1100
1101 if (_M_nodes->_M_left)
1102 {
1103 _M_nodes = _M_nodes->_M_left;
1104
1105 while (_M_nodes->_M_right)
1106 _M_nodes = _M_nodes->_M_right;
1107
1108 if (_M_nodes->_M_left)
1109 _M_nodes = _M_nodes->_M_left;
1110 }
1111 }
1112 else // __node is on the left.
1113 _M_nodes->_M_left = _Base_ptr();
1114 }
1115 else
1116 _M_root = _Base_ptr();
1117
1118 return __node;
1119 }
_Node_traits::_Base_ptr _Base_ptr
Definition stl_tree.h:1038

References _M_nodes, and _M_root.

Referenced by operator()().

Here is the caller graph for this function: