Template for a red-black tree