This commit is contained in:
Gerhard Stein
2013-11-28 20:58:47 +01:00
parent 819059ac5a
commit b66dd5d0a4

View File

@@ -36,12 +36,12 @@ template<class T> struct addressof_impl
{ {
static inline T * f( T & v, long ) static inline T * f( T & v, long )
{ {
- T *ptr; T *ptr;
-/* return reinterpret_cast<T*>( /* return reinterpret_cast<T*>(
- &const_cast<char&>(reinterpret_cast<const volatile char &>(v)));*/ &const_cast<char&>(reinterpret_cast<const volatile char &>(v)));*/
- ptr = (T*)(&v); ptr = (T*)(&v);
-// memcpy(&ptr, &v, sizeof(T*)); // memcpy(&ptr, &v, sizeof(T*));
- return ptr; } return ptr; }
static inline T * f( T * v, int ) static inline T * f( T * v, int )
{ {