[C++-sig] Getting address of wrapped instance?

Stefan Seefeld seefeld at sympatico.ca
Mon Dec 8 17:42:53 CET 2008


Hans Meine wrote:
> How about adding an id() method (returning this) to the C++ class and
> exporting that?
>   

Well, this 'id' isn't really a property of the wrapped type / object, 
but the wrapper. So, I think there is little sense in adding such a 
tautological 'id' function to the class itself. A free-standing

type const *id(type const *t) { return t;}

function would be more clean, IMO.

my 2 cents,

       Stefan

-- 

      ...ich hab' noch einen Koffer in Berlin...



More information about the Cplusplus-sig mailing list