Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2005-11-22 00:04:20


I would guess that you're probably doing something like

ar << t

where t is a non-const somewhere in your program. And that
this is where the error shows up. Double check your program
and read the "Rationale" section of the manual regarding
the saving of non-const types to archives.

Robert Ramey

  "William Kemper" <wkemper_at_[hidden]> wrote in message news:200511220115.jAM1FMbN030078_at_bob.coplanar.net...
  In 1.33.0 split_member uses:

   

      template<class Archive, class T>

      struct member_saver {

          static void invoke(

              Archive & ar,

              const T & t,

              const unsigned int file_version

          ){

              access::member_save(ar, t, file_version);

          }

      };

   

  And member_save looks like:

   

      template<class Archive, class T>

      static void member_save(

          Archive & ar,

          //const T & t,

          T & t,

          const unsigned int file_version

      ){

          t.save(ar, file_version);

      }

   

  So the compiler complains about converting a const T to a non const T. It's curious that the source has the const T& in member_save commented out. Is there a workaround for this? Or is it planned to be fixed in the next release?

   

   

   

------------------------------------------------------------------------------

  _______________________________________________
  Boost-users mailing list
  Boost-users_at_[hidden]
  http://lists.boost.org/mailman/listinfo.cgi/boost-users



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net