[#BloombergLP-bslalg-RbTreeUtil-moveTree] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/RbTreeUtil.adoc[RbTreeUtil]::moveTree :relfileprefix: ../../../ :mrdocs: Load into the specified `result`, using the specified `nodeFactory` to create and delete nodes, a collection of newly created nodes with the same (red‐black) tree structure as that of the specified `original` tree, which uses the specified `originalNodeFactory` to create and delete nodes, where the `value` attribute of each node in `result` is constructed from explicitly moving the `value` attribute of the corresponding node in `original`. `original` is left in a valid but unspecified state. If an exception occurs, both `result` and `original` are left in a valid but unspecified state. The behavior is undefined unless `result` is an empty tree, `original` is well‐formed (see `isWellFormed`), and `nodeFactory‐>deleteNode` and `originalNodeFactory‐>deleteNode` do not throw. == Synopsis Declared in `<bslalg_rbtreeutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class FACTORY> static void moveTree( xref:BloombergLP/bslalg/RbTreeAnchor.adoc[RbTreeAnchor]* result, xref:BloombergLP/bslalg/RbTreeAnchor.adoc[RbTreeAnchor]* original, FACTORY* nodeFactory, FACTORY* originalNodeFactory); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#