I have this architecture: (simplified)
class A {
container<B*> c
}
class B {
A* owner
}
These classes are in different header files, and with this architecture I have to include:
Aaaand I got circular dependency. I could solve this with forward declaration, but I want to solve the design problem. (if it's possible.)
How could the B-s in A's container access A without forward declaration?
Or is forward declaration the only way?
Use forward declaration. That limits you tby avoiding access to class members in inline functions (in header), but that works with pointers well.
Use template design
Use shared base class that got all interfaces you would need.