Re: [Boost-bugs] [Boost C++ Libraries] #4044: reset_object_address with library-created objects

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4044: reset_object_address with library-created objects
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-03-26 23:31:20


#4044: reset_object_address with library-created objects
-------------------------------------------------+--------------------------
 Reporter: Richard Hazlewood | Owner: ramey
     Type: Bugs | Status: new
Milestone: Boost 1.43.0 | Component: serialization
  Version: Boost 1.42.0 | Severity: Problem
 Keywords: reset_object_address heap allocated |
-------------------------------------------------+--------------------------

Comment(by ramey):

 I'm still not getting it. Doesn't this work?

 {{{
 template<class Archive>
 void serialize(Archive &ar, boost::function<Signature> & f, const unsigned
 int version){
   // ar & any member variables here.
 }
 class Whatever
 {
   typedef boost::function<Signature> Func;

   Func m_func;

   ///

   template <typename A>
   void serialize(A &a, const unsigned)
   {
      a & m_func;
   }
 };

 }}}

 reset_object_address has only turned out to be necessary in the most
 rarest of cases. If you think you really need it, you might be missing
 something simpler.

 Robert Ramey

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4044#comment:3>
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:02 UTC