Template based binary tree class implimented in c++