[date_time] serialization of ptime with bcc32-5.6.4

I'm trying to serialize a ptime to an xml archive. I've included boost/date_time/posix_time/time_serialize.hpp but get an ambiguity error: [C++ Error] serialization.hpp(121): E2015 Ambiguity between 'boost::serialization::void serialize<boost::archive::xml_iarchive>(boost::archive::xml_iarchive &,boost::posix_time::ptime &,const unsigned int)' and 'boost::serialization::void serialize<boost::archive::xml_iarchive,boost::posix_time::ptime>(boost::archive::xml_iarchive &,boost::posix_time::ptime &,const unsigned int)' Is this a problem with the compiler or should this work? Thanks Russell

On Thu, 13 Jan 2005 13:13:41 +0000, Russell Hind wrote
I'm trying to serialize a ptime to an xml archive. I've included boost/date_time/posix_time/time_serialize.hpp but get an ambiguity error:
[C++ Error] serialization.hpp(121): E2015 Ambiguity between 'boost::serialization::void serialize<boost::archive::xml_iarchive>(boost::archive::xml_iarchive &,boost::posix_time::ptime &,const unsigned int)' and 'boost::serialization::void serialize<boost::archive::xml_iarchive, boost::posix_time::ptime>(boost::archive::xml_iarchive &, boost::posix_time::ptime &,const unsigned int)'
Is this a problem with the compiler or should this work?
Well I suspect it is a compiler issue -- it certainly works on other compilers such as gcc. We didn't turn on the serialization regression tests for date-time during the 1.32 push so unfortunately I don't have an accurate accounting of all the compiler status w.r.t date-time serialization. Jeff

Jeff Garland wrote:
Well I suspect it is a compiler issue -- it certainly works on other compilers such as gcc. We didn't turn on the serialization regression tests for date-time during the 1.32 push so unfortunately I don't have an accurate accounting of all the compiler status w.r.t date-time serialization.
What would you suggest as the best way to synchronise a ptime structure if I can't use the in-built methods? Thanks Russell

On Thu, 13 Jan 2005 15:48:02 +0000, Russell Hind wrote
What would you suggest as the best way to synchronise a ptime structure if I can't use the in-built methods?
We just use from_string/to_string in the serialization code -- which should work on Borland -- at least it isn't at the root of your current problem. Jeff
participants (2)
-
Jeff Garland
-
Russell Hind