Re: [Boost-bugs] [Boost C++ Libraries] #9990: boost deserialization of std::map does not work correctly

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9990: boost deserialization of std::map does not work correctly
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-07-01 17:33:06


#9990: boost deserialization of std::map does not work correctly
-------------------------------+---------------------------
  Reporter: geeksia1@… | Owner: ramey
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: serialization
   Version: Boost 1.54.0 | Severity: Showstopper
Resolution: | Keywords:
-------------------------------+---------------------------

Comment (by ramey):

 I question the correctness of your function

 {{{
 void compare_data(std::map<std::string,boost::shared_ptr<A>>
 e1,std::map<std::string,boost::shared_ptr<A>> e2) {
 }}}

 I believe that you might be comparing shared_ptr rather than the things
 the pointer are pointing to.

 try replacing

 {{{
 BOOST_CHECK(e1_i1->second == e2_i1->second);
 }}}

 with

 {{{
 BOOST_CHECK ( * e1_i1->second == * e2_i1->second);
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9990#comment:1>
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:16 UTC