Since the down of time mankind seek the solution to the circular dependencies in C++. Well - may be ot exactly since the "down of time" and definitly not the whole of the mankind - but it have been "always" a problem.
Traditional solution was to forward-declarate it:
However it have its limitations. For example B cannot call A methods making such solutions useless. Other solution is spliting functions and class declaration - however it may cause problems if they will not match (for example some functions remain undefined):
There is solution, at least working on gcc 4.4. Let's define B as a template:
Probably we consider writing each time ]]> waste of space. We can simply forward-declare class and set the default arguments: