You actually have a slightly tougher problem, as class A has a member
function that takes a B "by value" and class B has a member function
that takes an A "by value". C++ requires that you can pass a pointer to
an incomplete type, as all struct/class pointers use a compatible
representation. Passing an object by value requires the use of the class
copy constructor, and more detailed knowledge of the class, so it can't
be done with a "forward" declaration.
This presents a fundamental issue with your design, as you now need a
full definition of B to define A, and a full definition of A to define
B, so neither can be defined. You need to break the cycle. Options include:
1) Change at least one of the pass by values with a pass by reference
(or const reference) to break the cycle, the one(s) using reference can
use a forward declare.
2) One or more of the member functions can be converted into free
functions and moved to a new header (or the classes moved to a new
header). The class headers no longer have the circular dependency, and
the headers with the free functions can include both class headers.