Hi i have a problem, I try to do the follow, class A depends on class B and vice versa like this
class A;
class B{
A foo;
friend B A::doSomething();
};
class A {
B bar;
B doSomething;
};
The friend declartion does not work because A is an incomplete declartion. Is there any way to avoid this? (Swapp classes declaration order is not a solution I did not want to construct a more complicated example where swapping does not work anymore)