AK
Size: a a a
AK
AS
AS
AK
AS
AK
AS
A
struct A{};
b.hpp:#include <memory>b.cpp:
struct A;
struct B {
~B();
std::unique_ptr<A> a;
};
#include "a.hpp"B::~B() {}
main.cpp:#include "b.hpp"Получаю ошибку удаления incomplete type
int main(){
B b;
return 0;
}
A в main.cpp. КАК??? Почему?SE
struct A{};
b.hpp:#include <memory>b.cpp:
struct A;
struct B {
~B();
std::unique_ptr<A> a;
};
#include "a.hpp"B::~B() {}
main.cpp:#include "b.hpp"Получаю ошибку удаления incomplete type
int main(){
B b;
return 0;
}
A в main.cpp. КАК??? Почему?AK
AK
AK
#include "a.hpp" надоA
AK
AK