aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-01-05 19:49:07 +0000
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-01-05 19:49:07 +0000
commit9dcde48980f2c80462bf9da7a2af90480aebf14a (patch)
tree0a6a1d788c0c79e6c67a5eda45255b917bf263ab /Eigen
parent215ce5bdc120dc27fe003817538fce6bb78f701a (diff)
we also had to overload the placement new... issue uncovered by Tim when
doing QVector<Vector3d>...
Diffstat (limited to 'Eigen')
-rw-r--r--Eigen/src/Core/Matrix.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h
index bfff6cc4c..80897c48a 100644
--- a/Eigen/src/Core/Matrix.h
+++ b/Eigen/src/Core/Matrix.h
@@ -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); }