I can't seem to google the answer. For example, parity is the word for odd or even. Because of the repeated patterns for all the left and right actions in binary trees, I want to use a template argument to generalize all the left and right actions and essentially cut the code into half. I'm using enum LR {Left, Right}; for now, but what is the proper word?
And while we are here, the following is the only way I can think of to get started. Is there a better/cleaner way than this, keeping in mind that Node is an inner class of the template class BinaryTree<T, Comparator>?
So now node->child<Left>() is node->left and node->child<Right>() is node->right,
and node->otherChild<Left>() is node->right and node->otherChild<Right>() is node->left, where
I think 'Side' is good enough. Or you could just use a bool named 'rightness' and then define const bool right_side = true and const bool left_side = false.
"Sidedness" and "laterality" could conceivably be used also, but they refer to a general preference for one side over the other, rather than to a definite choice.
Regarding my second question, I've thought of a slightly cleaner implementation (and using the name 'Side' now), using overload instead of a meta-function: