An implementation of 2d_tree in C++