Lines Matching refs:__z
330 // Precondition: __z == __root or == a direct or indirect child of __root.
331 // Effects: unlinks __z from the tree rooted at __root, rebalancing as needed.
333 // nor any of its children refer to __z. end_node->__left_
336 _LIBCPP_HIDE_FROM_ABI void __tree_remove(_NodePtr __root, _NodePtr __z) _NOEXCEPT {
338 _LIBCPP_ASSERT_INTERNAL(__z != nullptr, "The node to remove should not be null");
340 // __z will be removed from the tree. Client still needs to destruct/deallocate it
341 // __y is either __z, or if __z has two children, __tree_next(__z).
344 …_NodePtr __y = (__z->__left_ == nullptr || __z->__right_ == nullptr) ? __z : std::__tree_next(__z);
364 // If we didn't remove __z, do so now by splicing in __y for __z,
365 // but copy __z's color. This does not impact __x or __w.
366 if (__y != __z) {
367 // __z->__left_ != nulptr but __z->__right_ might == __x == nullptr
368 __y->__parent_ = __z->__parent_;
369 if (std::__tree_is_left_child(__z))
373 __y->__left_ = __z->__left_;
375 __y->__right_ = __z->__right_;
378 __y->__is_black_ = __z->__is_black_;
379 if (__root == __z)