Another boost fix

This commit is contained in:
Gerhard Stein
2014-10-12 15:00:21 +02:00
parent 93aebbb89a
commit c0199b9287
3 changed files with 7 additions and 5 deletions

View File

@@ -601,7 +601,7 @@ namespace boost { namespace property_tree { namespace detail {namespace rapidxml
char *pool = align(raw_memory);
header *new_header;
memcpy( (void*) new_header, (void*)pool,sizeof(header*));
memcpy( (void*) (&new_header), (void*) (&pool), sizeof(header*));
//header *new_header = reinterpret_cast<header *>(pool);
new_header->previous_begin = m_begin;

View File

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