[#BloombergLP-bslalg-RbTreeUtil-rotateRight] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/RbTreeUtil.adoc[RbTreeUtil]::rotateRight :relfileprefix: ../../../ :mrdocs: Perform clockwise rotation on the specified `node`: Rotate the node's left child (the pivot) to be the node's parent, and attach the pivot's right child as the node's left child. ` (node) (pivot) / / . (pivot) c ‐‐‐> a (node) / / . a b b c ` The behavior is undefined unless `node‐>leftChild()` is not 0, `node‐>parent()` is not 0, and node's parent refers to `node` as one of its children. Note that this operation maintains the ordering of the subtree rooted at `node`. Also note this operation will successfully rotate the root node of an unbalanced, but otherwise well‐formed, tree referred to by a `RbTreeAnchor` object (see `isWellFormed`) because the parent of the root node is the tree's sentinel node (i.e., not 0), which refers to the root node as its left child, and an `RbTreeAnchor` object returns the left child of the sentinel node as the root of the tree. == Synopsis Declared in `<bslalg_rbtreeutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static void rotateRight(xref:BloombergLP/bslalg/RbTreeNode.adoc[RbTreeNode]* node); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#