[Insight-developers] Style question -- is &* as confusing to everyone else as it is to me?

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Thu Jun 30 12:00:16 EDT 2011


Le 30 juin 11 à 17:10, Williams, Norman K a écrit :

> I ran into this in cleaning up the FEM stuff:
>
>
> In many places in ITK, the notation
>
> &*ASmartPointer
>
> is used in preference to
>
> SmartPointer.GetPointer()
>
> This seems like an over-concise obfuscation to me, and something  
> likely to
> confuse people new to smart pointers. 'Take the address of what's  
> pointed
> to by this pointer' is what most people would see at first, and it  
> depends
> on overloading: overloading that's hidden deep somewhere in included
> headers.
>
> I'd like to get rid of them all, but not without consulting you lot.
> WHO'S WITH ME?


Sounds like a good idea.

I'm not even sure this notation or the .GetPointer() are required in  
many places.
Excepted while casting, just using the smart pointer should be fine.

Gaëtan



-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://mima2.jouy.inra.fr  http://www.itk.org
http://www.bepo.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: Ceci est une signature ?lectronique PGP
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20110630/dc91ca27/attachment.pgp>


More information about the Insight-developers mailing list