Boost Updates for Android

This commit is contained in:
Gerhard Stein
2013-11-28 20:57:27 +01:00
parent 9775bfd41f
commit 819059ac5a
2 changed files with 12 additions and 4 deletions

View File

@@ -16,6 +16,10 @@
#include <cstdlib> // For std::size_t
#include <new> // For placement new
#ifdef ANDROID
#include <android/log.h>
#endif
// On MSVC, disable "conditional expression is constant" warning (level 4).
// This warning is almost impossible to avoid with certain types of templated code
#ifdef _MSC_VER
@@ -599,7 +603,8 @@ namespace boost { namespace property_tree { namespace detail {namespace rapidxml
// Setup new pool in allocated memory
char *pool = align(raw_memory);
header *new_header = reinterpret_cast<header *>(pool);
//header *new_header = reinterpret_cast<header *>(pool);
header *new_header = (header *)((void*)pool);
new_header->previous_begin = m_begin;
m_begin = raw_memory;
m_ptr = pool + sizeof(header);

View File

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