[Boost-bugs] [Boost C++ Libraries] #13270: BOOST_CLASS_EXPORT(some_template<>) fails to load pointers

Subject: [Boost-bugs] [Boost C++ Libraries] #13270: BOOST_CLASS_EXPORT(some_template<>) fails to load pointers
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-10-23 09:13:31


#13270: BOOST_CLASS_EXPORT(some_template<>) fails to load pointers
--------------------------------------+---------------------------
 Reporter: Hajo Kirchhoff <boost@…> | Owner: Robert Ramey
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: serialization
  Version: Boost 1.65.0 | Severity: Regression
 Keywords: |
--------------------------------------+---------------------------
 After upgrading from 1.56.0 to 1.65.1 loading pointers with xml_warchive
 to a template with default template arguments no longer works.
 {{{
  BOOST_EXPORT_CLASS(some_template<>)

  ptr *some_base_class;
  ar & make_nvp("ptr", ptr);
 }}}
 Saving works okay, loading fails => the type cannot be found.
 The problem seems to be related to the <> characters in the default
 template argument of the BOOST_CLASS_EXPORT. Debugging the serialization
 code I see that the serialization internal key[] now reads
 `some_template&lt<>`. Note the "&lt" and the "<" character. I haven't
 checked 1.56.0, but my guess is that it was probably
 `some_template&lt&gt`.

 At any rate, having `&lt<` is definitely wrong, as &lt is, of course,
 escaped <.

 Changing BOOST_CLASS_EXPORT to BOOST_CLASS_EXPORT_GUID and specifying the
 correct key seems to work okay.

-- 
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13270>
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-10-23 09:19:34 UTC