We recently started learning about binary search trees. We created one of our own using integers as our Key/Data. It's easy to achieve the BST property using an int key, but what happens when we template our tree? How do we achieve our BST property with say a char, string or foo? - These don't seem fitting for keys. Do we simply keep an int on our node and use that as our Key instead of our T data? Or, am I completely misunderstanding this concept all together?
In the following code example, the coder implements a template binary search tree, and he is using T as his key. He proceeds to run comparisons between T when inserting, etc. But what happens when T has no overload for comparison operators? This code falls apart correct?