Re: [Boost-bugs] [Boost C++ Libraries] #11520: pointer_iserializer requires operator delete(void*, size_t) for classes that have a specific operator new

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11520: pointer_iserializer requires operator delete(void*, size_t) for classes that have a specific operator new
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-03-06 08:03:41


#11520: pointer_iserializer requires operator delete(void*, size_t) for classes
that have a specific operator new
----------------------------------------------+---------------------------
  Reporter: Fabian Kislat <fabian.kislat@…> | Owner: ramey
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: serialization
   Version: Boost 1.56.0 | Severity: Problem
Resolution: fixed | Keywords:
----------------------------------------------+---------------------------

Comment (by kartikmohta@…):

 This also fails in the case when a class has both the operators defined. A
 simple example:
 {{{
 #include <boost/archive/text_iarchive.hpp>
 #include <boost/serialization/export.hpp>

 class TestClass
 {
  public:
   void* operator new(size_t size) { return ::operator new(size); }
   void operator delete(void * ptr) { return ::operator delete(ptr); }
   void operator delete(void *ptr, size_t /*size*/) { return ::operator
 delete(ptr); }

   template <class Archive>
   void serialize(Archive & /* ar */, const unsigned int /* version */)
   {
   }
 };

 BOOST_CLASS_EXPORT_IMPLEMENT(TestClass);

 int main()
 {
   return 0;
 }
 }}}
 Don't have a solution for this, but just making a note here in case
 someone can solve the issue.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11520#comment:6>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC