jjzjj

AnotherFoo

全部标签

c++ - Pimpl Idiom 的嵌套名称说明符中使用的不完整类型

我有以下代码的错误incompletetype‘Foo::Pimpl’usedinnestednamespecifier另一个Foo.hppstructAnotherFoo{voidmethodAnotherFoo(Foo&);};另一个Foo.cpp#include"Foo.hpp"#include"AnotherFoo.hpp"voidAnotherFoo::methodAnotherFoo(Foo&foo){//hereiwanttosavethefunctionpointerofmethodPimpl(),std::functionforex:std::functionfn=s