Circular dependencies in c++