Hi,

among the support facilities required by C++0x there is:

//////////////////

20.9.9.1 addressof [specialized.addressof]

template <class T> T* addressof(T& r);

1 Returns: the actual address of the object or function referenced by r,
even in the presence of an
overloaded operator&.

Throws: nothing.

//////////////////

the only implementation I briefly skimmed, part of boost, involves an
ugly series of reinterpret_cast, which, by the way, I'm not even sure is
completely safe vs aliasing, in all the possible circumstances. Thus,
I'm wondering if we want a "builtin" facility in the C++ front-end for
this too, additionally to those strictly required for implementing
<type_traits>, or maybe we can put to use existing gcc extensions...

Again, directions / help welcome (at least this time the ABI is safe ;)

Thanks in advance,
Paolo.

Reply via email to