C++ implementation of a red-black tree