use <memory> for replacement new

This commit is contained in:
ejcoumans 2007-06-16 00:24:28 +00:00
parent 65d10d7b12
commit ca1c42f07f

View File

@ -24,12 +24,18 @@ subject to the following restrictions:
///then the btAlignedObjectArray doesn't support objects with virtual methods, and non-trivial constructors/destructors
///see discussion here: http://continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=1231
#define USE_NEW_INPLACE_NEW 1
#ifdef USE_NEW_INPLACE_NEW
#include <new.h> //in-place new
#include <string.h> //memcpy
#include <memory> //for replacement new
#ifndef WIN32
#include <string.h>//for memcpy
#endif
#endif //USE_NEW_INPLACE_NEW
///btAlignedObjectArray uses a subset of the stl::vector interface for its methods
///It is developed to replace stl::vector to avoid STL alignment issues to add SIMD/SSE data
template <typename T>
@ -168,7 +174,7 @@ class btAlignedObjectArray
}
SIMD_FORCE_INLINE T& expand( T& fillValue=T())
SIMD_FORCE_INLINE T& expand( const T& fillValue=T())
{
int sz = size();
if( sz == capacity() )