hello, while I was using msvc I could use a referance and actual object interchangably however when I switch to g++ 4x, I start getting no match for ... kind of errors, here is a stuation
ImageDataPtr& operator= (ImageDataPtr& p) {
if(ptr != p.ptr) {
dispose();
ptr = p.getPtr();
count = p.getCount();
++*count;
}
return *this;
}
ImageDataPtr copyImage(ImageData* bitmap, Vec4 box);
ImageDataPtr lenaImgPtr(c.decode(lena));
/* this line cause a no match error because copyImage returns ImgDataPtr
* however, there is only one "=" operator in ImgDataPtr which takes ImgDataPtr&
*/
lenaImgPtr = c.copyImage(lenaImgPtr.getPtr(), Vec4(0,0,400,400));
this kind of usage was valid for mscv and seems correct to me as well :) saves me from writing same thing