A persistent binary search tree in C++