Круговая зависимость C ++ в заголовочных файлах

Можно ли избежать циклической зависимости в следующих заголовочных файлах?без поворотный элемент данныхb1 вкласс А на указатель / ссылку, ибез ослабление требования встроенной функции вкласс B?

хиджры:

#ifndef A_H
#define A_H
#include <B.h> // Required, as data member b1 is not a pointer/reference

class A {
    public:
        B b1; // I want to keep this as as it is.
        int m_a;
};

#endif

B.h:

#ifndef B_H
#define B_H
#include <A.h> // Required, as f() calls a member function of class A

class B {
    public:
       int f(A &a){return a.m_a;} // I want this to be an inline function.
};

#endif

... и скажем, main.ccp это:

#include <iostream>
#include <A.h>
#include <B.h>

int main() {
    A a;
    B b;

    std::cout << "Calling b.f(a): " << b.f(a) << std::endl;

    return 0;
}

Ответы на вопрос(1)

Ваш ответ на вопрос