[Insight-developers] Returning a smart pointer or a pointer?
Hauke Heibel
heibel at cs.tum.edu
Tue May 20 04:02:31 EDT 2008
Hi Luis and Tom,
How about deprecated warnings? I have a small sample which worked with
gcc 3.4.4, VS cl.exe 14.00 and Intel C++ compiler 9.1. I admit that
there might be problems with other compilers since I am not sure if that
declspec belongs to the standard. I saw that there also exists a
deprecated attribute
(http://gcc.gnu.org/onlinedocs/gcc-3.3.1/gcc/Function-Attributes.html#Function%20Attributes).
Regards,
Hauke
Here is the sample:
----------------------------
class Foo
{
public:
__declspec(deprecated) void GetDeformationFieldRawPointer(){}
};
int main(int argc, char*argv[])
{
Foo f;
f.GetDeformationFieldRawPointer();
return 0;
}
----------------------------
Tom Vercauteren wrote:
> Hi Luis,
>
> Thanks for the changes!
>
> As far as encouraging people to use the raw pointer function, I don't
> see a better solution than documenting it as you did.
>
> Tom
--
Tim Hauke Heibel
Computer Aided Medical Procedures (CAMP)
fon: +49 89 289 19427
fax: +49 89 289 17059
More information about the Insight-developers
mailing list