, ( ) CPP B, :
class A
{
};
class A;
class B
{
public:
~B();
SmartPointer<A> Ptr;
};
#include "Header2.h"
#include "Header1.h"
B::~B() = default;
, , , SmartPointer , B, ~ B, . , Header2.h, , . Header2.cpp Header2.h, , , Header2.cpp, . , Header1.cpp, , ~ B . ~ B , .
In certain circumstances, you may need to go to cpp, as well as to the assignment operator (s) B and / or, for some inexplicable reason, even the constructor.
source
share