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 を作成できないのはなぜですか?