[Boost-bugs] [ boost-Bugs-1250901 ] polymorphic i/o archives and stl containers problem

Bugs item #1250901, was opened at 2005-08-03 02:44 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1250901&group_id=7586 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: serialization Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Robert Ramey (ramey) Summary: polymorphic i/o archives and stl containers problem Initial Comment: Hello, i downloaded 1.33.0 RC1 from http://www.osl.iu.edu/~dgregor/boost-1.33.0/ and tried to recompile some rather large projects with it (currently using 1.32.0). Using MS VC 7.1 and GCC 3.4.4 Doesnt work for boost::serialization: boost::archive::polymorphic_iarchive& ar boost::archive::polymorphic_oarchive& ar It bumps on STL containers now: boost\serialization\collections_load_imp.hpp(118) : error C2039: 'reset_object_address' : is not a member of 'boost::archive::polymorphic_iarchive' boost\archive\polymorphic_iarchive.hpp(52) : see declaration of 'boost::archive::polymorphic_iarchive' ---- snip "collections_load_imp.hpp" ---- // map input template<class Archive, class Container> struct archive_input_map { inline void operator()(Archive &ar, Container &s) { #if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) typedef BOOST_DEDUCED_TYPENAME std::pair< BOOST_DEDUCED_TYPENAME Container::key_type, BOOST_DEDUCED_TYPENAME Container::referent_type > type; #else typedef BOOST_DEDUCED_TYPENAME std::pair< BOOST_DEDUCED_TYPENAME Container::key_type, BOOST_DEDUCED_TYPENAME Container::mapped_type > type; #endif stack_construct<Archive, type> t(ar); // borland fails silently w/o full namespace ar >> boost::serialization::make_nvp("item", t.reference()); std::pair<BOOST_DEDUCED_TYPENAME Container::const_iterator, bool> result = s.insert(t.reference()); assert(result.second); // make sure we inserted a new element ar.reset_object_address(& (* result.first), & t); } }; ---- snip "collections_load_imp.hpp" ---- "ar.reset_object_address(& (* result.first), & t);" is called but not implemeted for these "polymorphic" archive types? I only found it implemented in "basic_iarchive_impl" (and "basic_oarchive_impl" respective). What gives? It worked for 1.32 (because there was no "reset_object_address" there). Is there another (new) way to use polymorphic archive interfaces serializing stl containers? Regards, A. Focht ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1250901&group_id=7586 ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ Boost-bugs mailing list Boost-bugs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/boost-bugs

Looks like a bug to me. Robert Ramey SourceForge.net wrote:
Bugs item #1250901, was opened at 2005-08-03 02:44 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1250901&group_id=7586
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: serialization Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Robert Ramey (ramey) Summary: polymorphic i/o archives and stl containers problem
Initial Comment: Hello,
i downloaded 1.33.0 RC1 from
http://www.osl.iu.edu/~dgregor/boost-1.33.0/
and tried to recompile some rather large projects with it (currently using 1.32.0). Using MS VC 7.1 and GCC 3.4.4
Doesnt work for boost::serialization:
boost::archive::polymorphic_iarchive& ar boost::archive::polymorphic_oarchive& ar
It bumps on STL containers now:
boost\serialization\collections_load_imp.hpp(118) : error C2039: 'reset_object_address' : is not a member of 'boost::archive::polymorphic_iarchive'
boost\archive\polymorphic_iarchive.hpp(52) : see declaration of 'boost::archive::polymorphic_iarchive'
---- snip "collections_load_imp.hpp" ---- // map input template<class Archive, class Container> struct archive_input_map { inline void operator()(Archive &ar, Container &s) { #if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) typedef BOOST_DEDUCED_TYPENAME std::pair< BOOST_DEDUCED_TYPENAME Container::key_type, BOOST_DEDUCED_TYPENAME Container::referent_type > type; #else typedef BOOST_DEDUCED_TYPENAME std::pair< BOOST_DEDUCED_TYPENAME Container::key_type, BOOST_DEDUCED_TYPENAME Container::mapped_type > type; #endif stack_construct<Archive, type> t(ar); // borland fails silently w/o full namespace ar >> boost::serialization::make_nvp("item", t.reference()); std::pair<BOOST_DEDUCED_TYPENAME Container::const_iterator, bool> result = s.insert(t.reference()); assert(result.second); // make sure we inserted a new element ar.reset_object_address(& (* result.first), & t); } }; ---- snip "collections_load_imp.hpp" ----
"ar.reset_object_address(& (* result.first), & t);" is called but not implemeted for these "polymorphic" archive types?
I only found it implemented in "basic_iarchive_impl" (and "basic_oarchive_impl" respective).
What gives? It worked for 1.32 (because there was no "reset_object_address" there).
Is there another (new) way to use polymorphic archive interfaces serializing stl containers?
Regards,
A. Focht
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1250901&group_id=7586
------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ Boost-bugs mailing list Boost-bugs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/boost-bugs _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (2)
-
Robert Ramey
-
SourceForge.net