![]() Registered Member ![]()
|
I was trying out the new Boost 1.56 beta for serialization of Eigen Matices but it to compile complaining about missing matching delete ( void*, size_t ) operator
There is also the following note in the file /boost/archive/detail/iserializer.hpp(237) which says: (Github Link) // if compilation fails here, the likely cause that the class // T has a class specific new operator but no class specific // delete operator which matches the following signature. Fix // your program to have this. Note that adding operator delete // with only one parameter doesn't seem correct to me since // the standard(3.7.4.2) says " // "If a class T has a member deallocation function named // 'operator delete' with exactly one parameter, then that function // is a usual (non-placement) deallocation function" which I take // to mean that it will call the destructor of type T which we don't // want to do here. I suspect this is because of use of EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF. Code to reproduce the error is as following:
The error in Visual studio 2013 says: boost/archive/detail/iserializer.hpp(237): error C2665: 'Eigen::PlainObjectBase<Eigen::Matrix<double,3,1,0,3,1>>::operator delete' : none of the 3 overloads could convert all the argument types 2> c:\users\abhijit\codes\installs\eigen\eigen-install\include\eigen3\eigen\src/Core/PlainObjectBase.h(132): could be 'void Eigen::PlainObjectBase<Eigen::Matrix<double,3,1,0,3,1>>::operator delete(void *,const std::nothrow_t &) throw()' 2> c:\users\abhijit\codes\installs\eigen\eigen-install\include\eigen3\eigen\src/Core/PlainObjectBase.h(132): or 'void Eigen::PlainObjectBase<Eigen::Matrix<double,3,1,0,3,1>>::operator delete(void *,void *) throw()' 2> while trying to match the argument list '(VectorType *, size_t)' 2> C:\Boost\boost-1_56_0_b1\boost/archive/detail/iserializer.hpp(224) : while compiling class template member function 'void boost::archive::detail::heap_allocation<T>::has_new_operator::invoke_delete(T *)' Is this is a bug on Eigen's part? Although the above works with previous versions of Boost. |
![]() Moderator ![]()
|
Fixed:
https://bitbucket.org/eigen/eigen/commits/d336163ce058/ Changeset: d336163ce058 User: ggael Date: 2014-07-30 09:32:35 Summary: add missing delete operator overloads |
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]