We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
template <class _Moveit> _Nodeptr _Copy_nodes(_Nodeptr _Rootnode, _Nodeptr _Wherenode, _Moveit _Movefl) { // copy entire subtree, recursively const auto _Scary = _Get_scary(); _Nodeptr _Newroot = _Scary->_Myhead; // point at nil node if (!_Rootnode->_Isnil) { // copy or move a node, then any subtrees bool_constant<is_same_v<key_type, value_type>> _Is_set; _Nodeptr _Pnode = _Copy_or_move(_Rootnode->_Myval, _Movefl, _Is_set); _Pnode->_Parent = _Wherenode; _Pnode->_Color = _Rootnode->_Color; if (_Newroot->_Isnil) { _Newroot = _Pnode; // memorize new root } _TRY_BEGIN _Pnode->_Left = _Copy_nodes(_Rootnode->_Left, _Pnode, _Movefl); _Pnode->_Right = _Copy_nodes(_Rootnode->_Right, _Pnode, _Movefl); _CATCH_ALL _Scary->_Erase_tree_and_orphan(_Getal(), _Newroot); // subtree copy failed, bail out _RERAISE; _CATCH_END } return _Newroot; // return newly constructed tree }
In function _Copy_nodes which is applied to copy a tree, _Newroot->_Isnil is always true, but here:
_Copy_nodes
_Newroot->_Isnil
if (_Newroot->_Isnil) { _Newroot = _Pnode; // memorize new root }
why still determine if it is nil?
The text was updated successfully, but these errors were encountered:
We'll need to look into this and get back to you with an answer - thanks for bringing this to our attention.
Sorry, something went wrong.
<xtree>
Successfully merging a pull request may close this issue.
In function
_Copy_nodes
which is applied to copy a tree,_Newroot->_Isnil
is always true, but here:why still determine if it is nil?
The text was updated successfully, but these errors were encountered: