我正在尝试编写 IplImage 包装器。
这是我的代码:
class DrawingDetector
{
public:
typedef boost::shared_ptr<IplImage> ipl_image_ptr_t;
DrawingDetector(){}
DrawingDetector::DrawingDetector(IplImage* img) : m_image(img, ipl_deleter){}
private:
static void ipl_deleter( IplImage* ipl_img )
{
if( ipl_img )
{
cvReleaseImage( &ipl_img );
}
}
ipl_image_ptr_t m_image; // compiler error "field ‘m_image’ has incomplete type"
};
我有以下编译错误“字段'm_image'的类型不完整”。我的编译器是 gcc 4.4。
为什么我不能创建一个空的 shared_ptr?