[Boost-bugs] [Boost C++ Libraries] #4370: [Serialization] map with private default constructor does not compile

Subject: [Boost-bugs] [Boost C++ Libraries] #4370: [Serialization] map with private default constructor does not compile
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-06-23 23:46:58


#4370: [Serialization] map with private default constructor does not compile
--------------------------+-------------------------------------------------
 Reporter: anonymous | Owner: ramey
     Type: Bugs | Status: new
Milestone: Boost 1.44.0 | Component: serialization
  Version: Boost 1.40.0 | Severity: Problem
 Keywords: |
--------------------------+-------------------------------------------------
 I believe that collections_load_impl.hpp is somewhat incorrect in its
 implementation of loading for maps. The creation of the value_type of the
 map on the stack results in a call to the default std::pair constructor
 which will fail if the keys or the values do not have a public default
 constructor. Note that this problem is specific to maps and does not show
 in sequential containers.

 In the case of nondefault constructible key/value the default constructor
 of the pair cannot be used.

 Problem appears on Ubuntu with gcc 4.4.3 and the default (for Ubuntu)
 boost version 1.40. I do not have a compiled copy of boost 1.43, but it
 seems that the code is still the same. There was also no mention of the
 issue as being fixed in the recent changes to the Serialization library
 since 1.40.

 A simple file to reproduce the problem is attached.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4370>
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:03 UTC