mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-24 19:40:45 +08:00
we also had to overload the placement new... issue uncovered by Tim when
doing QVector<Vector3d>...
This commit is contained in:
parent
215ce5bdc1
commit
9dcde48980
@ -141,11 +141,21 @@ class Matrix
|
||||
return ei_aligned_malloc<ByteAlignedAsNeeded>(size);
|
||||
}
|
||||
|
||||
void *operator new(size_t, Matrix *ptr) throw()
|
||||
{
|
||||
return static_cast<void*>(ptr);
|
||||
}
|
||||
|
||||
void *operator new[](size_t size) throw()
|
||||
{
|
||||
return ei_aligned_malloc<ByteAlignedAsNeeded>(size);
|
||||
}
|
||||
|
||||
void *operator new[](size_t, Matrix *ptr) throw()
|
||||
{
|
||||
return static_cast<void*>(ptr);
|
||||
}
|
||||
|
||||
void operator delete(void * ptr) { ei_aligned_free(static_cast<ByteAlignedAsNeeded *>(ptr), 0); }
|
||||
void operator delete[](void * ptr) { ei_aligned_free(static_cast<ByteAlignedAsNeeded *>(ptr), 0); }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user